def bootstrap_hosts(self,args, config, connection): cluster = ForeignCluster(connection=connection) cluster.read() hosts = [] for host in cluster.bootstrap_hosts(): hosts.append(host.host_name()) print(json.dumps(hosts, sort_keys=True, indent=2))
def bootstrap_hosts(self, args, config, connection): cluster = ForeignCluster(connection=connection) cluster.read() hosts = [] for host in cluster.bootstrap_hosts(): hosts.append(host.host_name()) print(json.dumps(hosts, sort_keys=True, indent=2))
def modify(self, args, config, connection): cluster = ForeignCluster(args['name'], connection=connection) if args['json'] is not None: cluster = self._read() self._properties(cluster, args) print("Modify cluster...") cluster.update(connection=connection)
def modify(self, args, config, connection): cluster = ForeignCluster(args['name'],connection=connection) if args['json'] is not None: cluster = self._read() self._properties(cluster, args) print("Modify cluster...") cluster.update(connection=connection)
def _read(self): jf = open(jsonfile).read() data = json.loads(jf) cluster = ForeignCluster.unmarshal(data) return cluster
def get(self, args, config, connection): cluster = ForeignCluster(args['name'], connection=connection) cluster.read() self.jprint(cluster)
def list(self, args, config, connection): print(ForeignCluster.list(connection))
def _read(self): jf = open(jsonfile).read() data = json.loads(jf) cluster = ForeignCluster.unmarshal(data) return cluster
def get(self, args, config, connection): cluster = ForeignCluster(args['name'], connection=connection) cluster.read() self.jprint(cluster)
def list(self, args, config, connection): print(ForeignCluster.list(connection))