+ - name: type not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ 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/20000/policies
+ method: GET
+ response:
+ status_code: 404
+
+ - name: put the type
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: PUT
+ json:
+ name: Admission Control
+ description: various parameters to control admission of dual connection
+ policy_type_id: 20000
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object
+ properties:
+ enforce:
+ type: boolean
+ default: true
+ window_length:
+ type: integer
+ default: 1
+ minimum: 1
+ maximum: 60
+ description: Sliding window length (in minutes)
+ blocking_rate:
+ type: number
+ default: 10
+ minimum: 1
+ maximum: 100
+ description: "% Connections to block"
+ trigger_threshold:
+ type: integer
+ default: 10
+ minimum: 1
+ description: Minimum number of events in window to trigger blocking
+ required:
+ - enforce
+ - blocking_rate
+ - trigger_threshold
+ - window_length
+ additionalProperties: false
+ response:
+ status_code: 201
+
+ - name: type there now
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ 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: [20000]
+
+ - name: instance list 200 but empty
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies
+ method: GET
+ response:
+ status_code: 200
+ body: []
+