"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/test/fake/openstack.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

openstack.py  (buildbot-3.0.2):openstack.py  (buildbot-3.1.0)
skipping to change at line 128 skipping to change at line 128
else: else:
inst.status = ERROR inst.status = ERROR
return inst return inst
else: else:
raise NotFound raise NotFound
def delete(self, instance_id): def delete(self, instance_id):
if instance_id in self.instances: if instance_id in self.instances:
del self.instances[instance_id] del self.instances[instance_id]
def findall(self, **kwargs):
name = kwargs.get('name', None)
if name:
return list(filter(lambda item: item.name == name, self.instances.va
lues()))
return []
def find(self, **kwargs):
result = self.findall(**kwargs)
if len(result) > 0:
raise NoUniqueMatch
if len(result) == 0:
raise NotFound
return result[0]
# This is returned by Servers.create(). # This is returned by Servers.create().
class Instance(): class Instance():
def __init__(self, id, servers, boot_args, boot_kwargs): def __init__(self, id, servers, boot_args, boot_kwargs):
self.id = id self.id = id
self.servers = servers self.servers = servers
self.boot_args = boot_args self.boot_args = boot_args
self.boot_kwargs = boot_kwargs self.boot_kwargs = boot_kwargs
self.gets = 0 self.gets = 0
self.status = 'BUILD(networking)' self.status = 'BUILD(networking)'
self.name = 'name' self.metadata = boot_kwargs.get('meta', {})
try:
self.name = boot_args[0]
except IndexError:
self.name = 'name'
def delete(self): def delete(self):
self.servers.delete(self.id) self.servers.delete(self.id)
# Parts used from novaclient.exceptions. # Parts used from novaclient.exceptions.
class NotFound(Exception): class NotFound(Exception):
pass pass
class NoUniqueMatch(Exception):
pass
# Parts used from keystoneauth1. # Parts used from keystoneauth1.
def get_plugin_loader(plugin_type): def get_plugin_loader(plugin_type):
if plugin_type == 'password': if plugin_type == 'password':
return PasswordLoader() return PasswordLoader()
if plugin_type == 'token': if plugin_type == 'token':
return TokenLoader() return TokenLoader()
raise ValueError("plugin_type '{}' is not supported".format(plugin_type)) raise ValueError("plugin_type '{}' is not supported".format(plugin_type))
class PasswordLoader(): class PasswordLoader():
 End of changes. 3 change blocks. 
1 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)