Skip to content
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

cisco.ucs.ucs_vnic_template #24

Open
TDC-MJU opened this issue Apr 9, 2021 · 3 comments
Open

cisco.ucs.ucs_vnic_template #24

TDC-MJU opened this issue Apr 9, 2021 · 3 comments

Comments

@TDC-MJU
Copy link

TDC-MJU commented Apr 9, 2021

Hi there
when i use cisco.ucs.ucs_vnic_template to update a vnic template, i can see that any settings that is not defined in the playbook,will be set to default. In my case, LLDP profile and QOS profile will be set to default (none)

  • name: Configure vNIC template
    cisco.ucs.ucs_vnic_template:
    <<: *aci_login
    template_type: updating-template
    name: vm-network-a
    peer_redundancy_template: vm-network-b
    org_dn: org-root/org-hx-clu-01-dc1
    redundancy_type: primary
    fabric: A-B
    vlans_list:
    • name: "{{ item.hyperflex_vlan}}"
      native: 'no'
      with_items: '{{ aci_model_data|aci_listify("hyperflex") }}'
@bakrir
Copy link

bakrir commented Apr 10, 2021

Hi @TDC-MJU ,

Sounds like you are trying to change some LLDP and QOS profile settings. If you have a look at the ucs_vnic_template module (or python code) directly, it takes the following parameters:

    argument_spec.update(
        org_dn=dict(type='str', default='org-root'),
        name=dict(type='str', required=True),
        description=dict(type='str', aliases=['descr'], default=''),
        fabric=dict(type='str', default='A', choices=['A', 'B', 'A-B', 'B-A']),
        redundancy_type=dict(type='str', default='none', choices=['none', 'primary', 'secondary']),
        peer_redundancy_template=dict(type='str', aliases=['peer_redundancy_templ'], default=''),
        target=dict(type='str', default='adapter', choices=['adapter', 'vm']),
        template_type=dict(type='str', default='initial-template', choices=['initial-template', 'updating-template']),
        vlans_list=dict(type='list'),
        cdn_source=dict(type='str', default='vnic-name', choices=['vnic-name', 'user-defined']),
        cdn_name=dict(type='str', default=''),
        mtu=dict(type='str', default='1500'),
        mac_pool=dict(type='str', default=''),
        qos_policy=dict(type='str', default=''),
        network_control_policy=dict(type='str', default=''),
        pin_group=dict(type='str', default=''),
        stats_policy=dict(type='str', default='default'),
        state=dict(type='str', default='present', choices=['present', 'absent']),
    )

Based on the above, I don't think LLDP is optional parameter (future PR maybe?) but you can change the qos_policy. You can see default='' is what will be used if a value is not set. Here is an example that includes those parameters:

- name: TEST-vNIC0
  fabric: A-B
  descr: 
  template_type: updating-template
  mac_pool: MAC-A
  network_control_policy: default
  parent_mo_or_dn: org-root/org-TEST
  mtu: '9000'
  qos_policy: 'MTU'
  vlans_list:
  - name: VLAN10
    native: 'yes'

I hope that helps.

@Adam8005
Copy link

Yeah, definitely just ran into this. Everything was reset template type, mac pool, etc. That was a bit unexpected when I was just adding a vlan to the vnic.

@nurseandthenerd
Copy link
Contributor

This definitely needs to be fixed. This bug took down almost our whole organization. We automated adding/removing vlans from ucs, which included vlan groups. the code removes the vlan from the vnic template but because we only had the vlan_list defined and not template_type it changed the template type from updating to initil, then the vlan was removed from the vlan group and all of the service profiles associated with the vnic templates unpinned their nics because the Service Profiles didn't update when the vlan was removed from the vnic template and couldn't pin to an interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants