Example #1
0
 def delete(self, params):
     """Delete the specified node groups
            fuel --env 1 nodegroup --delete --group 1
            fuel --env 1 nodegroup --delete --group 2,3,4
     """
     ngs = NodeGroup.get_by_ids(params.group)
     for n in ngs:
         if n.name == "default":
             raise ActionException("Default node groups cannot be deleted.")
         NodeGroup.delete(n.id)
Example #2
0
 def delete(self, params):
     """Delete the specified node groups
            fuel --env 1 nodegroup --delete --group 1
            fuel --env 1 nodegroup --delete --group 2,3,4
     """
     ngs = NodeGroup.get_by_ids(params.group)
     for n in ngs:
         if n.name == "default":
             raise ActionException(
                 "Default node groups cannot be deleted."
             )
         NodeGroup.delete(n.id)
Example #3
0
 def delete(self, params):
     """Delete the specified node groups
            fuel nodegroup --delete --group 1
            fuel nodegroup --delete --group 2,3,4
     """
     ngs = NodeGroup.get_by_ids(params.group)
     for n in ngs:
         if n.name == "default":
             raise ActionException("Default node groups cannot be deleted.")
         data = NodeGroup.delete(n.id)
         self.serializer.print_to_output(
             data, u"Node group with id={id} was deleted!".format(id=n.id))
Example #4
0
 def delete(self, params):
     """Delete the specified node groups
            fuel nodegroup --delete --group 1
            fuel nodegroup --delete --group 2,3,4
     """
     ngs = NodeGroup.get_by_ids(params.group)
     for n in ngs:
         if n.name == "default":
             raise ActionException(
                 "Default node groups cannot be deleted."
             )
         data = NodeGroup.delete(n.id)
         self.serializer.print_to_output(
             data,
             u"Node group with id={id} was deleted!"
             .format(id=n.id)
         )