cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
475
Views
0
Helpful
0
Replies

poap/voap on N7K VDCs

abourges
Level 1
Level 1

Hi,

we're currently building a custom poap solution for our testlab using ansible. POAP process already works pretty good for N5K and N7K admin vdc. But for the non-admin VDCs cisco recommends the "voap.py" script (which I found on the DCNM installation).

Since this voap.py talks quite a bit to DCNM (which we won't have in the future), I'd like to implement a custom voap script - but I don't really understand how VOAP is supposed to work :( From the docs, I learned that pressing "wr erase/reload" on a non-admin vdc in DCNM is the same as executing the voap.py in admin-vdc ("source voap.py <vdc-name>"). This will retrieve the config from a tftp/scp server, re-create the desired vdc and apply the configuration downloded from the server. The last point is where I got completely stuck.

Here's the relevant section from the voap.py, please see the sections marked with red color:

 #
# drop vdc if existent
#
r=cli('config terminal ; no vdc %s ' %g_voap_vdc_name)

poap_log("INFO: Complete in cleaning the existing vdc %s" %g_voap_vdc_name)
#create vdc
poap_log("INFO: Creating vdc %s" %g_voap_vdc_name)
try:
g_boot_stage = BOOT_STATE_VDC_CREATION
send_boot_status(g_voap_vdc_name)
#
# create vdc
#
r = cli('config terminal ; vdc %s' %g_voap_vdc_name)
poap_log("INFO: vdc creation is complete")
poap_log("INFO: ready to apply vdc config")
g_boot_stage = BOOT_STATE_VDC_APPLY_CONFIG
send_boot_status("")
#
# are we in admin or non-admin vdc?!?
#
r=run_cli ('copy %s running-config echo-commands' % config_conf.config_file_dst_second)
poap_log("INFO: the cli commands applied\n %s" %r)
if g_voap_vdc_need_reload:
g_boot_stage = BOOT_STATE_VDC_RELOAD
send_boot_status("")
poap_log("INFO: ready to reload vdc %s" %g_voap_vdc_name)
#
# how did we change to non-admin vdc ?????
#
r=cli('switchback')


my questions:

- when performing the copy of the configuration file to running-config - are we in the admin-vdc or non-admin-vdc ?

- if we *are* in admin-vdc - how did we get there (can't see any switchto commands)?

- the "switchback" command makes me think we changed the vdc to the new vdc - where and how did we do this?

Thanks and regards,

Andreas

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: