Browse Source

Fixed
name and selector to be mutually exclusive

Kenny Woodson 8 years ago
parent
commit
68a20d2d63

+ 1 - 1
roles/lib_openshift/library/oc_adm_router.py

@@ -2689,7 +2689,7 @@ class Router(OpenShiftCLI):
         self.secret = None
         self.rolebinding = None
         for part in self.router_parts:
-            result = self._get(part['kind'], rname=part['name'])
+            result = self._get(part['kind'], name=part['name'])
             if result['returncode'] == 0 and part['kind'] == 'dc':
                 self.deploymentconfig = DeploymentConfig(result['results'][0])
             elif result['returncode'] == 0 and part['kind'] == 'svc':

+ 1 - 1
roles/lib_openshift/library/oc_obj.py

@@ -1647,7 +1647,7 @@ def main():
             force=dict(default=False, type='bool'),
             selector=dict(default=None, type='str'),
         ),
-        mutually_exclusive=[["content", "files"]],
+        mutually_exclusive=[["content", "files"],["selector", "name"]],
 
         supports_check_mode=True,
     )

+ 1 - 1
roles/lib_openshift/src/ansible/oc_obj.py

@@ -23,7 +23,7 @@ def main():
             force=dict(default=False, type='bool'),
             selector=dict(default=None, type='str'),
         ),
-        mutually_exclusive=[["content", "files"]],
+        mutually_exclusive=[["content", "files"],["selector", "name"]],
 
         supports_check_mode=True,
     )

+ 1 - 1
roles/lib_openshift/src/class/oc_adm_router.py

@@ -136,7 +136,7 @@ class Router(OpenShiftCLI):
         self.secret = None
         self.rolebinding = None
         for part in self.router_parts:
-            result = self._get(part['kind'], rname=part['name'])
+            result = self._get(part['kind'], name=part['name'])
             if result['returncode'] == 0 and part['kind'] == 'dc':
                 self.deploymentconfig = DeploymentConfig(result['results'][0])
             elif result['returncode'] == 0 and part['kind'] == 'svc':