Merge pull request #13 from oneilcin/master
Changed monasca-events-api port to 8072
This commit is contained in:
commit
3829d1287d
26
README.md
26
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
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue