(self, cluster_id,  nodegroup_id)
Delete NodeGroup for a given project_id and resource.

        :param cluster_id: cluster id.
        :param nodegroup_id: resource name.
Delete NodeGroup for a given project_id and resource.
Delete NodeGroup for a given project_id and resource .
def delete(self, cluster_id,  nodegroup_id):
        """Delete NodeGroup for a given project_id and resource.

        :param cluster_id: cluster id.
        :param nodegroup_id: resource name.
        """
        context = pecan.request.context
        policy.enforce(context, 'nodegroup:delete', action='nodegroup:delete')
        cluster = api_utils.get_resource('Cluster', cluster_id)
        nodegroup = objects.NodeGroup.get(context, cluster.uuid, nodegroup_id)
        if nodegroup.is_default:
            raise exception.DeletingDefaultNGNotSupported()
        pecan.request.rpcapi.nodegroup_delete_async(cluster, nodegroup)
def delete ( self , cluster_id , nodegroup_id ) : context = pecan . request . context policy . enforce ( context , 'nodegroup:delete' , action = 'nodegroup:delete' ) cluster = api_utils . get_resource ( 'Cluster' , cluster_id ) nodegroup = objects . NodeGroup . get ( context , cluster . uuid , nodegroup_id ) if nodegroup . is_default : raise exception . DeletingDefaultNGNotSupported ( ) pecan . request . rpcapi . nodegroup_delete_async ( cluster , nodegroup )