Merge pull request #13 from oneilcin/master

Changed monasca-events-api port to 8072
This commit is contained in:
Joe Keen 2015-10-29 16:55:24 -06:00
commit 3829d1287d
3 changed files with 20 additions and 20 deletions

View File

@ -94,7 +94,7 @@ Stream Definition Methods
### Request Example ### Request Example
``` ```
POST /v2.0/stream-definitions HTTP/1.1 POST /v2.0/stream-definitions HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -111,7 +111,7 @@ None.
### Request Example ### Request Example
``` ```
GET /v2.0/stream-definitions HTTP/1.1 GET /v2.0/stream-definitions HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -143,7 +143,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s
"links": [ "links": [
{ {
"rel": "self", "rel": "self",
"href": "http://192.168.10.4:8082/v2.0/stream-definitions" "href": "http://192.168.10.4:8072/v2.0/stream-definitions"
} }
], ],
"elements": [ "elements": [
@ -172,7 +172,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s
"links": [ "links": [
{ {
"rel": "self", "rel": "self",
"href": "http://192.168.10.4:8082/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b" "href": "http://192.168.10.4:8072/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b"
} }
], ],
"updated_at": "2015-07-20T15:44:01", "updated_at": "2015-07-20T15:44:01",
@ -202,7 +202,7 @@ None.
### Request Example ### Request Example
``` ```
GET /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1 GET /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -254,7 +254,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s
"links": [ "links": [
{ {
"rel": "self", "rel": "self",
"href": "http://192.168.10.4:8082/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b" "href": "http://192.168.10.4:8072/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b"
} }
], ],
"updated_at": "2015-07-20T15:44:01", "updated_at": "2015-07-20T15:44:01",
@ -281,7 +281,7 @@ None.
### Request Example ### Request Example
``` ```
DELETE /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1 DELETE /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -309,7 +309,7 @@ None.
### Request Example ### Request Example
``` ```
POST /v2.0/transforms/ HTTP/1.1 POST /v2.0/transforms/ HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -331,7 +331,7 @@ None.
### Request Example ### Request Example
``` ```
GET /v2.0/transforms/ HTTP/1.1 GET /v2.0/transforms/ HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -355,7 +355,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s
"links": [ "links": [
{ {
"rel": "self", "rel": "self",
"href": "http://192.168.10.4:8082/v2.0/transforms" "href": "http://192.168.10.4:8072/v2.0/transforms"
} }
], ],
"elements": [ "elements": [
@ -385,7 +385,7 @@ None.
### Request Example ### Request Example
``` ```
GET /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1 GET /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache
@ -415,7 +415,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s
"links": [ "links": [
{ {
"rel": "self", "rel": "self",
"href": "http://192.168.10.4:8082/v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77" "href": "http://192.168.10.4:8072/v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77"
} }
], ],
"deleted_at": null, "deleted_at": null,
@ -436,7 +436,7 @@ None.
### Request Example ### Request Example
``` ```
DELETE /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1 DELETE /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1
Host: 192.168.10.4:8082 Host: 192.168.10.4:8072
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Accept: application/json Accept: application/json
Cache-Control: no-cache Cache-Control: no-cache

View File

@ -20,8 +20,8 @@ import yaml
from monascaclient import ksclient from monascaclient import ksclient
# events_url = "http://127.0.0.1:8082" # events_url = "http://127.0.0.1:8072"
events_url = "http://192.168.10.4:8082" events_url = "http://192.168.10.4:8072"
def token(): def token():
@ -88,7 +88,7 @@ def test_stream_definition_post():
body = {} body = {}
notif_resp = requests.get( notif_resp = requests.get(
url="http://192.168.10.4:8080/v2.0/notification-methods", url="http://192.168.10.4:8070/v2.0/notification-methods",
data=json.dumps(body), headers=headers) data=json.dumps(body), headers=headers)
notif_dict = json.loads(notif_resp.text) notif_dict = json.loads(notif_resp.text)
action_id = str(notif_dict['elements'][0]['id']) action_id = str(notif_dict['elements'][0]['id'])
@ -166,17 +166,17 @@ def test_transforms():
print("Test GET /transforms") print("Test GET /transforms")
body = {} body = {}
response = requests.get( response = requests.get(
url=events_url + "/v2.0/transforms", url=events_url + "/v2.0/transforms",
data=json.dumps(body), data=json.dumps(body),
headers=headers) headers=headers)
assert response.status_code == 200 assert response.status_code == 200
print("GET /transforms success") print("GET /transforms success")
print("Test DELETE /transforms") print("Test DELETE /transforms")
body = {} body = {}
response = requests.get( response = requests.get(
url=events_url + "/v2.0/transforms", url=events_url + "/v2.0/transforms",
data=json.dumps(body), data=json.dumps(body),

View File

@ -72,5 +72,5 @@ if __name__ == '__main__':
wsgi_app = ( wsgi_app = (
paste.deploy.loadapp('config:etc/events_api.ini', paste.deploy.loadapp('config:etc/events_api.ini',
relative_to=os.getcwd())) relative_to=os.getcwd()))
httpd = simple_server.make_server('127.0.0.1', 8082, wsgi_app) httpd = simple_server.make_server('127.0.0.1', 8072, wsgi_app)
httpd.serve_forever() httpd.serve_forever()