Skip to content
Permalink
Browse files

fix: qinq optional argument converted to action store

the qinq optional argument was being evaluated always as true unless
not passing anything to it.
modified the optional argument to not take any additional strings
and evaluate to true if passed.

Change-Id: I7c0d5c330b2d84d09e33772d63cd89321e5352ee
  • Loading branch information
grafuls committed Dec 12, 2019
1 parent a514a92 commit 3ccabc3888b8e32c8f89fdd7725b7cff9896c19c
Showing with 9 additions and 8 deletions.
  1. +4 −4 README.md
  2. +1 −1 bin/quads-cli
  3. +4 −3 quads/model.py
@@ -501,16 +501,16 @@ Creating a new schedule and assigning machines is currently done through the QUA

This pertains to the internal interfaces that QUADS will manage for you to move sets of hosts between environments based on a schedule. For setting up optional publicly routable VLANS please see the [QUADS public vlan setup steps](/docs/switch-host-setup.md#define-optional-public-vlans)

- VLAN design (optional, will default to `qinq: 0` below)
- VLAN design (optional, will default to `qinq: false` below)

- ```qinq: 0``` (default) qinq VLAN separation by interface: primary, secondary and beyond QUADS-managed interfaces all match the same VLAN membership across other hosts in the same cloud allocation. Each interface per host is in its own VLAN, and these match across the rest of your allocated hosts by interface (all nic1, all nic2, all nic3, all nic4 etc).
- ```qinq: false``` (default) qinq VLAN separation by interface: primary, secondary and beyond QUADS-managed interfaces all match the same VLAN membership across other hosts in the same cloud allocation. Each interface per host is in its own VLAN, and these match across the rest of your allocated hosts by interface (all nic1, all nic2, all nic3, all nic4 etc).

- ```qinq: 1``` all QUADS-managed interfaces in the same qinq VLAN
- ```qinq: true``` all QUADS-managed interfaces in the same qinq VLAN. For this to take effect you need to pass the optional argument of `--qinq` to the `--define-cloud` command.

#### Defining a New Cloud ####

```
quads-cli --define-cloud cloud03 --description "Messaging AMQ" --force --cloud-owner epresley --cc-users "jdoe jhoffa" --cloud-ticket 423625 --qinq 0
quads-cli --define-cloud cloud03 --description "Messaging AMQ" --force --cloud-owner epresley --cc-users "jdoe jhoffa" --cloud-ticket 423625 --qinq
```

- Now that you've defined your new cloud you'll want to allocate machines and a schedule.
@@ -651,7 +651,7 @@ if __name__ == '__main__':
help='date and time to query; e.g. "2016-06-01 08:00"')
parser.add_argument('--cloud-owner', dest='cloudowner', type=str, default=None, help='Define environment owner')
parser.add_argument('--cc-users', dest='ccusers', type=str, default=None, help='Define environment CC list')
parser.add_argument('--qinq', dest='qinq', type=str, default=None, help='Define environment qinq state')
parser.add_argument('--qinq', dest='qinq', action='store_true', help='Define environment qinq state')
parser.add_argument('--no-wipe', dest='wipe', action='store_false',
help='Define no wipe for safeguarding data after assignment')
parser.add_argument('--cloud-ticket', dest='cloudticket', type=str, default=None, help='Define environment ticket')
@@ -125,9 +125,10 @@ def prep_data(data):
if 'ccuser' in data:
data['ccuser'] = data['ccuser'].split()
if 'qinq' in data:
data['qinq'] = bool(data['qinq'])
else:
data['qinq'] = False
if str(data['qinq']).lower() == "false":
data["qinq"] = False
else:
data["qinq"] = True
if 'wipe' in data:
if str(data['wipe']).lower() == "false":
data["wipe"] = False

0 comments on commit 3ccabc3

Please sign in to comment.
You can’t perform that action at this time.