Ejemplo n.º 1
0
    def delete(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if not group.exists():
            return

        print("Delete group {0}...".format(args['name']))
        group.delete(connection)
Ejemplo n.º 2
0
    def delete(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if not group.exists():
            return

        print("Delete group {0}...".format(args['name']))
        group.delete(connection)
Ejemplo n.º 3
0
    def get(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if not group.exists():
            print("Error: Group does not exist: {0}".format(args['name']))
            sys.exit(1)

        group.read()
        self.jprint(group)
Ejemplo n.º 4
0
    def get(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if not group.exists():
            print("Error: Group does not exist: {0}".format(args['name']))
            sys.exit(1)

        group.read()
        self.jprint(group)
    def modify(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if not group.exists():
            print("Error: Group does not exist: {0}".format(args['name']))
            sys.exit(1)

        if args['json'] is not None:
            group = self._read(args['name'], args['json'])

        self._properties(group, args)

        print("Modify group {0}...".format(args['name']))
        group.update(connection=connection)
    def create(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if group.exists():
            print("Error: Database already exists: {0}".format(args['name']))
            sys.exit(1)

        if args['json'] is not None:
            group = self._read(args['name'], args['json'])

        self._properties(group, args)

        print("Create group {0}...".format(args['name']))
        group.create()
Ejemplo n.º 7
0
    def modify(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if not group.exists():
            print("Error: Group does not exist: {0}".format(args['name']))
            sys.exit(1)

        if args['json'] is not None:
            group = self._read(args['name'], args['json'])

        self._properties(group, args)

        print("Modify group {0}...".format(args['name']))
        group.update(connection=connection)
Ejemplo n.º 8
0
    def create(self, args, config, connection):
        group = Group(args['name'], connection=connection)
        if group.exists():
            print("Error: Database already exists: {0}".format(args['name']))
            sys.exit(1)

        if args['json'] is not None:
            group = self._read(args['name'], args['json'])

        self._properties(group, args)

        print("Create group {0}...".format(args['name']))
        group.create()