+ - name: type not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666
+ method: GET
+ response:
+ status_code: 404
+
+ - name: type list empty
+ request:
+ url: http://localhost:10000/a1-p/policytypes
+ method: GET
+ response:
+ status_code: 200
+ body: []
+
+ - name: instance list 404
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666/policies
+ method: GET
+ response:
+ status_code: 404
+
+ - name: put the type
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666
+ method: PUT
+ json:
+ name: Admission Control
+ description: various parameters to control admission of dual connection
+ policy_type_id: 6660666
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object
+ additionalProperties: false
+ properties:
+ class:
+ type: integer
+ minimum: 1
+ maximum: 256
+ description: integer id representing class to which we are applying policy
+ enforce:
+ type: boolean
+ description: Whether to enable or disable enforcement of policy on this class
+ window_length:
+ type: integer
+ minimum: 15
+ maximum: 300
+ description: Sliding window length in seconds
+ trigger_threshold:
+ type: integer
+ minimum: 1
+ blocking_rate:
+ type: number
+ minimum: 0
+ maximum: 100
+ required:
+ - class
+ - enforce
+ - window_length
+ - trigger_threshold
+ - blocking_rate
+ response:
+ status_code: 201
+
+ - name: type there now
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666
+ method: GET
+ response:
+ status_code: 200
+
+ - name: now in type list
+ request:
+ url: http://localhost:10000/a1-p/policytypes
+ method: GET
+ response:
+ status_code: 200
+ body: [6660666]
+
+ - name: instance list 200 but empty
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666/policies
+ method: GET
+ response:
+ status_code: 200
+ body: []
+
+ - name: test the admission control policy get not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
+ method: GET
+ response:
+ status_code: 404
+
+ - name: test the admission control policy status get not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
+ method: GET
+ response:
+ status_code: 404
+
+ - name: bad body for admission control policy