[PMSH] Create Measurement Group API 92/127392/12
authoregernug <gerard.nugent@est.tech>
Wed, 23 Feb 2022 13:38:34 +0000 (13:38 +0000)
committeregernug <gerard.nugent@est.tech>
Wed, 9 Mar 2022 12:25:35 +0000 (12:25 +0000)
commit36987b3ac6eccb475e9976b95a08683a86682cdc
treeff0b5a0296ef94450a04ae1b5b1701e052e27777
parent6c9c8cc2a1a289ef0b4172d387376d0367549fe3
[PMSH] Create Measurement Group API

Creates Measurement Group for an associated Subscription
POST: /subscription/{subscription_name}/measurementGroups/{measurement_group_name}
Measurement Group structure:
{
    "measurementGroup": {
           "measurementGroupName": "string",
           "fileBasedGP": 0,
           "fileLocation": "string",
           "administrativeState": "LOCKED",
           "measurementTypes": [

{                           "measurementType": "string"                   }
          ],
          "managedObjectDNsBasic": [

{                           "DN": "string"                  }
          ]
     }
}

Returns:

Success: 201
Invalid Data: 400 when measurement_group_name in URI and body do not match
Not Found: 404 when subscription does not exist to associate measurement group to
Duplicate Data: Measurement group with that name already exists
Error raised for any server failure

Issue-ID: DCAEGEN2-2920

Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I812c5a891e9bed5433000f5da24e2667bf9a5d65
components/pm-subscription-handler/Changelog.md
components/pm-subscription-handler/pmsh_service/mod/api/controller.py
components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml
components/pm-subscription-handler/pmsh_service/mod/api/services/measurement_group_service.py
components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py
components/pm-subscription-handler/tests/services/test_measurement_group_service.py
components/pm-subscription-handler/tests/test_controller.py