add created_on value to tenants in keystone

Change-Id: I131a8cbde6be39e2551e8a405e579d540aa2dff0
This commit is contained in:
adriant 2015-08-12 16:10:22 +12:00 committed by Dale Smith
parent 9384abc87d
commit 8a7c4d6a89
3 changed files with 6 additions and 4 deletions

View File

@ -112,7 +112,7 @@ class FakeManager(object):
if project.id == project_id:
return project
def create_project(self, project_name, p_id=None):
def create_project(self, project_name, created_on, p_id=None):
global temp_cache
project = mock.Mock()
if p_id:

View File

@ -402,7 +402,8 @@ class NewProject(UserAction):
if self.valid:
id_manager = IdentityManager()
try:
project = id_manager.create_project(self.project_name)
project = id_manager.create_project(
self.project_name, created_on=str(timezone.now()))
except Exception as e:
self.add_note(
"Error: '%s' while creating project: %s" %

View File

@ -81,6 +81,7 @@ class IdentityManager(object):
project = None
return project
def create_project(self, project_name):
project = self.ks_client.tenants.create(project_name)
def create_project(self, project_name, created_on):
project = self.ks_client.tenants.create(project_name,
created_on=created_on)
return project