Skip to content

Commit

Permalink
Add list_url on all relevant resources
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindio committed Mar 6, 2018
1 parent fc426d9 commit f6bca1b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions k8s/models/configmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

class ConfigMap(Model):
class Meta:
list_url = "/api/v1/configmaps"
url_template = "/api/v1/namespaces/{namespace}/configmaps/{name}"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DeploymentStatus(Model):

class Deployment(Model):
class Meta:
list_url = "/apis/extensions/v1beta1/deployments"
url_template = "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class IngressSpec(Model):

class Ingress(Model):
class Meta:
list_url = "/apis/extensions/v1beta1/ingresses"
url_template = "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class JobSpec(Model):

class Job(Model):
class Meta:
list_url = "/apis/batch/v1/jobs"
url_template = "/apis/batch/v1/namespaces/{namespace}/jobs"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class PodTemplateSpec(Model):

class Pod(Model):
class Meta:
list_url = "/api/v1/pods"
url_template = "/api/v1/namespaces/{namespace}/pods/{name}"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/pod_disruption_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class PodDisruptionBudgetSpec(Model):

class PodDisruptionBudget(Model):
class Meta:
list_url = "/apis/policy/v1beta1/poddisruptionbudgets"
url_template = "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/replication_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ReplicationControllerSpec(Model):

class ReplicationController(Model):
class Meta:
list_url = "/api/v1/replicationcontrollers"
url_template = "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/resourcequota.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ResourceQuotaStatus(Model):

class ResourceQuota(Model):
class Meta:
list_url = "/api/v1/resourcequotas"
url_template = "/api/v1/namespaces/{namespace}/resourcequotas"

metadata = Field(ObjectMeta)
Expand Down
1 change: 1 addition & 0 deletions k8s/models/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ServiceSpec(Model):

class Service(Model):
class Meta:
list_url = "/api/v1/services"
url_template = "/api/v1/namespaces/{namespace}/services/{name}"

metadata = Field(ObjectMeta)
Expand Down

0 comments on commit f6bca1b

Please sign in to comment.