Skip to content

Latest commit

 

History

History
261 lines (238 loc) · 16.7 KB

cisco.sastre.transform_copy_module.rst

File metadata and controls

261 lines (238 loc) · 16.7 KB
source:transform_copy.py
orphan:

transform_copy -- Transform copy configuration items

  • The transform copy task can be used to copy confiuration items. A regular expression can be used to select item names to transform.
Parameter Choices/Defaults Comments
address
string / required
vManage IP address or can also be defined via VMANAGE_IP environment variable
name_regex
string / required
name-regex used to transform an existing item name. Variable {name} is replaced with the original template name. Sections of the original template name can be selected using the {name <regex>} format. Where regex is a regular expression that must contain at least one capturing group. Capturing groups identify sections of the original name to keep.
no_rollover
boolean
    Choices:
  • no ←
  • yes
By default, if output directory already exists it is renamed using a rolling naming scheme. "True" disables the automatic rollover. "False" enables the automatic rollover
not_regex
string
Regular expression selecting item names NOT to transform
output
string / required
Directory to save transform result
password
string / required
password or can also be defined via VMANAGE_PASSWORD environment variable.
port
integer
Default:
8443
vManage port number or can also be defined via VMANAGE_PORT environment variable
regex
string
Regular expression selecting item names to transform
tag
string / required
    Choices:
  • template_feature
  • policy_profile
  • policy_definition
  • all
  • policy_list
  • policy_vedge
  • policy_voice
  • policy_vsmart
  • template_device
  • policy_security
  • policy_customapp
Tag for selecting items to transform. Available tags are template_feature, policy_profile, policy_definition, all, policy_list, policy_vedge, policy_voice, policy_vsmart, template_device, policy_security, policy_customapp. Special tag "all" selects all items.
tenant
string
tenant name, when using provider accounts in multi-tenant deployments.
timeout
integer
Default:
300
vManage REST API timeout in seconds
user
string / required
username or can also be defined via VMANAGE_USER environment variable.
workdir
string
transform will read from the specified directory instead of target vManage

Note

  • Tested against 20.10
- name: Transform copy
  cisco.sastre.transform_copy:
    output: transform_copy
    workdir: reference_backup
    no_rollover: false
    tag: "template_device"
    regex: "cedge_1"
    name_regex: '{name}_v2'
    address: 198.18.1.10
    port: 8443
    user: admin
    password: admin
- name: Transform copy
  cisco.sastre.transform_copy:
    output: transform_copy
    tag: "template_device"
    name_regex: '{name}_v2'
    address: 198.18.1.10
    port: 8443
    user: admin
    password: admin