diff options
author | 2019-04-19 10:05:12 +0800 | |
---|---|---|
committer | 2019-04-19 10:05:12 +0800 | |
commit | 26ffedc75af2a81ef44ddb268ae18654aeced287 (patch) | |
tree | 8db4df2db7127fe0969d53cff3bd1cb0af0a94a5 | |
parent | 9f6096c4935b85762cd335066713a9af120d7f6b (diff) |
refactor codes for catalog
Change-Id: I5f2d15fd0ecec1576f409ccfad01933c2fd28eb0
Issue-ID: VFC-1307
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rwxr-xr-x | catalog/packages/const.py | 71 |
1 files changed, 51 insertions, 20 deletions
diff --git a/catalog/packages/const.py b/catalog/packages/const.py index 522cb859..cd09b407 100755 --- a/catalog/packages/const.py +++ b/catalog/packages/const.py @@ -14,34 +14,65 @@ from catalog.pub.utils.jobutil import enum -PKG_STATUS = enum(CREATED="CREATED", UPLOADING="UPLOADING", PROCESSING="PROCESSING", ONBOARDED="ONBOARDED", - IN_USE="IN_USE", NOT_IN_USE="NOT_IN_USE", ENABLED="ENABLED", DISABLED="DISABLED") +PKG_STATUS = enum( + CREATED="CREATED", + UPLOADING="UPLOADING", + PROCESSING="PROCESSING", + ONBOARDED="ONBOARDED", + IN_USE="IN_USE", + NOT_IN_USE="NOT_IN_USE", + ENABLED="ENABLED", + DISABLED="DISABLED" +) -AUTH_TYPES = ["BASIC", "OAUTH2_CLIENT_CREDENTIALS", "TLS_CERT"] +AUTH_TYPES = [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" +] BASIC = "BASIC" OAUTH2_CLIENT_CREDENTIALS = "OAUTH2_CLIENT_CREDENTIALS" -NOTIFICATION_TYPES = ["VnfPackageOnboardingNotification", "VnfPackageChangeNotification"] +NOTIFICATION_TYPES = [ + "VnfPackageOnboardingNotification", + "VnfPackageChangeNotification" +] VNFPKG_SUBSCRIPTION_ROOT_URI = "api/vnfpkgm/v1/subscriptions/" NSDM_SUBSCRIPTION_ROOT_URI = "api/nsd/v1/subscriptions/" -NSDM_NOTIFICATION_FILTERS = ["notificationTypes", "nsdInfoId", "nsdName", - "nsdId", "nsdVersion", "nsdDesigner", - "nsdInvariantId", "vnfPkgIds", "pnfdInfoIds", - "nestedNsdInfoIds", "nsdOnboardingState", - "nsdOperationalState", "nsdUsageState", - "pnfdId", "pnfdName", "pnfdVersion", - "pnfdProvider", "pnfdInvariantId", - "pnfdOnboardingState", "pnfdUsageState"] - -NSDM_NOTIFICATION_TYPES = ["NsdOnBoardingNotification", - "NsdOnboardingFailureNotification", - "NsdChangeNotification", - "NsdDeletionNotification", - "PnfdOnBoardingNotification", - "PnfdOnBoardingFailureNotification", - "PnfdDeletionNotification"] +NSDM_NOTIFICATION_FILTERS = [ + "notificationTypes", + "nsdInfoId", + "nsdName", + "nsdId", + "nsdVersion", + "nsdDesigner", + "nsdInvariantId", + "vnfPkgIds", + "pnfdInfoIds", + "nestedNsdInfoIds", + "nsdOnboardingState", + "nsdOperationalState", + "nsdUsageState", + "pnfdId", + "pnfdName", + "pnfdVersion", + "pnfdProvider", + "pnfdInvariantId", + "pnfdOnboardingState", + "pnfdUsageState" +] + +NSDM_NOTIFICATION_TYPES = [ + "NsdOnBoardingNotification", + "NsdOnboardingFailureNotification", + "NsdChangeNotification", + "NsdDeletionNotification", + "PnfdOnBoardingNotification", + "PnfdOnBoardingFailureNotification", + "PnfdDeletionNotification" +] |