Skip to content

Commit

Permalink
feat: validate_env cloud flag support
Browse files Browse the repository at this point in the history
closes: #413

Change-Id: I0d3890e37ccbe63212fe03571e370fdde4b44913
  • Loading branch information
dominikvagner committed Sep 12, 2022
1 parent 3d2980f commit e611093
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ QUADS automates the future scheduling, end-to-end provisioning and delivery of b
* [Validation using Debug Mode](#validation-using-debug-mode)
* [Skipping Past Network Validation](#skipping-past-network-validation)
* [Skipping Past Foreman Validation](#skipping-past-foreman-validation)
* [Validate Only a Specific Cloud](#validate-only-a-specific-cloud)
* [Mapping Internal VLAN Interfaces to Problem Hosts](#mapping-internal-vlan-interfaces-to-problem-hosts)
* [Contact QUADS Developers](#contact-quads-developers)
* [QUADS Talks and Media](#quads-talks-and-media)
Expand Down Expand Up @@ -1337,6 +1338,13 @@ db.cloud.update({"name": "cloud23"}, {$set:{'provisioned':true}}

* More information on manual intervention and overrides via MongoDB can be [found here](/docs/interact-mongodb.md)

### Validate Only a Specific Cloud

* If you want to validate only a certain cloud you can do so by specifying the cloud's name with the `--cloud` flag.
```bash
/opt/quads/tools/validate_env.py --cloud cloud01
```

### Mapping Internal VLAN Interfaces to Problem Hosts
You might have noticed that we configure our [Foreman](https://github.com/redhat-performance/quads/tree/master/templates/foreman) templates to drop `172.{16,17,18,19}.x` internal VLAN interfaces which correspond to the internal, QUADS-managed multi-tenant interfaces across a set of hosts in a cloud assignment.

Expand Down
10 changes: 10 additions & 0 deletions quads/tools/validate_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ async def validate_env(self):

def main(_args, _loop):
clouds = Cloud.objects(validated=False, provisioned=True, name__ne="cloud01")
if _args.cloud:
clouds = [cloud for cloud in clouds if cloud.name == _args.cloud]
if len(clouds) == 0:
logger.error("No cloud with this name.")
for _cloud in clouds:
_schedule_count = Schedule.current_schedule(cloud=_cloud).count()
if _schedule_count and _cloud.wipe:
Expand All @@ -337,6 +341,12 @@ def main(_args, _loop):
default=False,
help="Show debugging information.",
)
parser.add_argument(
"--cloud",
nargs=1,
default="",
help="Run validation only on specified cloud."
)
args = parser.parse_args()

level = logging.INFO
Expand Down

0 comments on commit e611093

Please sign in to comment.