Beispiel #1
0
 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)
Beispiel #4
0
    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))
Beispiel #8
0
 def _read(self):
     jf = open(jsonfile).read()
     data = json.loads(jf)
     cluster = ForeignCluster.unmarshal(data)
     return cluster
Beispiel #9
0
 def get(self, args, config, connection):
     cluster = ForeignCluster(args['name'], connection=connection)
     cluster.read()
     self.jprint(cluster)
Beispiel #10
0
 def list(self, args, config, connection):
     print(ForeignCluster.list(connection))