Skip to content

Commit

Permalink
Lower case resource name when determining URL (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianvf authored Jan 4, 2019
1 parent d59353f commit 0750841
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions openshift/dynamic/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,12 @@ def __repr__(self):
@property
def urls(self):
full_prefix = '{}/{}'.format(self.prefix, self.group_version)
resource_name = self.name.lower()
return {
'base': '/{}/{}'.format(full_prefix, self.name),
'namespaced_base': '/{}/namespaces/{{namespace}}/{}'.format(full_prefix, self.name),
'full': '/{}/{}/{{name}}'.format(full_prefix, self.name),
'namespaced_full': '/{}/namespaces/{{namespace}}/{}/{{name}}'.format(full_prefix, self.name)
'base': '/{}/{}'.format(full_prefix, resource_name),
'namespaced_base': '/{}/namespaces/{{namespace}}/{}'.format(full_prefix, resource_name),
'full': '/{}/{}/{{name}}'.format(full_prefix, resource_name),
'namespaced_full': '/{}/namespaces/{{namespace}}/{}/{{name}}'.format(full_prefix, resource_name)
}

def path(self, name=None, namespace=None):
Expand Down

0 comments on commit 0750841

Please sign in to comment.