summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler
diff options
context:
space:
mode:
authorraviteja.karumuri <raviteja.karumuri@est.tech>2021-08-23 16:19:33 +0100
committerraviteja.karumuri <raviteja.karumuri@est.tech>2021-10-05 16:25:08 +0100
commit2f208f94eddd090c1983f849f61742288c21af6f (patch)
treeaed5a7d31565618568edbba9f164967d68997966 /components/pm-subscription-handler
parent37d218575d0cc1d99a3edaa0605450480b357d79 (diff)
[PMSH] Schema definitions in Swagger Yaml File
Issue-ID: DCAEGEN2-2889 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I15ae36c8f55a708be25eb56dc6b9812c3feec822
Diffstat (limited to 'components/pm-subscription-handler')
-rwxr-xr-xcomponents/pm-subscription-handler/Changelog.md1
-rw-r--r--components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml111
2 files changed, 110 insertions, 2 deletions
diff --git a/components/pm-subscription-handler/Changelog.md b/components/pm-subscription-handler/Changelog.md
index 3112ac59..f98d2b8d 100755
--- a/components/pm-subscription-handler/Changelog.md
+++ b/components/pm-subscription-handler/Changelog.md
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [2.0.0]
### Changed
* Updated PMSH app configuration, simplified existing config (DCAEGEN2-2814)
+* Created Schema definitions in swagger file according to the new structure (DCAEGEN2-2889)
## [1.3.2]
### Changed
diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml b/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml
index 58e6a788..2a6137cf 100644
--- a/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml
+++ b/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2020 Nordix Foundation.
+# Copyright (C) 2020-2021 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,13 +19,14 @@
swagger: "2.0"
info:
title: PM Subscription Handler Service
- version: "1.1.0"
+ version: "2.0.0"
description: PM subscription handler enables control of performance management jobs on network functions in ONAP
produces:
- "application/json"
basePath: "/"
schemes:
- https
+ - http
# Paths supported by the server application
paths:
/subscriptions:
@@ -87,3 +88,109 @@ paths:
enum: [healthy, unhealthy]
503:
description: the pmsh service is unavailable
+
+definitions:
+ subscription:
+ type: object
+ properties:
+ subscription:
+ type: object
+ properties:
+ subscriptionName:
+ type: string
+ operationalPolicyName:
+ type: string
+ controlLoopName:
+ type: string
+ nfFilter:
+ $ref: "#/definitions/nfFilter"
+ measurementGroups:
+ type: array
+ minItems: 1
+ items:
+ $ref: "#/definitions/measurementGroup"
+ required:
+ - subscriptionName
+ - operationalPolicyName
+ - nfFilter
+ - measurementGroups
+ required:
+ - subscription
+
+ nfFilter:
+ type: object
+ minProperties: 1
+ additionalProperties: false
+ properties:
+ nfNames:
+ type: array
+ minItems: 1
+ items:
+ type: string
+ modelInvariantIDs:
+ type: array
+ minItems: 1
+ items:
+ type: string
+ modelVersionIDs:
+ type: array
+ minItems: 1
+ items:
+ type: string
+ modelNames:
+ type: array
+ minItems: 1
+ items:
+ type: string
+
+ measurementGroup:
+ type: object
+ properties:
+ measurementGroup:
+ type: object
+ properties:
+ measurementGroupName:
+ type: string
+ fileBasedGP:
+ type: integer
+ fileLocation:
+ type: string
+ administrativeState:
+ type: string
+ enum: [LOCKED, UNLOCKED]
+ measurementTypes:
+ type: array
+ minItems: 1
+ items:
+ $ref: "#/definitions/measurementType"
+ managedObjectDNsBasic:
+ type: array
+ minItems: 1
+ items:
+ $ref: "#/definitions/managedObjectDNs"
+ allOf:
+ - required:
+ - measurementGroupName
+ - fileBasedGP
+ - fileLocation
+ - administrativeState
+ - measurementTypes
+ - managedObjectDNsBasic
+ required:
+ - measurementGroup
+
+ measurementType:
+ type: object
+ properties:
+ measurementType:
+ type: string
+ required:
+ - measurementType
+
+ managedObjectDNs:
+ type: object
+ properties:
+ DN:
+ type: string
+ required:
+ - DN