예제 #1
0
파일: cluster.py 프로젝트: ajmadsen/magnum
    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)
예제 #2
0
파일: cluster.py 프로젝트: ajmadsen/magnum
    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)
예제 #3
0
파일: cluster.py 프로젝트: ajmadsen/magnum
 def post(self, cluster):
     if cluster.node_count == 0:
         raise exception.ZeroNodeCountNotSupported()
     return self._post(cluster)
예제 #4
0
 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)