Managed Object (MO) Module¶
A Managed Object (MO) is an abstract representation of a physical or logical entity that contain a set of configurations and properties, such as a server, processor, or resource pool. The MO module represents MOs.
The APIC system configuration and state are modeled as a collection of managed objects (MOs). For example, servers, chassis, I/O cards, and processors are physical entities represented as MOs; resource pools, user roles, service profiles, and policies are logical entities represented as MOs.
Accessing Properties¶
When you create a managed object (MO), you can access properties as follows:
userMo = User('uni/userext', 'george')
userMo.firstName = 'George'
userMo.lastName = 'Washington'
Managing Properties¶
- You can use the following methods to manage property changes on a managed object (MO):
- dirtyProps-Returns modified properties that have not been committed.
- isPropDirty-Indicates if there are unsaved changes to the MO properties.
- resetProps-Resets MO properties, discarding uncommitted changes.
Verifying Object Status¶
You can use the status property to access the status of the Mo.
-
class
cobra.mit.mo.
Mo
(parentMoOrDn, markDirty, *namingVals, **creationProps)[source]¶ A class to create managed objects (MOs), which represent a physical or logical entity with a set of configurations and properties.
-
__init__
(parentMoOrDn, markDirty, *namingVals, **creationProps)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
children
¶ Returns the child managed objects (MOs).
-
delete
()[source]¶ Marks the mo as deleted. If this mo is committed, the corresponding mo in the backend will be deleted.
-
dirtyProps
¶ Returns modified properties that have not been committed.
-
dn
¶ Returns the distinguished name (Dn) of the managed object (MO).
-
isPropDirty
(propName)[source]¶ Returns a value indicating whether a given property has a new value that has not been committed.
-
numChildren
¶ Returns the number of child managed objects (MOs).
-
parent
¶ Returns the parent managed object (MO).
-
parentDn
¶ Returns the distinguished name (Dn) of the parent managed object (MO).
-
rn
¶ Returns the relative name (Rn) of the managed object (MO).
-
status
¶ Returns the managed object (MO) status.
-