diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-03-20 14:37:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 14:37:02 -0400 |
commit | 1e7cdbde073b42da41469eb1bda5a21bff8a9bfe (patch) | |
tree | 4620c44d10c22ab9bd08af1067ea8626061e099e /roles/lib_openshift/src/lib/group.py | |
parent | f97e84388faac174e505e6737212a114d1900a9b (diff) | |
parent | 171bd68cac5d19ba6178e9288a85ef122e6fbd1a (diff) | |
download | openshift-1e7cdbde073b42da41469eb1bda5a21bff8a9bfe.tar.gz openshift-1e7cdbde073b42da41469eb1bda5a21bff8a9bfe.tar.bz2 openshift-1e7cdbde073b42da41469eb1bda5a21bff8a9bfe.tar.xz openshift-1e7cdbde073b42da41469eb1bda5a21bff8a9bfe.zip |
Merge pull request #3703 from kwoodson/oc_group
Adding oc_group to lib_openshift.
Diffstat (limited to 'roles/lib_openshift/src/lib/group.py')
-rw-r--r-- | roles/lib_openshift/src/lib/group.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/lib/group.py b/roles/lib_openshift/src/lib/group.py new file mode 100644 index 000000000..fac5fcbc2 --- /dev/null +++ b/roles/lib_openshift/src/lib/group.py @@ -0,0 +1,36 @@ +# pylint: skip-file +# flake8: noqa + + +class GroupConfig(object): + ''' Handle route options ''' + # pylint: disable=too-many-arguments + def __init__(self, + sname, + namespace, + kubeconfig): + ''' constructor for handling group options ''' + self.kubeconfig = kubeconfig + self.name = sname + self.namespace = namespace + self.data = {} + + self.create_dict() + + def create_dict(self): + ''' return a service as a dict ''' + self.data['apiVersion'] = 'v1' + self.data['kind'] = 'Group' + self.data['metadata'] = {} + self.data['metadata']['name'] = self.name + self.data['users'] = None + + +# pylint: disable=too-many-instance-attributes +class Group(Yedit): + ''' Class to wrap the oc command line tools ''' + kind = 'group' + + def __init__(self, content): + '''Group constructor''' + super(Group, self).__init__(content=content) |