OV_ManagedNode::Create()
OV_ManagedNode::Create_Trans()
- OV_ManagedNode Create(
- [in] string PrimaryNodeName,
- [in, optional] string ParentName,
- [in, optional] string Caption,
- [in, optional] string CommPath,
- [in, optional] boolean AlwaysResolveCommAddr,
- [in, optional] boolean AutoUpdateCommPath,
- [in, optional] string Domain,
- [in, optional] boolean DisableAutoDeployment,
- [in, optional] string Name,
- [in, optional] uint16 AgentCommTypeId,
- [in, optional] uint16 AgentBinaryFormatId,
- [in, optional] uint16 OsBits)
- OV_ManagedNode Create_Trans(
- [in] string TransId,
- [in] string PrimaryNodeName,
- [in, optional] string ParentName,
- [in, optional] string Caption,
- [in, optional] string CommPath,
- [in, optional] boolean AlwaysResolveCommAddr,
- [in, optional] boolean AutoUpdateCommPath,
- [in, optional] string Domain,
- [in, optional] boolean DisableAutoDeployment,
- [in, optional] string Name,
- [in, optional] uint16 AgentCommTypeId,
- [in, optional] uint16 AgentBinaryFormatId,
- [in, optional] uint16 OsBits)
Parameters
- TransId
- Transaction ID returned from OV_Transaction::Start().
- PrimaryNodeName
- Primary Node Name. Cannot use the Primary Node Name of an
existing node. If you use an existing name, nothing happens, and
the method fails with MDLAPI_E_NODE_PNNAME_EXISTS.
- ParentName
- Name property of an instance of OV_NodeGroup to which a newly
created node is added. Optional parameter. If you do not specify
this parameter, or if it is equal to an empty string, the root node
group is used. If the specified node group does not exist, the
method fails with MDLAPI_E_PARENT_NODEGROUP_NOT_EXIST.
- Caption
- Caption (Display Name). Optional parameter. If you do not
specify this parameter, or if it is equal to an empty string, it is
the same as a short name (without a domain, before the first '.')
in the PrimaryNodeName. If a node with the same Caption already
exists on the same hierarchy path level (that is, has the same
parent), nothing happens, and the method fails with
MDLAPI_E_NODE_HIERPATH_EXISTS. If the Caption parameter is an empty
string, contains invalid characters, or has more then 1024
characters, the method fails with MDLAPI_E_INVALID_CAPTION.
- CommPath
- Communication Path. Optional parameter. If you do not specify
this parameter, an empty string is used.
- AlwaysResolveCommAddr
- Copied to the AlwaysResolveCommunicationAddresses property.
Optional parameter.
- AutoUpdateCommPath
- Copied to the AutoUpdateCommunicationPath property. Optional
parameter.
- Domain
- Copied to the Domain property. Optional parameter. If you do
not specify this parameter, the domain (text after the first '.')
in PrimaryNodeName is used. If PrimaryNodeName contains a short
name, the domain is empty.
- DisableAutoDeployment
- Copied to the DisableAutoDeployment property. Optional
parameter.
- Name
- A Name property of an instance of OV_ManagedNode to be created.
Optional parameter. If you do not specify this parameter, or if it
is equal to an empty string, it is created as a new GUID. If a node
with same Name already exists, nothing happens, and the method
fails with MDLAPI_E_NODE_NAME_EXISTS.
- AgentCommTypeId
- The Id property of the instance of OV_AgentCommType that
represents agent comunication type (HTTPS or DCE). Optional
parameter. Default is 0 (HTTPS) if the IsDefault property on
OV_AgentCommType is set to true. Otherwise, it is empty.
- AgentBinaryFormatId
- The Id property of the instance of OV_AgentBinaryFormat that
represents the agent binary format (x86, x64, IA64, and so on).
Optional parameter. You can specify the default value if there is
exactly one OV_AgentBinaryFormat instance for this node (based on
the node discovered system and agent communication type).
- OsBits
- Bit length of the default OS type when the OS type could not be
discovered. Optional parameter. It is matched with the BitLen
property of all supported instances of OV_OsType. It is not used
when OS type can be discovered. If the OS type cannot be
discovered, and this parameter is not specified, the method fails
with MDLAPI_E_NODE_OSBITS_NOT_EXIST. If the OS type cannot be
discovered, and this parameter does not match the BitLen property
of any of the supported instances of OV_OsType, the method fails
with MDLAPI_E_NODE_OSBITS_NOT_MATCH.
Calling Convention
These methods can be called from a WMI class or instance
object.
Description
Creates a node (a new instance of OV_ManagedNode) with the node
type auto-discovery, and adds it to an existing node group
(instance of OV_NodeGroup).
This method consists of several operations:
- Attempts to get OS values directly from the node, using DNS
discovery (system type, OS type, and OS version). If this fails,
defaults are used (Unknown/Other).
- Adds a node to HPOM for Windows.
- Adds a node to the HPOM for Windows pre-defined node group. If
the OS detection fails, the node is set to Unknown.
- Adds a node to the node group specified by NodeGroupPath
(default is root). If this node group does not exist, the method
fails with MDLAPI_E_PARENT_NODEGROUP_NOT_EXIST.
- If any node parameter is not valid, the method fails with
MDLAPI_E_INVALID_PARAMETER.
- If node platform checking fails, the method fails with
MDLAPI_E_NODE_PLATFORM_MATCHING.
- If license status is critical, node creation is refused, and
the method fails with MDLAPI_E_LICENSE_MISSING
If an operation fails, a "rollback" is performed, and an error
is returned.
Return Value
Instance of the newly created OV_ManagedNode.
Extended Status Codes
- MDLAPI_E_INVALID_PARAMETER
- Parameter is not valid.
- MDLAPI_E_INVALID_CAPTION
- Specified object Caption parameter is not valid.
- MDLAPI_E_NODE_NAME_EXISTS
- Node with the same Name already exists.
- MDLAPI_E_NODE_PNNAME_EXISTS
- Node with the same Primary Node Name already exists.
- MDLAPI_E_NODE_DISCOVERY_FAILED
- Discovery of the node type failed.
- MDLAPI_E_NODE_HIERPATH_EXISTS
- Node with the same hierarchy path (Caption) already
exists.
- MDLAPI_E_PARENT_NODEGROUP_NOT_EXIST
- Parent node group does not exist.
- MDLAPI_E_NODE_PLATFORM_MATCHING
- Node platform matching failed.
- MDLAPI_E_LICENSE_MISSING
- Specified operation cannot be executed because of missing
licenses.
- MDLAPI_E_NODE_OSBITS_NOT_EXIST
- You must specify the OSBits parameter when the OS type cannot
be discovered.
- MDLAPI_E_NODE_OSBITS_NOT_MATCH
- OSBits parameter does not match any supported OS types.
- MDLAPI_E_TRANSACTION_NOT_EXIST
- Transaction with the specified ID does not exist.