[redhat_subscription]: fixed force option. (#20667)
`force` option is not unique for non-activationkey registrations and it should be parsed separately; it is possible to register host with activation key and force such process.
This commit is contained in:
parent
47892a0034
commit
9d8c1923ab
1 changed files with 3 additions and 2 deletions
|
@ -292,6 +292,9 @@ class Rhsm(RegistrationBase):
|
||||||
args = [SUBMAN_CMD, 'register']
|
args = [SUBMAN_CMD, 'register']
|
||||||
|
|
||||||
# Generate command arguments
|
# Generate command arguments
|
||||||
|
if force_register:
|
||||||
|
args.extend(['--force'])
|
||||||
|
|
||||||
if activationkey:
|
if activationkey:
|
||||||
args.extend(['--activationkey', activationkey])
|
args.extend(['--activationkey', activationkey])
|
||||||
args.extend(['--org', org_id])
|
args.extend(['--org', org_id])
|
||||||
|
@ -308,8 +311,6 @@ class Rhsm(RegistrationBase):
|
||||||
args.extend(['--name', consumer_name])
|
args.extend(['--name', consumer_name])
|
||||||
if consumer_id:
|
if consumer_id:
|
||||||
args.extend(['--consumerid', consumer_id])
|
args.extend(['--consumerid', consumer_id])
|
||||||
if force_register:
|
|
||||||
args.extend(['--force'])
|
|
||||||
if environment:
|
if environment:
|
||||||
args.extend(['--environment', environment])
|
args.extend(['--environment', environment])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue