fixing pep8 things
This commit is contained in:
parent
acbbdf1027
commit
484ec68acc
@ -44,7 +44,7 @@ reddwarf_proxy_admin_user = admin
|
||||
reddwarf_proxy_admin_pass = 3de4922d8b6ac5a1aad9
|
||||
reddwarf_proxy_admin_tenant_name = admin
|
||||
reddwarf_auth_url = http://0.0.0.0:5000/v2.0
|
||||
reddwarf_tenant_id = 60fdac4a02aa4a8e87d772c61081b16a
|
||||
reddwarf_tenant_id = configfile
|
||||
|
||||
|
||||
# ============ notifer queue kombu connection options ========================
|
||||
|
@ -44,6 +44,9 @@ class Config(object):
|
||||
|
||||
@classmethod
|
||||
def get(cls, key, default=None):
|
||||
print cls
|
||||
print key
|
||||
print default
|
||||
return cls.instance.get(key, default)
|
||||
|
||||
@classmethod
|
||||
|
@ -47,4 +47,3 @@ class InvalidRPCConnectionReuse(ReddwarfError):
|
||||
class NotFound(ReddwarfError):
|
||||
|
||||
message = _("Resource %(uuid)s cannot be found")
|
||||
|
||||
|
@ -38,7 +38,8 @@ PROXY_ADMIN_TENANT_NAME = CONFIG.get('reddwarf_proxy_admin_tenant_name',
|
||||
'admin')
|
||||
PROXY_AUTH_URL = CONFIG.get('reddwarf_auth_url', 'http://0.0.0.0:5000/v2.0')
|
||||
PROXY_TENANT_ID = CONFIG.get('reddwarf_tenant_id',
|
||||
'f5f71240a97c411e977452370422d7cc')
|
||||
'60fdac4a02aa4a8e87d772c61081b16a')
|
||||
print "PROXY_TENANT_ID : %s" % PROXY_TENANT_ID
|
||||
|
||||
|
||||
class ModelBase(object):
|
||||
@ -135,10 +136,11 @@ class Instance(RemoteModelBase):
|
||||
except nova_exceptions.ClientException, e:
|
||||
raise rd_exceptions.ReddwarfError()
|
||||
|
||||
|
||||
@classmethod
|
||||
def create(cls, proxy_token, name, image_id, flavor):
|
||||
srv = cls.get_client(proxy_token).servers.create(name, image_id, flavor)
|
||||
srv = cls.get_client(proxy_token).servers.create(name,
|
||||
image_id,
|
||||
flavor)
|
||||
return Instance(server=srv)
|
||||
|
||||
|
||||
|
@ -54,15 +54,16 @@ class InstanceController(BaseController):
|
||||
|
||||
def show(self, req, tenant_id, id):
|
||||
"""Return a single instance."""
|
||||
server = models.Instance(proxy_token=req.headers["X-Auth-Token"], uuid=id).data()
|
||||
server = models.Instance(proxy_token=req.headers["X-Auth-Token"],
|
||||
uuid=id).data()
|
||||
#TODO(cp16net): need to set the return code correctly
|
||||
return wsgi.Result(views.InstanceView(server).data(), 201)
|
||||
|
||||
def delete(self, req, tenant_id, id):
|
||||
"""Delete a single instance."""
|
||||
|
||||
models.Instance.delete(proxy_token=req.headers["X-Auth-Token"], uuid=id)
|
||||
|
||||
models.Instance.delete(proxy_token=req.headers["X-Auth-Token"],
|
||||
uuid=id)
|
||||
|
||||
# TODO(hub-cap): fixgure out why the result is coming back as None
|
||||
LOG.info("result of delete %s" % result)
|
||||
|
@ -317,6 +317,8 @@ def load_paste_app(app_name, options, args, config_dir=None):
|
||||
|
||||
|
||||
def get_option(options, option, **kwargs):
|
||||
print __name__
|
||||
print options
|
||||
if option in options:
|
||||
value = options[option]
|
||||
type_ = kwargs.get('type', 'str')
|
||||
|
Loading…
Reference in New Issue
Block a user