cisco.dnac.site (2.0.7) — module

Manage Site objects of Sites

| "added in version" 1.0.0 of cisco.dnac"

Authors: Rafael Campos (@racampos)

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install cisco.dnac:==2.0.7


Add to requirements.yml

  collections:
    - name: cisco.dnac
      version: 2.0.7

Description

Get Site with area/building/floor with specified hierarchy.

Creates Site with area/building/floor with specified hierarchy.

Delete Site with area/building/floor by SiteId.

Update Site area/building/floor with specified hierarchy and new values.

API to get Site count.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_site
  cisco.dnac.site:
    state: query  # required
    limit: SomeValue  # string
    name: SomeValue  # string
    offset: SomeValue  # string
    site_id: SomeValue  # string
    type: SomeValue  # string
  register: nm_get_site
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create_site
  cisco.dnac.site:
    state: present  # required
    site:  # required
      area:
        name: SomeValue  # string
        parentName: SomeValue  # string
      building:
        name: SomeValue  # string
        address: SomeValue  # string
        parentName: SomeValue  # string
        latitude: 1  #  number
        longitude: 1  #  number
      floor:
        name: SomeValue  # string
        parentName: SomeValue  # string
        rfModel: SomeValue  # string
        width: 1  #  number
        length: 1  #  number
        height: 1  #  number
    type: # valid values are 'area',
      # 'building',
      # 'floor'.
      SomeValue  # string, required
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete_site
  cisco.dnac.site:
    state: absent  # required
    site_id: SomeValue  # string, required
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: update_site
  cisco.dnac.site:
    state: present  # required
    site_id: SomeValue  # string, required
    site:  # required
      area:
        name: SomeValue  # string
        parentName: SomeValue  # string
      building:
        name: SomeValue  # string
        address: SomeValue  # string
        parentName: SomeValue  # string
        latitude: 1  #  number
        longitude: 1  #  number
      floor:
        name: SomeValue  # string
        rfModel: SomeValue  # string
        width: 1  #  number
        length: 1  #  number
        height: 1  #  number
    type: # valid values are 'area',
      # 'building',
      # 'floor'.
      SomeValue  # string, required
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_site_count
  cisco.dnac.site:
    state: query  # required
    count: True  # boolean, required
    site_id: SomeValue  # string
  register: nm_get_site_count

Inputs

    
name:
    description:
    - SiteNameHierarchy (ex global/groupName).
    type: str

site:
    description:
    - Site, property of the request body.
    required: true
    suboptions:
      area:
        description:
        - It is the Site's area.
        suboptions:
          name:
            description:
            - It is the Site's name.
            type: str
          parentName:
            description:
            - It is the Site's parentName.
            type: str
        type: dict
      building:
        description:
        - It is the Site's building.
        suboptions:
          address:
            description:
            - It is the Site's address.
            type: str
          latitude:
            description:
            - It is the Site's latitude.
            type: int
          longitude:
            description:
            - It is the Site's longitude.
            type: int
          name:
            description:
            - It is the Site's name.
            type: str
          parentName:
            description:
            - It is the Site's parentName.
            type: str
        type: dict
      floor:
        description:
        - It is the Site's floor.
        suboptions:
          height:
            description:
            - It is the Site's height.
            type: int
          length:
            description:
            - It is the Site's length.
            type: int
          name:
            description:
            - It is the Site's name.
            type: str
          parentName:
            description:
            - It is the Site's parentName.
            type: str
          rfModel:
            description:
            - It is the Site's rfModel.
            type: str
          width:
            description:
            - It is the Site's width.
            type: int
        type: dict
    type: dict

type:
    description:
    - Type (ex area, building, floor).
    - Type, property of the request body.
    - Required for state present.
    type: str

count:
    description:
    - If true gets the number of objects.
    - Required for state query.
    type: bool

limit:
    description:
    - Number of Sites to be retrieved.
    type: str

offset:
    description:
    - Offset/starting row.
    type: str

site_id:
    description:
    - Site id to which Site details to retrieve.
    - Site id to which Site details to be deleted.
    - Site id to which Site details to be updated.
    - Site id to retrieve Site count.
    - Required for states present and absent.
    type: str

Outputs

dnac_response:
  description: A dictionary with the response returned by the DNA Center Python SDK
  returned: always
  sample:
    response: 29
    version: '1.0'
  type: dict
missing_params:
  description: Provided arguments do not comply with the schema of the DNA Center
    Python SDK function
  returned: when the function request schema is not satisfied
  sample: null
  type: list
sdk_function:
  description: The DNA Center SDK function used to execute the task
  returned: always
  sample: sites.create_site
  type: str

See also