Skip to content

Instantly share code, notes, and snippets.

Introduction

The following document describes how we can communicate with IBSng API through JSONRPC.

Note that IBSng is capable of handling requests in XML format as well, which in this case the IBSng XMLRPC server is responsible of processing/answering the requests but it is not the purpose of this document

All the samples of this document are implemented with curl command to make it independent of any programming languages.

Each operation in IBSng can be done by calling its appropriate method. The methods are categorized in different sections called handler. All the handlers/methods are described in here. So if we want to refer to a specific method it has the following form: <handler_name>.<method_name>.

For example, if you decide to send the Recharge Users request, you must find its handler and of course its method. In this case, the method is rechargeUsers and its handler is user. So in your reques

@morteza-mori
morteza-mori / install-docker-deb8.sh
Created May 23, 2018 06:17 — forked from tsaqib/install-docker-deb8.sh
Docker installer script for Debian 8 Jessie
# Docker installation script for Debian 8 Jessie on Azure
# Usage: execute sudo -i, first.
# wget -q -O - "$@" https://gist.githubusercontent.com/tsaqib/b2c83ac30f962ab78a5472902c325aa9/raw/ --no-cache | sh
# After running the script reboot and check whether docker is running.
apt-get purge lxc-docker*
apt-get purge docker.io*
apt-get update -y && sudo apt-get upgrade -y
apt-get install -y apt-transport-https ca-certificates
@morteza-mori
morteza-mori / manual.md
Created May 22, 2018 10:54 — forked from mortymacs/manual.md
Set Proxy On Docker Service in Linux
  • First install tor and privoxy and config them.
  • Create a file in this directory with below config: touch /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=127.0.0.1:8118"
@morteza-mori
morteza-mori / ad_test.py
Created May 22, 2018 10:43 — forked from mortymacs/ad_test.py
Retrieve user information from AD via Python LDAP
import sys, ldap
# DN = username@example.com, secret = password, un = username
DN, secret, un = sys.argv[1:4]
server = "ldap://server.com"
port = 389
base = "dc=example,dc=com"
scope = ldap.SCOPE_SUBTREE
@morteza-mori
morteza-mori / openldap-get-changed-users.md
Created November 11, 2017 12:30 — forked from mortymacs/openldap-get-changed-users.md
How to get OpenLdap user changed attributes instead of all user attributes

To handle this issue, you need to get openldap internal fields by adding a + sign at the end of search query like so:

    $ ldapsearch -h localhost -w 'admin' -x -D "cn=admin,dc=example,dc=org" -b "DC=example,DC=org" +

And in python code it would like this:

    r = l.search_ext("dc=example,dc=org", ldap.SCOPE_SUBTREE, "objectClass=*", ["+",], 0)

Introduction

The following document describes how we can communicate with IBSng API through JSONRPC.

Note that IBSng is capable of handling requests in XML format as well, which in this case the IBSng XMLRPC server is responsible of processing/answering the requests but it is not the purpose of this document

All the samples of this document are implemented with curl command to make it independent of any programming languages.

Each operation in IBSng can be done by calling its appropriate method. The methods are categorized in different sections called handler. All the handlers/methods are described in here. So if we want to refer to an specific method it has following form: <handler_name>.<method_name>.

@morteza-mori
morteza-mori / docker-useful-commands.md
Created September 2, 2017 06:11 — forked from mortymacs/docker-useful-commands.md
Docker Some Useful Commands

Backup From Container

$ docker export myproject-dev > myproject-dev.tar

Import Backuped Container

$ docker import myproject-container.tar

List of Images

@morteza-mori
morteza-mori / proxy-jump-ssh-connection.md
Created August 20, 2017 09:02 — forked from mortymacs/proxy-jump-ssh-connection.md
Proxy Jump in SSH Connections

Create config file for ssh (my.conf):

Host Server1
    User root
    HostName 192.168.100.10
Host Server2
    User root
    HostName 192.168.100.5
HostName Server3
 User root
@morteza-mori
morteza-mori / vbox-cli-manual.md
Created August 1, 2017 13:09 — forked from mortymacs/vbox-cli-manual.md
VirtualBox Useful Commands

Create vm

VBoxManage createvm --name "Debian 9" --register

Modify vm

VBoxManage modifyvm "Debian 9" --memory 1024