�
�Udac @` s d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z d d
l m Z m Z m Z m Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z e d k r
e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys>
---
module: sros_rollback
version_added: "2.2"
author: "Peter Sprygada (@privateip)"
short_description: Configure Nokia SR OS rollback
description:
- Configure the rollback feature on remote Nokia devices running
the SR OS operating system. this module provides a stateful
implementation for managing the configuration of the rollback
feature
extends_documentation_fragment: sros
options:
rollback_location:
description:
- The I(rollback_location) specifies the location and filename
of the rollback checkpoint files. This argument supports any
valid local or remote URL as specified in SR OS
remote_max_checkpoints:
description:
- The I(remote_max_checkpoints) argument configures the maximum
number of rollback files that can be transferred and saved to
a remote location. Valid values for this argument are in the
range of 1 to 50
local_max_checkpoints:
description:
- The I(local_max_checkpoints) argument configures the maximum
number of rollback files that can be saved on the devices local
compact flash. Valid values for this argument are in the range
of 1 to 50
rescue_location:
description:
- The I(rescue_location) specifies the location of the
rescue file. This argument supports any valid local
or remote URL as specified in SR OS
state:
description:
- The I(state) argument specifies the state of the configuration
entries in the devices active configuration. When the state
value is set to C(true) the configuration is present in the
devices active configuration. When the state value is set to
C(false) the configuration values are removed from the devices
active configuration.
default: present
choices: ['present', 'absent']
s�
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
---
vars:
cli:
host: "{{ inventory_hostname }}"
username: admin
password: admin
transport: cli
---
- name: configure rollback location
sros_rollback:
rollback_location: "cb3:/ansible"
provider: "{{ cli }}"
- name: remove all rollback configuration
sros_rollback:
state: absent
provider: "{{ cli }}"
s�
updates:
description: The set of commands that will be pushed to the remote device
returned: always
type: list
sample: ['...', '...']
( t
AnsibleModule( t
NetworkConfigt dumps( t load_configt
get_configt sros_argument_spect
check_argsc O` s) t � j | � } | r% | | | � Sd S( N( t globalst get( t namet argst kwargst func( ( sN /usr/lib/python2.7/site-packages/ansible/modules/network/sros/sros_rollback.pyt invokea s c C` sb t � } xR | D]J } x4 t | � D]&