1 # Copyright 2018 ZTE Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from genericparser.pub.utils.jobutil import enum
17 PKG_STATUS = enum(CREATED="CREATED", UPLOADING="UPLOADING", PROCESSING="PROCESSING", ONBOARDED="ONBOARDED",
18 IN_USE="IN_USE", NOT_IN_USE="NOT_IN_USE", ENABLED="ENABLED", DISABLED="DISABLED")
20 AUTH_TYPES = ["BASIC", "OAUTH2_CLIENT_CREDENTIALS", "TLS_CERT"]
24 OAUTH2_CLIENT_CREDENTIALS = "OAUTH2_CLIENT_CREDENTIALS"
26 NOTIFICATION_TYPES = ["VnfPackageOnboardingNotification", "VnfPackageChangeNotification"]
28 VNFPKG_SUBSCRIPTION_ROOT_URI = "api/vnfpkgm/v1/subscriptions/"
30 NSDM_SUBSCRIPTION_ROOT_URI = "api/nsd/v1/subscriptions/"
32 NSDM_NOTIFICATION_FILTERS = ["notificationTypes", "nsdInfoId", "nsdName",
33 "nsdId", "nsdVersion", "nsdDesigner",
34 "nsdInvariantId", "vnfPkgIds", "pnfdInfoIds",
35 "nestedNsdInfoIds", "nsdOnboardingState",
36 "nsdOperationalState", "nsdUsageState",
37 "pnfdId", "pnfdName", "pnfdVersion",
38 "pnfdProvider", "pnfdInvariantId",
39 "pnfdOnboardingState", "pnfdUsageState"]
41 NSDM_NOTIFICATION_TYPES = ["NsdOnBoardingNotification",
42 "NsdOnboardingFailureNotification",
43 "NsdChangeNotification",
44 "NsdDeletionNotification",
45 "PnfdOnBoardingNotification",
46 "PnfdOnBoardingFailureNotification",
47 "PnfdDeletionNotification"]