def patch(self, cluster_ident, patch): """Update an existing Cluster. :param cluster_ident: UUID or logical name of a cluster. :param patch: a json PATCH document to apply to this cluster. """ (cluster, node_count, health_status, health_status_reason) = self._patch(cluster_ident, patch) if node_count == 0: raise exception.ZeroNodeCountNotSupported() pecan.request.rpcapi.cluster_update_async(cluster, node_count, health_status, health_status_reason) return ClusterID(cluster.uuid)
def patch(self, cluster_ident, rollback=False, patch=None): # noqa """Update an existing Cluster. :param cluster_ident: UUID or logical name of a cluster. :param rollback: whether to rollback cluster on update failure. :param patch: a json PATCH document to apply to this cluster. """ (cluster, node_count, health_status, health_status_reason) = self._patch(cluster_ident, patch) if node_count == 0: raise exception.ZeroNodeCountNotSupported() pecan.request.rpcapi.cluster_update_async(cluster, node_count, health_status, health_status_reason, rollback) return ClusterID(cluster.uuid)
def post(self, cluster): if cluster.node_count == 0: raise exception.ZeroNodeCountNotSupported() return self._post(cluster)
def resize(self, cluster_ident, cluster_resize_req): if cluster_resize_req.node_count == 0: raise exception.ZeroNodeCountNotSupported() return self._resize(cluster_ident, cluster_resize_req)