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)
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)
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 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()
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()