Skip to content

Commit

Permalink
slight change in return values
Browse files Browse the repository at this point in the history
  • Loading branch information
breimers committed Apr 28, 2020
1 parent 185bb8c commit 07b33aa
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions kubernetes_manager/models/kube.py
Expand Up @@ -43,7 +43,7 @@ def deploy(self):
api_response = api_instance.create_namespace(body=body,)
self.exists = True
self.save()
return str(api_response.status)
return str(api_response)

def remove(self):
"""
Expand All @@ -53,7 +53,7 @@ def remove(self):
api_response = api_instance.delete_namespace(name=self.slug,)
self.exists = False
self.save()
return str(api_response.status)
return str(api_response)


class KubernetesVolume(KubernetesBase):
Expand Down Expand Up @@ -168,7 +168,7 @@ def deploy(self):
api_response = api_instance.create_namespaced_config_map(body=body, namespace=self.namespace.slug)
self.kuid = api_response.metadata.uid
self.save()
return str(api_response.status)
return str(api_response)

def remove(self):
"""
Expand All @@ -178,7 +178,7 @@ def remove(self):
api_response = api_instance.delete_namespaced_config_map(name=self.slug, namespace=self.namespace.slug)
self.kuid = None
self.save()
return str(api_response.status)
return str(api_response)


class KubernetesPodTemplate(KubernetesMetadataObjBase):
Expand Down Expand Up @@ -255,7 +255,7 @@ def deploy(self):
sleep(1)
self.kuid = api_response.metadata.uid
self.save()
return str(api_response.status)
return str(api_response)

def remove(self):
"""
Expand All @@ -265,7 +265,7 @@ def remove(self):
api_response = api_instance.delete_namespaced_deployment(name=self.slug, namespace=self.namespace.slug)
self.kuid = None
self.save()
return str(api_response.status)
return str(api_response)


class KubernetesJob(KubernetesNetworkingBase, KubernetesTelemetryMixin):
Expand Down Expand Up @@ -301,7 +301,7 @@ def deploy(self):
api_response = api_instance.create_namespaced_job(body=body, namespace=self.namespace.slug)
self.kuid = api_response.metadata.uid
self.save()
return str(api_response.status)
return str(api_response)

def remove(self):
"""
Expand All @@ -311,7 +311,7 @@ def remove(self):
api_response = api_instance.delete_namespaced_job(name=self.slug, namespace=self.namespace.slug)
self.kuid = None
self.save()
return str(api_response.status)
return str(api_response)


class KubernetesService(KubernetesNetworkingBase):
Expand Down Expand Up @@ -348,7 +348,7 @@ def deploy(self):
api_response = api_instance.create_namespaced_service(body=body, namespace=self.namespace.slug)
self.kuid = api_response.metadata.uid
self.save()
return str(api_response.status)
return str(api_response)

def remove(self):
"""
Expand All @@ -358,7 +358,7 @@ def remove(self):
api_response = api_instance.delete_namespaced_service(name=self.slug, namespace=self.namespace.slug)
self.kuid = None
self.save()
return str(api_response.status)
return str(api_response)


class KubernetesIngress(KubernetesNetworkingBase):
Expand Down Expand Up @@ -409,7 +409,7 @@ def deploy(self):
api_response = api_instance.create_namespaced_ingress(body=body, namespace=self.namespace.slug)
self.kuid = api_response.metadata.uid
self.save()
return str(api_response.status)
return str(api_response)

def remove(self):
"""
Expand All @@ -419,4 +419,4 @@ def remove(self):
api_response = api_instance.delete_namespaced_ingress(name=self.slug, namespace=self.namespace.slug)
self.kuid = None
self.save()
return str(api_response.status)
return str(api_response)

0 comments on commit 07b33aa

Please sign in to comment.