Skip to content

Commit 178d355

Browse files
authored
Merge pull request #49 from CiscoTestAutomation/thaing_c8kv_iosxe
Add c8kv iosxe clean examples
2 parents 79a1635 + 0aab7bb commit 178d355

File tree

2 files changed

+204
-0
lines changed

2 files changed

+204
-0
lines changed

clean/full_clean_c8kv_iosxe/c8kv.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
testbed:
2+
name: c8kv
3+
servers:
4+
ftp:
5+
address: 10.7.14.186
6+
credentials:
7+
default:
8+
username: rcpuser
9+
password: 123rcp!
10+
path: /auto/imageto/dir
11+
tftp:
12+
address: 10.7.14.186
13+
credentials:
14+
default:
15+
username: rcpuser
16+
password: 123rcp!
17+
devices:
18+
c8kv-iosxe:
19+
alias: uut
20+
os: iosxe
21+
type: "c8kv"
22+
platform: "cat8k"
23+
credentials:
24+
default:
25+
password: Lablab123
26+
username: admin
27+
enable:
28+
password: lab123
29+
connections:
30+
defaults:
31+
class: unicon.Unicon
32+
vty:
33+
protocol: telnet
34+
ip: 10.7.1.57
35+
credentials:
36+
default:
37+
password: lab123
38+
username: test1
39+
enable:
40+
password: lab123
41+
cli:
42+
protocol: telnet
43+
ip: 10.7.1.16
44+
port: 9001
45+
a:
46+
protocol: telnet
47+
ip: 10.7.1.16
48+
port: 9001
49+
50+
arguments:
51+
debug: True
52+
custom:
53+
execute_timeout: 600
54+
configure_timeout: 250
55+
abstraction:
56+
order: [os, platform]
57+
58+
peripherals:
59+
power_cycler:
60+
type: 'esxi'
61+
connection_type: 'ssh'
62+
host: 'genie-esxi'
63+
# Log into your ESXi shell and issue command: vim-cmd vmsvc/getallvms
64+
# to find out your VMID to put into outlets
65+
outlets: [11]
66+
67+
"genie-esxi":
68+
os: linux
69+
type: esxi
70+
platform: linux
71+
connections:
72+
a:
73+
ip: 10.7.1.16
74+
protocol: ssh
75+
credentials:
76+
default:
77+
username: root
78+
password: Lablab123
79+
enable:
80+
password: C1sco123
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
cleaners:
2+
DeviceClean:
3+
module: genie.libs.clean
4+
devices: [c8kv-iosxe]
5+
6+
devices:
7+
c8kv-iosxe:
8+
device_recovery:
9+
break_count: 10
10+
console_activity_pattern: "\\.\\.\\.\\."
11+
timeout: 1200
12+
recovery_password: lab
13+
golden_image:
14+
- bootflash:/golden_image.bin
15+
powercycler: True
16+
17+
images:
18+
- /auto/yourimage/dir/c8000v-universalk9.S2C.SSA.bin
19+
20+
connect:
21+
22+
copy_to_device:
23+
origin:
24+
25+
hostname: 10.7.14.186
26+
destination:
27+
directory: 'bootflash:/'
28+
protocol: ftp
29+
min_free_space_percent: 50
30+
vrf: ''
31+
check_file_stability: False
32+
protected_files:
33+
- golden_image.bin
34+
35+
change_boot_variable:
36+
37+
write_erase:
38+
39+
reload:
40+
check_modules:
41+
check: false
42+
reload_service_args:
43+
timeout: 900
44+
prompt_recovery: False
45+
46+
apply_configuration:
47+
configuration: |
48+
hostname c8kv-iosxe
49+
ip route 0.0.0.0 0.0.0.0 10.7.1.1
50+
ip ftp source-interface GigabitEthernet1
51+
ip ftp username rcpuser
52+
ip ftp password 123rcp!
53+
interface GigabitEthernet1
54+
ip address 10.7.1.57 255.255.255.0
55+
negotiation auto
56+
no shut
57+
config_timeout: 900
58+
config_stable_time: 30
59+
max_time: 300
60+
check_interval: 20
61+
62+
verify_running_image:
63+
64+
ping_server:
65+
interval: 60
66+
server: 10.7.14.186
67+
timeout: 120
68+
vrf: ''
69+
70+
backup_file_on_device:
71+
copy_dir: 'bootflash:'
72+
copy_file: test.cfg
73+
74+
delete_backup_from_device:
75+
delete_dir: 'bootflash:'
76+
delete_file: test.cfg
77+
78+
delete_backup_from_device__1:
79+
delete_dir: 'bootflash:'
80+
delete_file: test.cfg
81+
82+
delete_backup_from_device__2:
83+
delete_dir: 'bootflash:'
84+
delete_file: backup_test.cfg
85+
86+
copy_to_linux:
87+
protocol: sftp
88+
append_hostname: true
89+
copy_attempts: 3
90+
destination:
91+
directory: /auto/tftp-ssr/
92+
hostname: 10.7.14.186
93+
origin:
94+
files:
95+
- /auto/yourimage/dir/sample_file
96+
overwrite: true
97+
98+
delete_files_from_server:
99+
files:
100+
- /auto/yourimage/sample_file_c8kv-iosxe
101+
protocol: sftp
102+
server: 10.7.14.186
103+
104+
power_cycle:
105+
boot_timeout: 900
106+
sleep_after_power_off: 10
107+
108+
order:
109+
- connect
110+
- apply_configuration
111+
- ping_server
112+
- copy_to_device
113+
- backup_file_on_device
114+
- change_boot_variable
115+
- copy_to_linux
116+
- write_erase
117+
- power_cycle
118+
- reload
119+
- apply_configuration
120+
- ping_server
121+
- verify_running_image
122+
- delete_backup_from_device__1
123+
- delete_backup_from_device__2
124+
- delete_files_from_server

0 commit comments

Comments
 (0)