CiscoDevNet / ansible-dcnm

Apache License 2.0
45 stars 36 forks source link

Support additional switch role types in dcnm_inventory module #77

Closed gve-vse-tim closed 1 year ago

gve-vse-tim commented 3 years ago

Community Note

Description

Please add support for adding switches to other types of fabrics, such as External Fabric (first priority) and LAN Classic (lesser priority).

Honestly, it seems a bit limiting that the dcnm_inventory module merged the switch discovery and role assignment APIs into a single module when there was no real requirement or dependency enforcing that behavior. As a result, we get this limiting behavior where switches can't be added to DCNM solely because a role isn't in the validated input field.

Perhaps the correct approach to this feature request is simply to split the tasks into simply adding a switch to the fabric (dcnm_inventory) and assigning it a role (dcnm_role)?

New or Affected modules(s):

DCNM version

Potential ansible task config

-name: Merge switch into fabric
    cisco.dcnm.dcnm_inventory:
      fabric: external-fabric
      state: merged
      config:
       - seed_ip: 192.168.0.1
         auth_proto: MD5
         user_name: switch_username
         password: switch_password
         max_hops: 0
         role: access                                  # Valid types:  access, ToR, aggregation, etc. etc.
         preserve_config: False

References

None.

Additional context

praveenramoorthy commented 3 years ago

@gve-vse-tim Thanks for opening this issue. We will investigate and look into the feasibility of implementing this.

dsx1123 commented 3 years ago

Hi Tim, we will scope the work to support external fabric, thank you for raising these two issues.

praveenramoorthy commented 1 year ago

Added support for new switch roles as part of #222

mikewiebe commented 1 year ago

Closing since new roles added as part of https://github.com/CiscoDevNet/ansible-dcnm/pull/222