Skip to content

Commit

Permalink
Docs: Added 'apic:domain\\' to username if multi-domain (datacenter#118
Browse files Browse the repository at this point in the history
…), added lookupByClass filter example (datacenter#115)
  • Loading branch information
mbshields committed Jan 13, 2016
1 parent af99e4f commit 63f9c7d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,15 @@ to authenticate to the APIC as shown in this example:
# Use the connected moDir queries and configuration...
moDir.logout()
If multiple AAA login domains are configured, you must prepend the username
with "apic:*domain*\\\\" as in this example:

.. code-block:: python
loginSession = LoginSession(apicUrl, 'apic:CiscoDomain\\admin', 'mypassword')
A successful login returns a reference to a directory object that you will use
for further operations. In the implementation of the of the management
for further operations. In the implementation of the management
information tree (MIT), managed objects (MOs) are represented as directories.

Object Lookup
Expand All @@ -71,13 +78,19 @@ tree by its distinguished name (DN). This example looks for an object called
A successful lookup operation returns a reference to the object that has the
specified DN.

You can also look up an object by class:
You can also look up an object by class. This example returns a list of all
objects of the class 'polUni':

.. code-block:: python
uniMo = moDir.lookupByClass('polUni')
This option returns a list of all objects of the class.
You can add a filter to a lookup to find specific objects. This example returns
an object of class 'fvTenant' whose name is 'Tenant1':

.. code-block:: python
tenant1Mo = moDir.lookupByClass("fvTenant", propFilter='and(eq(fvTenant.name, "Tenant1"))')
You can also look up an object using the dnquery class or the class query
class. For more information, see the Request module.
Expand Down

0 comments on commit 63f9c7d

Please sign in to comment.