This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8283 from aljazkosir/test-nuage-automation-class
[1LP][RFR] Ensure Nuage AE Class contains auth attributes in AE Schema
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
def test_auth_attributes_of_nuage_ae_class(appliance): | ||
""" | ||
Ensure Nuage AE Class contains auth attributes in AE Schema | ||
""" | ||
expected_fields = ['nuage_password', 'nuage_username', 'nuage_enterprise', 'nuage_url', | ||
'nuage_api_version'] | ||
manageiq_domain = appliance.collections.domains.instantiate(name='ManageIQ') | ||
system_namespace = manageiq_domain.namespaces.instantiate(name='System') | ||
event_namespace = system_namespace.namespaces.instantiate(name='Event') | ||
ems_event_namespace = event_namespace.namespaces.instantiate(name='EmsEvent') | ||
nuage_class = ems_event_namespace.classes.instantiate(name='Nuage') | ||
schema_fields = nuage_class.schema.schema_field_names | ||
|
||
assert all(expected in schema_fields for expected in expected_fields) |