Merge "Update log message and some functions in kube.py"

This commit is contained in:
Jenkins 2014-12-22 21:48:14 +00:00 committed by Gerrit Code Review
commit 0aee0c9166
1 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ class Handler(object):
return service return service
def service_update(self, context, service): def service_update(self, context, service):
LOG.debug("service_create") LOG.debug("service_update")
# trigger a kubectl command # trigger a kubectl command
status = self.kube_cli.service_update(service) status = self.kube_cli.service_update(service)
if not status: if not status:
@ -86,11 +86,11 @@ class Handler(object):
def pod_update(self, context, pod): def pod_update(self, context, pod):
LOG.debug("pod_update") LOG.debug("pod_update")
# trigger a kubectl command # trigger a kubectl command
status = self.kube_cli.pod_create(pod) status = self.kube_cli.pod_update(pod)
if not status: if not status:
return None return None
# call the pod object to persist in db # call the pod object to persist in db
pod.create(context) pod.refresh(context)
return pod return pod
def pod_list(self, context): def pod_list(self, context):
@ -100,7 +100,7 @@ class Handler(object):
def pod_delete(self, context, pod): def pod_delete(self, context, pod):
LOG.debug("pod_delete ") LOG.debug("pod_delete ")
# trigger a kubectl command # trigger a kubectl command
status = self.kube_cli.service_delete(pod.uuid) status = self.kube_cli.pod_delete(pod.uuid)
if not status: if not status:
return None return None
# call the pod object to persist in db # call the pod object to persist in db