Commit 5cc49625 by chenke

Fix undefined name 'api_dep' error in

Aslo Delete the module imported but unused and fix the module
imported not in alphabetical order.

Change-Id: Ica1ec08fb6dced4997c98197625d15df65aef1dd
parent 6a0c367c
......@@ -19,16 +19,13 @@ from six.moves import http_client
import wsme
from wsme import types as wtypes
from cyborg.agent.rpcapi import AgentAPI
from cyborg.api.controllers import base
from cyborg.api.controllers import link
from cyborg.api.controllers.v1 import types
from cyborg.api.controllers.v1 import utils as api_utils
from cyborg.api import expose
from cyborg.common import exception
from cyborg.common import policy
from cyborg import objects
from cyborg.quota import QUOTAS
from cyborg.agent.rpcapi import AgentAPI
class Deployable(base.APIBase):
......@@ -208,14 +205,13 @@ class DeployablesController(base.CyborgController):
:param patch: a json PATCH document to apply to this deployable.
context = pecan.request.context
reservations = None
obj_dep = objects.Deployable.get(context, uuid)
# Update only the fields that have changed
for field in objects.Deployable.fields:
patch_val = getattr(api_dep, field)
patch_val = getattr(obj_dep, field)
except AttributeError:
# Ignore fields that aren't exposed in the API
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment