Final A1 V1.0.0 Release (but 1.1.0 to come)
- Represents v1.0.0 of the A1 API for O-RAN-SC Release A
Change-Id: I6bd25244ad122fc290e2a2db226bcdf679ff6e46
Signed-off-by: Tommy Carpenter <tc677g@att.com>
diff --git a/integration_tests/test_a1.tavern.yaml b/integration_tests/test_a1.tavern.yaml
index 47662ca..55a8937 100644
--- a/integration_tests/test_a1.tavern.yaml
+++ b/integration_tests/test_a1.tavern.yaml
@@ -115,7 +115,26 @@
response:
status_code: 404
- # PUT the instance and make sure subsequent GETs return properly
+ - name: bad body for admission control policy
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
+ method: PUT
+ json:
+ not: "expected"
+ headers:
+ content-type: application/json
+ response:
+ status_code: 400
+
+ - name: not a json
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
+ method: PUT
+ data: "asdf"
+ response:
+ status_code: 415
+
+ # put it properly
- name: put the admission control policy instance
request:
url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
@@ -130,6 +149,14 @@
response:
status_code: 202
+ - name: cant delete type with instances
+ delay_before: 3 # wait for the type acks to come back first
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 400
+
- name: test the admission control policy get
request:
url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
@@ -191,6 +218,36 @@
response:
status_code: 404
+ - name: delete ac type
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 204
+
+ - name: cant delete again
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 404
+
+ - name: cant get
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 404
+
+ - name: empty type list
+ request:
+ url: http://localhost:10000/a1-p/policytypes
+ method: GET
+ response:
+ status_code: 200
+ body: []
+
+
---
test_name: test the delay receiver
@@ -210,7 +267,7 @@
method: GET
response:
status_code: 200
- body: [20000]
+ body: []
- name: instance list 404
request:
@@ -266,7 +323,6 @@
response:
status_code: 200
body:
- - 20000
- 20001
- name: instance list 200 but empty
@@ -291,6 +347,15 @@
response:
status_code: 404
+ - name: bad body for delaytest
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
+ method: PUT
+ json:
+ not: "welcome"
+ response:
+ status_code: 400
+
- name: create delay policy instance
request:
url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
@@ -311,9 +376,9 @@
body:
test: foo
- - name: test the admission control policy status get
+ - name: test the delay status get
max_retries: 3
- delay_before: 5 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
+ delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
request:
url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
method: GET
@@ -366,7 +431,6 @@
status_code: 202
- name: should be no status
- delay_before: 5 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
request:
url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest/status
method: GET
@@ -374,6 +438,7 @@
status_code: 200
body: []
+ # this one cant currently be deleted, see the comment in a1/data.py
---
@@ -388,10 +453,9 @@
response:
status_code: 404
-
- - name: bad instance get
+ - name: bad instance get bad type
request:
- url: http://localhost:10000/a1-p/policytypes/20000/policies/darkness
+ url: http://localhost:10000/a1-p/policytypes/20666/policies/nonono
method: GET
response:
status_code: 404
@@ -425,32 +489,3 @@
status_code: 400
-
-
- - name: bad body for admission control policy
- request:
- url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
- method: PUT
- json:
- not: "expected"
- headers:
- content-type: application/json
- response:
- status_code: 400
-
- - name: not a json
- request:
- url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
- method: PUT
- data: "asdf"
- response:
- status_code: 415
-
- - name: bad body for delaytest
- request:
- url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
- method: PUT
- json:
- not: "welcome"
- response:
- status_code: 400