Merge "Get gid and uid methods are now members of HeatBaseLauncher"

This commit is contained in:
Zuul 2021-02-22 11:43:03 +00:00 committed by Gerrit Code Review
commit 8d16633e7f
1 changed files with 6 additions and 6 deletions

View File

@ -244,6 +244,12 @@ heat.filter_factory = heat.api.openstack:version_negotiation_filter
with open(config_file, 'w') as temp_file:
temp_file.write(ks_token)
def get_heat_uid(self):
return pwd.getpwnam(self.user).pw_uid
def get_heat_gid(self):
return grp.getgrnam(self.user).gr_gid
class HeatContainerLauncher(HeatBaseLauncher):
@ -347,11 +353,5 @@ class HeatNativeLauncher(HeatBaseLauncher):
subprocess.check_call(['heat-manage', '--config-file',
self.config_file, 'db_sync'])
def get_heat_uid(self):
return pwd.getpwnam(self.user).pw_uid
def get_heat_gid(self):
return grp.getgrnam(self.user).gr_gid
def kill_heat(self, pid):
os.kill(pid, signal.SIGKILL)