Tommy Carpenter | 03a0083 | 2019-11-22 09:15:35 -0500 | [diff] [blame] | 1 | openapi: 3.0.0 |
| 2 | info: |
| 3 | version: 1.0.0 |
| 4 | title: Contract between A1 and RIC Xapps |
| 5 | |
| 6 | components: |
| 7 | schemas: |
| 8 | |
| 9 | policy_type_id: |
| 10 | description: > |
| 11 | represents a policy type identifier. Currently this is restricted to an integer range. |
| 12 | type: integer |
| 13 | minimum: 1 |
| 14 | maximum: 2147483647 |
| 15 | |
| 16 | policy_instance_id: |
| 17 | description: > |
| 18 | represents a policy instance identifier. UUIDs are advisable but can be any string |
| 19 | type: string |
| 20 | example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12" |
| 21 | |
| 22 | downstream_message_schema: |
| 23 | type: object |
| 24 | required: |
| 25 | - operation |
| 26 | - policy_type_id |
| 27 | - policy_instance_id |
| 28 | - payload |
| 29 | additionalProperties: false |
| 30 | properties: |
| 31 | operation: |
| 32 | description: the operation being performed |
| 33 | type: string |
| 34 | enum: |
| 35 | - CREATE |
| 36 | - DELETE |
| 37 | - UPDATE |
| 38 | policy_type_id: |
| 39 | "$ref": "#/components/schemas/policy_type_id" |
| 40 | policy_instance_id: |
| 41 | "$ref": "#/components/schemas/policy_instance_id" |
| 42 | payload: |
| 43 | description: payload for this operation |
| 44 | type: object |
| 45 | example: |
| 46 | operation: CREATE |
| 47 | policy_type_id: 12345678 |
| 48 | policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12 |
| 49 | payload: |
| 50 | enforce: true |
| 51 | window_length: 10 |
| 52 | blocking_rate: 20 |
| 53 | trigger_threshold: 10 |
| 54 | |
| 55 | downstream_notification_schema: |
| 56 | type: object |
| 57 | required: |
| 58 | - policy_type_id |
| 59 | - policy_instance_id |
| 60 | - handler_id |
| 61 | - status |
| 62 | additionalProperties: false |
| 63 | properties: |
| 64 | policy_type_id: |
| 65 | "$ref": "#/components/schemas/policy_type_id" |
| 66 | policy_instance_id: |
| 67 | "$ref": "#/components/schemas/policy_instance_id" |
| 68 | handler_id: |
| 69 | description: > |
| 70 | id of the policy handler |
| 71 | type: string |
| 72 | status: |
| 73 | description: > |
| 74 | the status of this policy instance in this handler |
| 75 | type: string |
| 76 | enum: |
| 77 | - OK |
| 78 | - ERROR |
| 79 | - DELETED |
| 80 | example: |
| 81 | policy_type_id: 12345678 |
| 82 | policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12 |
| 83 | handler_id: 1234-5678 |
| 84 | status: OK |