networktocode.nautobot.power_port (4.5.0) — module

Create, update or delete power ports within Nautobot

| "added in version" 1.0.0 of networktocode.nautobot"

Authors: Tobias Groß (@toerb)

Install collection

Install with ansible-galaxy collection install networktocode.nautobot:==4.5.0


Add to requirements.yml

  collections:
    - name: networktocode.nautobot
      version: 4.5.0

Description

Creates, updates or removes power ports from Nautobot


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Test Nautobot modules"
  connection: local
  hosts: localhost
  gather_facts: False

  tasks:
    - name: Create power port within Nautobot with only required information
      networktocode.nautobot.power_port:
        url: http://nautobot.local
        token: thisIsMyToken
        name: Test Power Port
        device: Test Device
        state: present

    - name: Update power port with other fields
      networktocode.nautobot.power_port:
        url: http://nautobot.local
        token: thisIsMyToken
        name: Test Power Port
        device: Test Device
        type: iec-60320-c6
        allocated_draw: 16
        maximum_draw: 80
        description: power port description
        state: present

    - name: Delete power port within nautobot
      networktocode.nautobot.power_port:
        url: http://nautobot.local
        token: thisIsMyToken
        name: Test Power Port
        device: Test Device
        state: absent

Inputs

    
url:
    description:
    - 'The URL of the Nautobot instance resolvable by the Ansible host (for example: http://nautobot.example.com:8000)'
    required: true
    type: str

name:
    description:
    - The name of the power port
    required: true
    type: str
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

tags:
    description:
    - Any tags that this item may need to be associated with
    elements: raw
    required: false
    type: list
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

type:
    choices:
    - iec-60320-c6
    - iec-60320-c8
    - iec-60320-c14
    - iec-60320-c16
    - iec-60320-c20
    - iec-60309-p-n-e-4h
    - iec-60309-p-n-e-6h
    - iec-60309-p-n-e-9h
    - iec-60309-2p-e-4h
    - iec-60309-2p-e-6h
    - iec-60309-2p-e-9h
    - iec-60309-3p-e-4h
    - iec-60309-3p-e-6h
    - iec-60309-3p-e-9h
    - iec-60309-3p-n-e-4h
    - iec-60309-3p-n-e-6h
    - iec-60309-3p-n-e-9h
    - nema-5-15p
    - nema-5-20p
    - nema-5-30p
    - nema-5-50p
    - nema-6-15p
    - nema-6-20p
    - nema-6-30p
    - nema-6-50p
    - nema-l5-15p
    - nema-l5-20p
    - nema-l5-30p
    - nema-l5-50p
    - nema-l6-20p
    - nema-l6-30p
    - nema-l6-50p
    - nema-l14-20p
    - nema-l14-30p
    - nema-l21-20p
    - nema-l21-30p
    - cs6361c
    - cs6365c
    - cs8165c
    - cs8265c
    - cs8365c
    - cs8465c
    - ita-e
    - ita-f
    - ita-ef
    - ita-g
    - ita-h
    - ita-i
    - ita-j
    - ita-k
    - ita-l
    - ita-m
    - ita-n
    - ita-o
    description:
    - The type of the power port
    required: false
    type: str
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Use C(present) or C(absent) for adding or removing.
    type: str

token:
    description:
    - The token created within Nautobot to authorize API access
    required: true
    type: str

device:
    description:
    - The device the power port is attached to
    required: true
    type: raw
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

api_version:
    description:
    - API Version Nautobot REST API
    required: false
    type: str
    version_added: 4.1.0
    version_added_collection: networktocode.nautobot

description:
    description:
    - Description of the power port
    required: false
    type: str
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

maximum_draw:
    description:
    - The maximum permissible draw of the power port in watt
    required: false
    type: int
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

query_params:
    description:
    - This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is
      defined
    - in plugins/module_utils/utils.py and provides control to users on what may make
    - an object unique in their environment.
    elements: str
    required: false
    type: list
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

allocated_draw:
    description:
    - The allocated draw of the power port in watt
    required: false
    type: int
    version_added: 3.0.0
    version_added_collection: networktocode.nautobot

validate_certs:
    default: true
    description:
    - If C(no), SSL certificates will not be validated. This should only be used on personally
      controlled sites using self-signed certificates.
    required: false
    type: raw

Outputs

msg:
  description: Message indicating failure or info about what has been achieved
  returned: always
  type: str
power_port:
  description: Serialized object as created or already existent within Nautobot
  returned: success (when I(state=present))
  type: dict