Skip to main content

This are codes for creating MO in APIC through CLI

Project description

All the codes are in object oriented style.

Each of them does a small configuration – to create a MO. For example, createTenant.py helps you to create a tenant.

Programmer can simply write their customized script by inheriting the class createMo in “createMo.py”.

#How to install: You need to have pip in your machine. Then, you simply do: <br>pip install apicPython

After install, you can import apicPython from python.

#How to use:

All the codes support three different input methods: wizard, yaml and cli.

1. wizard: configure a mo by following a wizard. Usage: <br>python createFilter.py wizard <br>To get the help info: python createFilter.py wizard –h

2. yaml: configure a mo with a config file (yaml format). Usage: <br>python createFilter.py yaml createFilter.yaml <br>To get the help info: python createFilter.py yaml –h

3. cli: configure a mo based on you python arguments. It contains key arguments and optional arguments. Flags are used in order to call the optional arguments. Usage: <br>python createFilter.py cli 172.31.216.100 admin ins3965! tenantA filterA –e ip –i tcp <br>To get the help info: python createFilter.py cli –h

#What are those codes:

createMo.py: the basic class/module. It also contains useful functions that help programmers for writing their customized scripts.

The other scripts are functional scripts. Each of them does a small work. For example, createTenant.py only creates an “empty” tenant without any other setup.

#How to delete a mo:

Using -d flag. Example if you want to delete a filter, you can call createFilter.py with a -d flag. The delete method is supported in all three input methods. For example:

<br>python createFilter -d yaml <br>python createFilter -d wizard <br>python createFilter -d cli 172.31.216.100 admin ins3965! tenantA filterA

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apicPython-0.1.0.tar.gz (34.1 kB view details)

Uploaded Source

File details

Details for the file apicPython-0.1.0.tar.gz.

File metadata

  • Download URL: apicPython-0.1.0.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for apicPython-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a100d147de4e83599d2d5fa206bf983cb007b5db0c917b0b91e7f08201b41d1
MD5 8963c9ff0f70a05ceec622d52caf2ea4
BLAKE2b-256 373161513fda431d0761fcd2e123b4e5c34b38f0d79830c36048165c08e1d67a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page