group.py 971 B

123456789101112131415161718192021222324252627282930313233343536
  1. # pylint: skip-file
  2. # flake8: noqa
  3. class GroupConfig(object):
  4. ''' Handle route options '''
  5. # pylint: disable=too-many-arguments
  6. def __init__(self,
  7. sname,
  8. namespace,
  9. kubeconfig):
  10. ''' constructor for handling group options '''
  11. self.kubeconfig = kubeconfig
  12. self.name = sname
  13. self.namespace = namespace
  14. self.data = {}
  15. self.create_dict()
  16. def create_dict(self):
  17. ''' return a service as a dict '''
  18. self.data['apiVersion'] = 'v1'
  19. self.data['kind'] = 'Group'
  20. self.data['metadata'] = {}
  21. self.data['metadata']['name'] = self.name
  22. self.data['users'] = None
  23. # pylint: disable=too-many-instance-attributes
  24. class Group(Yedit):
  25. ''' Class to wrap the oc command line tools '''
  26. kind = 'group'
  27. def __init__(self, content):
  28. '''Group constructor'''
  29. super(Group, self).__init__(content=content)