PARALLAX

intersight_port_policy

Manage Port Policies for Cisco Intersight

Collection: cisco.intersight

Full Name: cisco.intersight.intersight_port_policy

Synopsis

Manage Port Policies for Cisco Intersight

Parameters

NameTypeRequiredDefaultDescription
api_private_keystringFilename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt_string –vault-id tme@/Users/dsoper/Documents/vault_password_file ‘—–BEGIN EC PRIVATE KEY—– —–END EC PRIVATE KEY—–’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. Required if I(api_bearer_token) is not provided. Secret value; omitted from logs and results.
api_uristringhttps://intersight.com/api/v1URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used.
api_key_idstringPublic API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. Required if I(api_bearer_token) is not provided.
api_bearer_tokenstringBearer token for OAuth2 authentication with the Intersight API. When provided, I(api_key_id) and I(api_private_key) are not required and the C(cryptography) Python library is not needed. If not set, the value of the INTERSIGHT_API_BEARER_TOKEN environment variable is used. Secret value; omitted from logs and results.
validate_certsbooltrueBoolean control for verifying the api_uri TLS certificate
use_proxybooltrueIf C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
statestringpresentIf C(present), will verify the resource is present and will create if needed. If C(absent), will verify the resource is absent and will delete if needed. Choices: present, absent
organizationstringdefaultThe name of the Organization this resource is assigned to. Policies created within a Custom Organization are applicable only to devices in the same Organization. Use ‘default’ for the default organization.
namestringyesThe name assigned to the Port Policy. Must be unique within the organization. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_.
descriptionstringThe user-defined description for the Port Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
tagslistList of tags in Key: Value: format.
device_modelstringThe device model for which the Port Policy is intended. Different models support different port configurations and capabilities. Required when C(state=present). UCS-FI-6454: 54 ports (1-54), FC ports 1-16, breakout ports 49-54 UCS-FI-64108: 108 ports (1-108), FC ports 1-16, breakout ports 97-108, 1Gbps only on ports 89-96, 40/100Gbps only on ports 97-108 UCS-FI-6536: 36 ports (1-36), FC only via breakout ports 33-36, all ports support breakout, 1Gbps only on ports 9-10 UCS-FI-6664: 64 ports (1-64), FC ports 25-40, no breakout support, 40/100Gbps only on ports 1-24 and 41-64 UCSX-S9108-100G: 8 ports (1-8), FC only via breakout ports 1-2, 1Gbps only on ports 7-8 Choices: UCS-FI-6454, UCS-FI-64108, UCS-FI-6536, UCS-FI-6664, UCSX-S9108-100G
fc_port_modedictConfigure Fibre Channel port mode for a range of ports. This converts Ethernet ports to Fibre Channel ports. Only one FC port mode configuration is allowed per policy. Device-specific FC port ranges apply (see device_model documentation). For UCS-FI-6536 and UCSX-S9108-100G, fc_port_mode is not supported. FC functionality is available through breakout ports only. If specified, this parameter will be ignored with a warning. Nested options: port_id_start (int) default=1; port_id_end (int) required; state (str) default=present
breakout_portslistList of breakout port configurations. Breakout ports allow splitting a high-speed port into multiple lower-speed ports. Device-specific breakout support applies (see device_model documentation). UCS-FI-6664 does not support breakout ports at all. Nested options: port_id (int) required; custom_mode (str) required; state (str) default=present
server_portslistList of server port configurations. Server ports connect to server adapters. Nested options: port_id (str) required; fec (str) default=Auto; manual_numbering (bool) default=false; user_label (str); preferred_device_type (str); preferred_device_id (int); state (str) default=present
ethernet_uplink_port_channelslistList of Ethernet uplink port channel configurations. Port channels aggregate multiple Ethernet ports into a single logical link. Nested options: pc_id (int) required; admin_speed (str) default=Auto; fec (str) default=Auto; user_label (str); ports (list) required {Nested options: port_id (str) required}; eth_network_group_policy_names (list); flow_control_policy_name (str); link_aggregation_policy_name (str); link_control_policy_name (str); state (str) default=present
fc_uplink_port_channelslistList of FC uplink port channel configurations. Port channels aggregate multiple FC ports into a single logical link. Only applicable when fc_port_mode is configured. Nested options: pc_id (int) required; admin_speed (str) default=16Gbps; vsan_id (int) default=1; user_label (str); ports (list) required {Nested options: port_id (str) required}; state (str) default=present
fcoe_uplink_port_channelslistList of FCoE uplink port channel configurations. Port channels provide Fibre Channel over Ethernet connectivity. Nested options: pc_id (int) required; admin_speed (str) default=Auto; fec (str) default=Auto; user_label (str); ports (list) required {Nested options: port_id (str) required}; link_aggregation_policy_name (str); link_control_policy_name (str); state (str) default=present
appliance_port_channelslistList of appliance port channel configurations. Port channels for direct-attached storage connectivity. Nested options: pc_id (int) required; admin_speed (str) default=Auto; fec (str) default=Auto; priority (str) default=Best Effort; mode (str) default=trunk; user_label (str); ports (list) required {Nested options: port_id (str) required}; eth_network_group_policy_name (str) required; eth_network_control_policy_name (str) required; link_aggregation_policy_name (str); state (str) default=present
pin_groupslistList of pin group configurations (both LAN and SAN). Pin groups control traffic distribution across uplinks. LAN pin groups are used for Ethernet uplink ports and port channels. SAN pin groups are used for FCoE uplink ports and port channels. Nested options: name (str) required; pin_group_type (str) required; target_interface_type (str) required; target_interface_name (str) required; state (str) default=present
fc_uplink_portslistList of FC Uplink port configurations. FC Uplink ports are used for Fibre Channel connectivity to storage networks. For UCS-FI-6454, UCS-FI-64108, UCS-FI-6664 requires fc_port_mode configuration. For UCS-FI-6536, UCSX-S9108-100G uses FC breakout ports (no fc_port_mode needed). Nested options: port_id (str) required; admin_speed (str) default=Auto; vsan_id (int) required; user_label (str); state (str) default=present
fc_storage_portslistList of FC Storage port configurations. FC Storage ports are used for direct storage connectivity. For UCS-FI-6454, UCS-FI-64108, UCS-FI-6664 requires fc_port_mode configuration. For UCS-FI-6536, UCSX-S9108-100G uses FC breakout ports (no fc_port_mode needed). Nested options: port_id (str) required; admin_speed (str) default=8Gbps; vsan_id (int) required; user_label (str); state (str) default=present
appliance_portslistList of Appliance port configurations. Appliance ports are used for direct-attached storage connectivity. Nested options: port_id (str) required; admin_speed (str) default=Auto; fec (str) default=Auto; priority (str) default=Best Effort; mode (str) default=trunk; eth_network_group_policy_name (str) required; eth_network_control_policy_name (str) required; user_label (str); state (str) default=present
ethernet_uplink_portslistList of Ethernet Uplink port configurations. Ethernet Uplink ports connect to upstream network switches. Nested options: port_id (str) required; admin_speed (str) default=Auto; fec (str) default=Auto; eth_network_group_policy_name (list); flow_control_policy_name (str); link_control_policy_name (str); mac_sec_policy_name (str); user_label (str); state (str) default=present
fcoe_uplink_portslistList of FCoE Uplink port configurations. FCoE Uplink ports provide Fibre Channel over Ethernet connectivity. Nested options: port_id (str) required; admin_speed (str) default=Auto; fec (str) default=Auto; link_control_policy_name (str); user_label (str); state (str) default=present

Example

yaml
- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    breakout_ports:
        - custom_mode: BreakoutEthernet25G
          port_id: 49
          state: present
    description: Example port policy with various configurations
    device_model: UCS-FI-6454
    name: port-policy-example
    organization: default
    server_ports:
        - fec: Auto
          manual_numbering: false
          port_id: 1
          state: present
          user_label: Server Port 1
        - fec: Auto
          manual_numbering: true
          port_id: 2
          preferred_device_id: 2
          preferred_device_type: RackServer
          state: present
          user_label: Server Port with Manual Numbering
    state: present
    tags:
        - Key: Environment
          Value: Production
  name: Create a Port Policy with breakout ports and server ports

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    description: Port policy with port channel configurations
    device_model: UCS-FI-6454
    ethernet_uplink_port_channels:
        - admin_speed: 25Gbps
          eth_network_group_policy_names:
            - default-network-group
          fec: Auto
          flow_control_policy_name: default-flow-control
          link_aggregation_policy_name: default-link-aggregation
          link_control_policy_name: default-link-control
          pc_id: 123
          ports:
            - port_id: 36
            - port_id: 37
            - port_id: 49/1
            - port_id: 49/2
          state: present
          user_label: Uplink PC 123
    name: port-policy-with-pc
    organization: default
    state: present
  name: Create a Port Policy with Ethernet uplink port channel

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    device_model: UCS-FI-6454
    fc_port_mode:
        port_id_end: 8
        state: present
    fc_uplink_port_channels:
        - admin_speed: 16Gbps
          pc_id: 13
          ports:
            - port_id: 1
            - port_id: 2
            - port_id: 3
            - port_id: 4
          state: present
          vsan_id: 1
    name: fc-port-channel-policy
    organization: default
    state: present
  name: Create a Port Policy with FC uplink port channel

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    appliance_port_channels:
        - admin_speed: Auto
          eth_network_control_policy_name: storage-network-control
          eth_network_group_policy_name: storage-network-group
          fec: Auto
          link_aggregation_policy_name: default-link-aggregation
          mode: trunk
          pc_id: 21
          ports:
            - port_id: 11
            - port_id: 12
          priority: Best Effort
          state: present
          user_label: Storage PC
    device_model: UCS-FI-6454
    name: appliance-pc-policy
    organization: default
    state: present
  name: Create a Port Policy with appliance port channel

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    breakout_ports:
        - custom_mode: BreakoutEthernet25G
          port_id: 49
          state: present
    description: Port policy with LAN pin group configuration
    device_model: UCS-FI-6454
    ethernet_uplink_port_channels:
        - admin_speed: Auto
          eth_network_group_policy_names:
            - default-network-group
          pc_id: 1
          ports:
            - port_id: 53
            - port_id: 54
          state: present
    ethernet_uplink_ports:
        - admin_speed: Auto
          eth_network_group_policy_name:
            - default-network-group
          fec: Auto
          port_id: 14
          state: present
    fcoe_uplink_ports:
        - admin_speed: Auto
          fec: Auto
          port_id: 49/1
          state: present
    name: port-policy-with-pin-groups
    organization: default
    pin_groups:
        - name: pin-group-1
          pin_group_type: lan
          state: present
          target_interface_name: "1"
          target_interface_type: pc
        - name: pin-group-2
          pin_group_type: lan
          state: present
          target_interface_name: "14"
          target_interface_type: port
        - name: pin-group-3
          pin_group_type: san
          state: present
          target_interface_name: 49/1
          target_interface_type: port
    state: present
  name: Create a Port Policy with LAN pin groups

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    device_model: UCS-FI-6454
    name: port-policy-update
    organization: default
    server_ports:
        - port_id: 3
          state: present
          user_label: New Server Port
        - port_id: 4
          state: absent
    state: present
  name: Update Port Policy - manage resource states

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    device_model: UCS-FI-6454
    fc_port_mode:
        port_id_end: 16
        state: present
    fc_storage_ports:
        - admin_speed: 8Gbps
          port_id: 2
          state: present
          user_label: FC Storage 2
          vsan_id: 5
    fc_uplink_ports:
        - admin_speed: 8Gbps
          port_id: 1
          state: present
          user_label: FC Uplink 1
          vsan_id: 2
        - admin_speed: 16Gbps
          port_id: 49/1
          state: present
          user_label: FC Uplink Aggregate
          vsan_id: 3
    name: fc-port-policy
    state: present
  name: Create a Port Policy with Fibre Channel ports 1-16

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    appliance_ports:
        - admin_speed: 10Gbps
          eth_network_control_policy_name: default-network-control
          eth_network_group_policy_name: default-network-group
          fec: Auto
          mode: trunk
          port_id: 13
          priority: Best Effort
          state: present
          user_label: Storage Appliance
    device_model: UCS-FI-6454
    ethernet_uplink_ports:
        - admin_speed: Auto
          eth_network_group_policy_name:
            - default-network-group
          fec: Auto
          flow_control_policy_name: default-flow-control
          link_control_policy_name: default-link-control
          port_id: 14
          state: present
    fcoe_uplink_ports:
        - admin_speed: Auto
          fec: Auto
          link_control_policy_name: default-link-control
          port_id: 15
          state: present
          user_label: FCoE Uplink
    name: mixed-port-policy
    state: present
  name: Create a Port Policy with Appliance and Ethernet Uplink ports

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    name: port-policy-to-delete
    state: absent
  name: Delete a Port Policy

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    breakout_ports:
        - custom_mode: BreakoutEthernet25G
          port_id: 97
          state: present
        - custom_mode: BreakoutEthernet10G
          port_id: 108
          state: present
    description: Port policy for UCS-FI-64108 with 108 ports
    device_model: UCS-FI-64108
    ethernet_uplink_ports:
        - admin_speed: 1Gbps
          port_id: 89
          state: present
        - admin_speed: 100Gbps
          port_id: 97
          state: present
    name: UCS-FI-64108-policy
    state: present
  name: UCS-FI-64108 Port Policy with device-specific features

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    breakout_ports:
        - custom_mode: BreakoutFibreChannel16G
          port_id: 36
          state: present
        - custom_mode: BreakoutFibreChannel32G
          port_id: 35
          state: present
        - custom_mode: BreakoutEthernet25G
          port_id: 1
          state: present
    description: Port policy for UCS-FI-6536 with FC breakout
    device_model: UCS-FI-6536
    ethernet_uplink_ports:
        - admin_speed: 1Gbps
          port_id: 9
          state: present
    fc_storage_ports:
        - admin_speed: 32Gbps
          port_id: 35/2
          state: present
          vsan_id: 2
    fc_uplink_ports:
        - admin_speed: 16Gbps
          port_id: 36/1
          state: present
          vsan_id: 1
    name: UCS-FI-6536-policy
    state: present
  name: UCS-FI-6536 Port Policy with FC breakout support

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    description: Port policy for UCS-FI-6664 - no breakout support
    device_model: UCS-FI-6664
    ethernet_uplink_ports:
        - admin_speed: 100Gbps
          port_id: 1
          state: present
        - admin_speed: 40Gbps
          port_id: 50
          state: present
    fc_port_mode:
        port_id_end: 40
        port_id_start: 25
        state: present
    fc_uplink_ports:
        - admin_speed: 32Gbps
          port_id: 25
          state: present
          vsan_id: 1
    name: UCS-FI-6664-policy
    state: present
  name: UCS-FI-6664 Port Policy without breakout support

- cisco.intersight.intersight_port_policy:
    api_key_id: '{{ api_key_id }}'
    api_private_key: '{{ api_private_key }}'
    breakout_ports:
        - custom_mode: BreakoutFibreChannel16G
          port_id: 1
          state: present
        - custom_mode: BreakoutFibreChannel8G
          port_id: 2
          state: present
    description: Port policy for UCSX-S9108-100G with FC breakout
    device_model: UCSX-S9108-100G
    ethernet_uplink_ports:
        - admin_speed: 1Gbps
          port_id: 7
          state: present
        - admin_speed: 1Gbps
          port_id: 8
          state: present
    fc_uplink_ports:
        - admin_speed: 16Gbps
          port_id: 1/1
          state: present
          vsan_id: 1
        - admin_speed: 8Gbps
          port_id: 2/3
          state: present
          vsan_id: 1
    name: UCSX-S9108-100G-policy
    state: present
  name: UCSX-S9108-100G Port Policy with FC breakout
Search
    ↑ ↓ move↵ openesc close