ci-cd-pipeline-app-murano/murano-apps/LBaaS-interface/Resources/scripts/lbaas_api-0.1
Sergey Kraynev 9bed165c30 Fix shellcheck errors for LBaaS apps
Current patch fixes shell issues in LBaaS apps reported by test run:
tox -e shellcheck
All LB related scripts were fixed according command output.

Change-Id: Ia24f2ba25d7818cb05d064a9fc7f5f4617f714d8
2016-08-01 15:12:45 +03:00
..
etc Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
lbaas Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
lbaas.egg-info Fixing LBaaS package issues 2016-04-21 13:46:33 +03:00
tools Fix shellcheck errors for LBaaS apps 2016-08-01 15:12:45 +03:00
.testr.conf Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
AUTHORS Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
ChangeLog Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
PKG-INFO Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
README.md Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
requirements.txt Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
setup.cfg Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
setup.py Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
test-requirements.txt Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00
tox.ini Adding a new version of python LBaaS API 2016-04-11 18:08:37 +04:00

README.md

LBaaS API specification

Listeners API

/v1/listeners - objects representing a group of machines balancing on LB on specific protocol and port. Each listener contains mapping configuration to members and their listening ports. Example: listener A listen to HTTP port 80 and maps to 3 machines with their own IPs listening on HTTP port 8080.

                        ---> Member, Machine1_IP (HTTP, 8080)
Listener A (HTTP, 80) ---> Member, Machine2_IP (HTTP, 8080)
  	                    ---> Member, Machine3_IP (HTTP, 8080)

POST /v1/listeners

Creates a new listener object. Returns 201 if succeed. Parameters:

  • name - The name of listener. Type string. Required. Should be unique across listener objects.
  • protocol - The protocol of listener. Type string. Should be one of {“http”, “tcp”}. It is not validated by API! Required.
  • protocol_port - Protocol TCP port which listener will be listening to. Type integer. Required.
  • algorithm - Load-balancing algorithm. Type string. If passed, should be compatible with one of possible haproxy algorithm. Optional, default value if not passed - “roundrobin”.

Request body example:

{
  “protocol”: “http”,
  “protocol_port”: 80,
  “name”: “app”,
  “algorithm”: “roundrobin”
}

GET /v1/listeners

Gets all listeners from LBaaS. Also contains all containing members information. Returns 200 if succeed.

GET /v1/listeners/

Gets particular listener from LBaaS. name - the listeners name.

PUT /v1/listeners/

Update listener info by its name. Returns 200 code if succeed. Request body example:

{
  “protocol_port”: 8080,
  “name”: “app”
}

DELETE /v1/listeners/

Deletes the whole listener by its name. Returns 204 if succeed.

Members API

/v1/members - objects representing a machine which is able to receive requests on specific port of specific protocol. Each member belongs to specific listener.

POST /v1/members

Creates a new member object. Returns 201 if succeed. Parameters:

  • name - The name of member. Type string. Required. Should be unique across member objects.
  • protocol_port - Protocol TCP port which member is listening to. Type integer. Required.
  • address - Hostname or IP address of member machine. Type string. Required.
  • listener_name - The name of listener which adds the current member to. Member will belong to this listener. Each listener may have a number of members. Type string. Required.

Request body example:

{
  “address”: “10.0.20.5”,
  “protocol_port”: 80,
  “name”: “my_server”,
  “listener_name”: “app”
}

GET /v1/members

Gets all members from LBaaS. Returns 200 if succeed.

GET /v1/members/

Gets particular member from LBaaS. name - the members name.

PUT /v1/members/

Update listener info by its name. Returns 200 code if succeed.

Request body example:

{
  “protocol_port”: 8080,
}

DELETE /v1/members/

Deletes the whole member by its name. Returns 204 if succeed.