-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[minor_changes] Adding new module for physical interface (DCNE-50) #560
base: master
Are you sure you want to change the base?
Conversation
d67d034
to
e253d7b
Compare
sanity fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanity tests failed
tests/integration/targets/ndo_physical_interface/tasks/main.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/ndo_physical_interface/tasks/main.yml
Outdated
Show resolved
Hide resolved
The sanity fails because of a function which doesn't exist, since this function is being added in another PR #539 |
54cabb7
to
a710854
Compare
a710854
to
3e83428
Compare
3e83428
to
19e105d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
19e105d
to
fb6abdf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tests/integration/targets/ndo_physical_interface/tasks/main.yml
Outdated
Show resolved
Hide resolved
fb6abdf
to
09f6a13
Compare
09f6a13
to
f185d34
Compare
|
||
if mso.existing: | ||
proposed_payload = copy.deepcopy(match.details) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leverage the new function append_update_ops_data() here?
plugins/module_utils/mso.py
Outdated
@@ -318,6 +318,19 @@ def write_file(module, url, dest, content, resp, tmpsrc=None): | |||
os.remove(tmpsrc) | |||
|
|||
|
|||
def format_interface_descriptions(interface_descriptions, node=None): | |||
formated_interface_descriptions = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formated_interface_descriptions = [ | |
formatted_interface_descriptions = [ |
plugins/module_utils/mso.py
Outdated
for interface_description in interface_descriptions | ||
] | ||
|
||
return formated_interface_descriptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return formated_interface_descriptions | |
return formatted_interface_descriptions |
payload = { | ||
"name": name, | ||
"nodes": nodes, | ||
"interfaces": interfaces, | ||
"policyGroupType": physical_interface_type, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
payload = { | |
"name": name, | |
"nodes": nodes, | |
"interfaces": interfaces, | |
"policyGroupType": physical_interface_type, | |
} | |
mso_values = dict( | |
name = name, | |
nodes = nodes, | |
interfaces = interfaces, | |
policyGroupType = physical_interface_type, | |
) |
Our team planned to maintain the variable naming consistency for the new modules.
|
||
update_path = "{0}/{1}".format(path, match.index) | ||
|
||
if interface_descriptions == [] and proposed_payload.get("interfaceDescriptions"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a documentation note to explain the update and clear processes of the "interface_descriptions".
- nm_delete_physical_interface_again.previous == nm_delete_physical_interface_again.current == {} | ||
- nm_delete_physical_interface_again.current.uuid is not defined | ||
|
||
- name: Query all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need this task? Change the task name.
- name: Update Physical Interface of type 'breakout' by removing interface interface_descriptions | ||
cisco.mso.ndo_physical_interface: | ||
<<: *update_physical_interface_uuid | ||
interface_descriptions: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a task to update interface_descriptions
values before completely clearing it?
Could you add an element with an existing value and remove it?
check_mode: true | ||
register: cm_physical_interface | ||
|
||
- name: Create Physical Interface of type 'physical' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI appears broken, there are dangling objects for this policy without a template. This makes the testing fail.
- name: Execute tasks only for MSO version > 4.3 | ||
when: version.current.version is version('4.3', '>=') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 4.4 I think, because now CI does not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a 4.4 instance to CI for testing this func
(object: interfaceProfiles)
solves #392
it required ndo_interface_seeting module #540