summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAh <Ashwini.Ah@arris.com>2018-09-28 12:37:17 +0530
committerAh <Ashwini.Ah@arris.com>2018-10-01 17:01:45 +0530
commitc3bca52168627ffe915f39b1e03e5505a8a68176 (patch)
treea9194843b4ae0f13d40550324d7002628caafb54
parent5d5597da33bc4c487c7552fe468ce8184d2a0579 (diff)
Support for Keystone V33.0.1-ONAP3.0.0-ONAPcasablanca
Issue-ID: TEST-39 Change-Id: I912e6d8b57d5be78cf6831daa5b6081388c03c6e Signed-off-by: Ah <Ashwini.Ah@arris.com>
-rw-r--r--heatbridge/heatbridge/HeatBridge.py7
-rw-r--r--heatbridge/heatbridge/OpenstackContext.py8
-rw-r--r--heatbridge/heatbridge/OpenstackManager.py24
3 files changed, 27 insertions, 12 deletions
diff --git a/heatbridge/heatbridge/HeatBridge.py b/heatbridge/heatbridge/HeatBridge.py
index f9b9580..de10793 100644
--- a/heatbridge/heatbridge/HeatBridge.py
+++ b/heatbridge/heatbridge/HeatBridge.py
@@ -7,9 +7,10 @@ class HeatBridge:
def __init__(self):
pass;
- def init_bridge(self, openstack_identity_url, username, password, tenant, region, owner):
- self.om = OpenstackManager(openstack_identity_url, OpenstackContext(username, password, tenant, region, owner));
- self.am = AAIManager(OpenstackContext(username, password, tenant, region, owner));
+ def init_bridge(self, openstack_identity_url, username, password, tenant, region, owner, domain_id=None, project_name=None):
+ self.om = OpenstackManager(openstack_identity_url, OpenstackContext(username, password, tenant, region, owner, domain_id, project_name));
+ self.am = AAIManager(OpenstackContext(username, password, tenant, region, owner, domain_id, project_name));
+
def filterbyvalue(self, seq, key, value):
for el in seq:
diff --git a/heatbridge/heatbridge/OpenstackContext.py b/heatbridge/heatbridge/OpenstackContext.py
index 5e852a2..55661d3 100644
--- a/heatbridge/heatbridge/OpenstackContext.py
+++ b/heatbridge/heatbridge/OpenstackContext.py
@@ -7,10 +7,14 @@ class OpenstackContext:
tenant = None;
region = None;
owner = None;
+ domain_id = None;
+ project_name = None;
- def __init__(self, username, password, tenant, region, owner):
+ def __init__(self, username, password, tenant, region, owner, domain_id, project_name):
self.username = username;
self.password = password;
self.tenant = tenant;
self.region = region;
- self.owner = owner; \ No newline at end of file
+ self.owner = owner;
+ self.domain_id = domain_id;
+ self.project_name = project_name;
diff --git a/heatbridge/heatbridge/OpenstackManager.py b/heatbridge/heatbridge/OpenstackManager.py
index 0bb637a..327978a 100644
--- a/heatbridge/heatbridge/OpenstackManager.py
+++ b/heatbridge/heatbridge/OpenstackManager.py
@@ -25,10 +25,10 @@ class OpenstackManager:
"""
self.openstack_context = context;
self.identity_url = identity_url;
- self.authenticate(context.username, context.password, context.tenant, context.region)
+ self.authenticate(context.username, context.password, context.tenant, context.region, context.domain_id, context.project_name)
logging.basicConfig(level=logging.DEBUG)
- def authenticate(self, username, password, tenant, region):
+ def authenticate(self, username, password, tenant, region, domain_id,project_name):
""" Authenticate to openstack env
`username` username to authenticate to openstack
@@ -44,31 +44,41 @@ class OpenstackManager:
username=username,
password=password,
project_id=tenant,
- region_name=region);
+ region_name=region,
+ domain_id=domain_id,
+ project_name=project_name);
self.__nova_client = os_client_config.make_client('compute',
auth_url=self.identity_url,
username=username,
password=password,
project_id=tenant,
- region_name=region);
+ region_name=region,
+ domain_id=domain_id,
+ project_name=project_name);
self.__cinder_client = os_client_config.make_client('volume',
auth_url=self.identity_url,
username=username,
password=password,
project_id=tenant,
- region_name=region);
+ region_name=region,
+ domain_id=domain_id,
+ project_name=project_name);
self.__glance_client = os_client_config.make_client('image',
auth_url=self.identity_url,
username=username,
password=password,
project_id=tenant,
- region_name=region);
+ region_name=region,
+ domain_id=domain_id,
+ project_name=project_name);
self.__neutron_client = os_client_config.make_client('network',
auth_url=self.identity_url,
username=username,
password=password,
project_id=tenant,
- region_name=region);
+ region_name=region,
+ domain_id=domain_id,
+ project_name=project_name);
#this next line is needed because for v2 apis that are after a certain release stopped providing version info in keytone url but rackspace did not
self.__neutron_client.action_prefix = "";
self.__auth_resp = True;