Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/netact/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/netact/netact_cm_command.pyo

�
�Udac@`s�dZddlmZmZmZeZidd6dgd6dd6Zd	Zd
Z	dZ
ddlmZd
Z
d�Zedkr�e�ndS(s"
NetAct CM ansible command module
i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: netact_cm_command

short_description: Manage network configuration data in Nokia Core and Radio networks

version_added: "2.5"

description:
    netact_cm_command can be used to run various configuration management operations.
    This module requires that the target hosts have Nokia NetAct network management system installed.
    Module will access the Configurator command line interface in NetAct to upload network configuration to NetAct,
    run configuration export, plan import and configuration provision operations
    To set the scope of the operation, define Distinguished Name (DN) or Working Set (WS) or
    Maintenance Region (MR) as input
options:
    operation:
        description:
            Supported operations allow user to upload actual configuration from the network, to import and
            provision prepared plans, or export reference or actual configuration for planning purposes.
            Provision_Mass_Modification enables provisioning the same parameters to multiple network elements.
            This operation supports modifications only to one object class at a time. With this option
            NetAct Configurator creates and provisions a plan to the network with the given scope and options.
        required: true
        choices:
            - upload
            - provision
            - import
            - export
            - Provision_Mass_Modification
        aliases:
            - op
    opsName:
        description:
            - user specified operation name
        required: false
    DN:
        description:
            Sets the exact scope of the operation in form of a list of managed object
            Distinguished Names (DN) in the network.
            A single DN or a list of DNs can be given (comma separated list without spaces).
            Alternatively, if DN or a list of DNs is not given, working set (WS) or Maintenance Region (MR)
            must be provided as parameter to set the scope of operation.
        required: false

    WS:
        description:
            Sets the scope of the operation to use one or more pre-defined working sets (WS) in NetAct.
            A working set contains network elements selected by user according to defined criteria.
            A single WS name, or multiple WSs can be provided (comma-separated list without spaces).
            Alternatively, if a WS name or a list of WSs is not given, Distinguished Name (DN) or
            Maintenance Region(MR) must be provided as parameter to set the scope of operation.
        required: false
    MR:
        description:
            Sets the scope of the operation to network elements assigned to a Maintenance Region (MR)
            Value can be set as MR IDs including the Maintenance Region Collection (MRC)
            information (for example MRC-FIN1/MR-Hel).
            Multiple MRs can be given (comma-separated list without spaces)
            The value of this parameter is searched through MR IDs under given MRC. If there is no match,
            then it is searched from all MR names.
            Alternatively, if MR ID or a list or MR IDs is not given, Distinguished Name (DN) or Working Set (WS)
            must be provided as parameter to set the scope of operation.
        required: false
    planName:
        description:
            - Specifies a plan name.
        required: false
    typeOption:
        description:
             Specifies the type of the export operation.
        required: false
        choices:
          - plan
          - actual
          - reference
          - template
          - siteTemplate
        aliases:
            - type
    fileFormat:
        description:
            Indicates file format.
        required: false
        choices:
            - RAML2
            - CSV
            - XLSX
    fileName:
        description:
            - Specifies a file name. Valid for Import and Export operations.
        required: false
    inputFile:
        description:
            Specifies full path to plan file location for the import operation.
            This parameter (inputFile) or the fileName parameter must be filled. If both are present then
            the inputFile is used.
        required: false
    createBackupPlan:
        description:
            - Specifies if backup plan generation is enabled.
        required: false
        type: bool
    backupPlanName:
        description:
            - Specifies a backup plan name
        required: false
    verbose:
        description:
            NetAct Configurator will print more info
        required: false
    extra_opts:
        description:
            Extra options to be set for operations. Check Configuration Management > Configuration Management
            Operating Procedures > Command Line Operations in Nokia NetAct user documentation for further
            information for extra options.
        required: false
notes:
    - Check mode is not currently supported
author:
    - Harri Tuominen (@hatuomin)
s
# Pass in a message
- name: Upload
  netact_cm_command:
    operation: "Upload"
    opsname: 'Uploading_test'
    dn: "PLMN-PLMN/MRBTS-746"
    extra_opts: '-btsContentInUse true'

- name: Provision
  netact_cm_command:
    operation: "Provision"
    opsname: 'Provision_test'
    dn: "PLMN-PLMN/MRBTS-746"
    planName: 'mySiteTemplate'
    type: 'actual'
    createBackupPlan: true
    backupPlanName: 'myBackupPlanName'

- name: Export and fetching data from target
  netact_cm_command:
    operation: "Export"
    opsname: 'Export_test'
    planName: 'mySiteTemplate'
    type: 'actual'
    fileName: 'exportTest.xml'
- fetch:
    src: /var/opt/nokia/oss/global/racops/export/exportTest.xml
    dest: fetched

- name: Import
  netact_cm_command:
    operation: "Import"
    opsname: 'Import_test'
    fileFormat: 'CSV'
    type: 'plan'
    fileName: 'myCSVFile'
    planName: 'myPlanName'
    extra_ops: 'enablePolicyPlans true'

# fail the module
- name: Test failure of the module
  netact_cm_command:
    name: fail me
s�
original_message:
    description: The original name param that was passed in
    returned: Command line
    type: str
    sample: '/opt/oss/bin/racclimx.sh -op Upload -opsName Uploading_testi -DN PLMN-PLMN/MRBTS-746'
message:
    description: The output message that the netact_cm_command module generates
    returned: Command output message
    type: str
changed:
    description: data changed
    returned: true if data is changed
    type: bool
(t
AnsibleModules/opt/oss/bin/racclimx.shc!C`sFtdtdddtddgddd	d
ddg�d
tdddt�dtdddt�dtdddt�dtdddt�dtdddt�dtdddtddgddddddg�dtdddtddddg�dtdddt�dtdddt�dtdddt�d tdddt�d!tdddt�d"tdddt��}td#td$d%d&d%d'd%�}td(|d)t�}|jr�t|d*<d+|d,<|j|�n|jjd�}|s|jd,d-|�n|jjd
�}|jjd�}|jjd�}|jjd�}|jjd�}|jjd�}	|jjd�}
|jjd�}|jjd�}|jjd�}
|jjd �}|jjd"�}|jjd!�}t	d.|g}|r'|j
d/�|j
|�n|rJ|j
d0�|j
|�n|rm|j
d1�|j
|�n|r�|j
d2�|j
|�n|r�|j
d3�|j
|�n|	r�|j
d4�|j
|	�n|
r�|j
d5�|j
|
�n|r|j
d6�|j
|�n|r?|j
d7�|j
d8�n|
rb|j
d9�|j
|
�n|r�|j
d:�|j
|�n|r�||jd;�}n|r�|d<kr�|j
d=�q�n|j|d>t�\}}}|d?kr
t|d#<|jd,|�n(t|d#<||d$<||d&<||d'<|j|�d@S(AsS
    Main module where option are handled and command is executed
    :return:
    t	operationttypetstrtrequiredtaliasestoptchoicestUploadt	ProvisiontImporttExporttProvision_Mass_ModificationtopsNametDNtWStMRtplanNamet
typeOptiontplantactualt	referencettemplatetsiteTemplatet
fileFormattCSVtRAML2tXLSXtfileNametcreateBackupPlantbooltbackupPlanNamet	inputFiletverboset
extra_optstchangedtoriginal_messagettcmdtmessaget
argument_spectsupports_check_modetskippeds.check mode not (yet) supported for this moduletmsgsOperation not defineds-ops-opsNames-DNs-WSs-MRs	-planNames-types-fileFormats	-fileNames-createBackupPlanttrues-backupPlanNames
-inputFilet tTrues-vtcheck_rciN(
tdictR6tFalseRt
check_modet	exit_jsontparamstgett	fail_jsontracclimxtappendtsplittrun_command(tmodule_argstresulttmoduleR	topsnametdntwstmrtplannamet
typeoptiont
fileformattfilenameR%R't	inputfileR*R)tcommandtrctoutterr((sT/usr/lib/python2.7/site-packages/ansible/modules/network/netact/netact_cm_command.pytmain�s�		$			

















t__main__N(t__doc__t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR?RSt__name__(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/netact/netact_cm_command.pyt<module>s

|.	�

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]