From e6a05689a31ae1c9a22e81e1cff2420c45f87ed8 Mon Sep 17 00:00:00 2001 From: cindy oneill Date: Tue, 20 Oct 2015 14:58:18 -0600 Subject: [PATCH] Changed monasca-events-api port to 8072 --- README.md | 26 +++++++++++++------------- func_test/api_func_test.py | 12 ++++++------ monasca_events_api/api/server.py | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 8b71f54..8ab61b0 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Stream Definition Methods ### Request Example ``` POST /v2.0/stream-definitions HTTP/1.1 -Host: 192.168.10.4:8082 +Host: 192.168.10.4:8072 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 Accept: application/json Cache-Control: no-cache @@ -111,7 +111,7 @@ None. ### Request Example ``` GET /v2.0/stream-definitions HTTP/1.1 -Host: 192.168.10.4:8082 +Host: 192.168.10.4:8072 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 Accept: application/json 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": [ { "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": [ @@ -172,7 +172,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s "links": [ { "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", @@ -202,7 +202,7 @@ None. ### Request Example ``` 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 Accept: application/json 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": [ { "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", @@ -281,7 +281,7 @@ None. ### Request Example ``` 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 Accept: application/json Cache-Control: no-cache @@ -309,7 +309,7 @@ None. ### Request Example ``` POST /v2.0/transforms/ HTTP/1.1 -Host: 192.168.10.4:8082 +Host: 192.168.10.4:8072 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 Accept: application/json Cache-Control: no-cache @@ -331,7 +331,7 @@ None. ### Request Example ``` GET /v2.0/transforms/ HTTP/1.1 -Host: 192.168.10.4:8082 +Host: 192.168.10.4:8072 X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7 Accept: application/json 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": [ { "rel": "self", - "href": "http://192.168.10.4:8082/v2.0/transforms" + "href": "http://192.168.10.4:8072/v2.0/transforms" } ], "elements": [ @@ -385,7 +385,7 @@ None. ### Request Example ``` 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 Accept: application/json 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": [ { "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, @@ -436,7 +436,7 @@ None. ### Request Example ``` 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 Accept: application/json Cache-Control: no-cache diff --git a/func_test/api_func_test.py b/func_test/api_func_test.py index 90c4761..6b95ed5 100644 --- a/func_test/api_func_test.py +++ b/func_test/api_func_test.py @@ -20,8 +20,8 @@ import yaml from monascaclient import ksclient -# events_url = "http://127.0.0.1:8082" -events_url = "http://192.168.10.4:8082" +# events_url = "http://127.0.0.1:8072" +events_url = "http://192.168.10.4:8072" def token(): @@ -88,7 +88,7 @@ def test_stream_definition_post(): body = {} 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) notif_dict = json.loads(notif_resp.text) action_id = str(notif_dict['elements'][0]['id']) @@ -166,17 +166,17 @@ def test_transforms(): print("Test GET /transforms") body = {} - + response = requests.get( url=events_url + "/v2.0/transforms", data=json.dumps(body), headers=headers) assert response.status_code == 200 print("GET /transforms success") - + print("Test DELETE /transforms") body = {} - + response = requests.get( url=events_url + "/v2.0/transforms", data=json.dumps(body), diff --git a/monasca_events_api/api/server.py b/monasca_events_api/api/server.py index 08b250e..1fdc05e 100755 --- a/monasca_events_api/api/server.py +++ b/monasca_events_api/api/server.py @@ -72,5 +72,5 @@ if __name__ == '__main__': wsgi_app = ( paste.deploy.loadapp('config:etc/events_api.ini', 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()