Commit 82f0a8f9 authored by Marco Mariani's avatar Marco Mariani

--only and --all are mutually exclusive

parent e58e7363
...@@ -214,18 +214,13 @@ node software ...@@ -214,18 +214,13 @@ node software
.. program-output:: python slapos help node software .. program-output:: python slapos help node software
Parameters:
***********
--only_sr URL Only process one specific Software Release that has been supplied on this Computer. If not supplied: do nothing.
--all Process all Software Releases, even already installed.
Return values: Return values:
************** **************
(Among other standard Python return values) (Among other standard Python return values)
* 0 Everything went fine * 0 Everything went fine
* 1 At least one software hasn't correctly been installed. * 1 At least one software was not correctly installed.
node instance node instance
...@@ -234,18 +229,13 @@ node instance ...@@ -234,18 +229,13 @@ node instance
.. program-output:: python slapos help node instance .. program-output:: python slapos help node instance
Parameters:
***********
--only_cp PARTITION Only process one specific Computer Partition, if possible.
--all Force processing all Computer Partitions.
Return values: Return values:
************** **************
(Among other standard Python return values) (Among other standard Python return values)
* 0 Everything went fine * 0 Everything went fine
* 1 At least one instance hasn't correctly been processed. * 1 At least one instance was not correctly processed.
* 2 At least one promise has failed. * 2 At least one promise has failed.
......
...@@ -89,12 +89,14 @@ class SoftwareCommand(SlapgridCommand): ...@@ -89,12 +89,14 @@ class SoftwareCommand(SlapgridCommand):
def get_parser(self, prog_name): def get_parser(self, prog_name):
ap = super(SoftwareCommand, self).get_parser(prog_name) ap = super(SoftwareCommand, self).get_parser(prog_name)
ap.add_argument('--all', action='store_true',
help='Launch slapgrid to process all Softare Releases.') only = ap.add_mutually_exclusive_group()
ap.add_argument('--only-sr', '--only', only.add_argument('--all', action='store_true',
help='Force the update of a single software release (can be full URL or MD5 hash), ' help='Process all Software Releases, even if already installed.')
'even if is already installed. This option will make all other ' only.add_argument('--only-sr', '--only',
'sofware releases be ignored.') help='Force the update of a single software release (can be full URL or MD5 hash), '
'even if is already installed. This option will make all other '
'sofware releases be ignored.')
return ap return ap
...@@ -108,12 +110,14 @@ class InstanceCommand(SlapgridCommand): ...@@ -108,12 +110,14 @@ class InstanceCommand(SlapgridCommand):
def get_parser(self, prog_name): def get_parser(self, prog_name):
ap = super(InstanceCommand, self).get_parser(prog_name) ap = super(InstanceCommand, self).get_parser(prog_name)
ap.add_argument('--all', action='store_true',
help='Launch slapgrid to process all Computer Partitions.') only = ap.add_mutually_exclusive_group()
ap.add_argument('--only-cp', '--only', only.add_argument('--all', action='store_true',
help='Update a single or a list of computer partitions ' help='Process all Computer Partitions.')
'(ie.:slappartX, slappartY), ' only.add_argument('--only-cp', '--only',
'this option will make all other computer partitions be ignored.') help='Update a single or a list of computer partitions '
'(ie.:slappartX, slappartY), '
'this option will make all other computer partitions be ignored.')
return ap return ap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment