def stop_and_remove_services(api): print("list clusters") for c in api.get_all_clusters(): print "cluster name:" + c.name + " cluster version:"+c.version for s in c.get_all_services(): print "service type:" + s.type + " service name:"+s.name s.stop().wait() c.delete_service(s.name) delete_cluster(api,c.name)
def delete_cluster(self, name): """ Delete a cluster by name. @param name: Cluster name @return: The deleted ApiCluster object """ return clusters.delete_cluster(self, name)