<jupyter_start><jupyter_text>ACI COBRA SDK Exercises---  Created an authenticated session to ACI<jupyter_code># Import HTTP library

# Disable certificate warnings

# Setup authentication constants
APIC = 'https://sandboxapicdc.cisco.com'
USER = 'admin'
PW = '<PASSWORD>'
# Import classes for authentication

# Create and setup login session

# Log on to APIC<jupyter_output><empty_output><jupyter_text>--- Create ACI fv objects Tenant, VRF, Bridge Domain, Subnet, Application Profile, EPG<jupyter_code># Import object classes

# Create object name constants
TENANT_NAME = '514_tenant'
VRF_1_NAME = 'vrf_1'
BD_1_NAME = 'bd_1'
SUBNET_1 = '172.16.30.1/24'
APP_1_NAME = 'app_1'
EPG_1_NAME = 'epg_1'
CONTRACT_1_NAME = 'web_contract'
FILTER_1_NAME = 'web_filter'
ENTRY_1_NAME = 'web_entry'
SUBJECT_1_NAME = 'web_subject'
# Create Tenant object

# Create VRF object

# Create Bridge Domain object

# Create Subnet object

# Create Application Profile object

# Create EPG object<jupyter_output><empty_output><jupyter_text>--- Create fv object relationships<jupyter_code># Import object classes

# Associate Bridge Domain with VRF

# Associate EPG with Bridge Domain<jupyter_output><empty_output><jupyter_text>--- Create vz objects Contract, Filter, Entry, Subject<jupyter_code># Import object classes

# Create contract object

# Create filter object

# Create entry object

# Populate the entry object

# Create a subject object<jupyter_output><empty_output><jupyter_text>--- Create vz object relationships<jupyter_code># Associate the filter with the subject<jupyter_output><empty_output><jupyter_text>--- Build and send a request to ACI<jupyter_code># Import configuration object

# Create request

# Send request<jupyter_output><empty_output><jupyter_text>--- Pause for review<jupyter_code>_ = input('Press Return/Enter to continue ')<jupyter_output><empty_output><jupyter_text>--- Remove objects fom ACI<jupyter_code># Mark object(s) for removal

# Create request

# Send request<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09262948207171315, 'fraction_numerical': 0.012948207171314742, 'mean_word_length': 6.252707581227437, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '113862', 'license': 'Apache-2.0', 'n_tokens_mistral': 695, 'n_tokens_neox': 675, 'n_words': 185, 'path': 'resources/aci/cobra-sdk/exercises/apic_cobra_sdk_exercises.ipynb', 'repo_name': 'wwt/dcauto-study-resources', 'size': '2007'}