# from uuid import UUID
+DeploymentManagerProfileDefault = 'default'
+DeploymentManagerProfileSOL018 = 'sol018'
+DeploymentManagerProfileSOL018HelmCLI = 'sol018_helmcli'
+
+
class DeploymentManager(AgRoot, Serializer):
def __init__(self, id: str, name: str, ocloudid: str,
dmsendpoint: str, description: str = '',
self.extensions = []
def serialize(self):
+ print(self.__dict__)
d = Serializer.serialize(self)
if 'profile' in d and d['profile'] != '':
d['profile'] = json.loads(d['profile'])
- d['profileSupportList'] = ['default', 'sol018']
+ d['profileSupportList'] = [
+ DeploymentManagerProfileDefault,
+ DeploymentManagerProfileSOL018,
+ DeploymentManagerProfileSOL018HelmCLI,
+ ]
return d
import shutil
from o2common.service import unit_of_work
+from o2ims.domain import ocloud
from o2ims.views.ocloud_dto import SubscriptionDTO
from o2ims.domain.subscription_obj import Subscription
profile_data = result.pop("profile", None)
result['profileName'] = profile
- if "default" == profile:
+ if ocloud.DeploymentManagerProfileDefault == profile:
pass
- elif "sol018" == profile:
+ elif ocloud.DeploymentManagerProfileSOL018 == profile:
result['deploymentManagementServiceEndpoint'] = \
profile_data['cluster_api_endpoint']
result['profileData'] = profile_data
- elif "sol018_helmcli" == profile:
+ elif ocloud.DeploymentManagerProfileSOL018HelmCLI == profile:
result['deploymentManagementServiceEndpoint'] = \
profile_data['cluster_api_endpoint']
assert deployment_manager_res.get('profile') is None
# profile sol018
- profileName = 'sol018'
+ profileName = ocloud.DeploymentManagerProfileSOL018
cluster_endpoint = "https://test_k8s:6443"
session.return_value.query.return_value.filter_by.return_value.first.\
return_value.serialize.return_value['profile'] = {