//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_NetworkPortConfigurationService.cs
//
// Contents: CIM_NetworkPortConfigurationService provides management of the network interfaces associated with a network port.
// This file was automatically generated from CIM_NetworkPortConfigurationService.mof
//
//----------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Globalization;
using System.Xml.Serialization;
using System.IO;
using Intel.Manageability.WSManagement;
using Intel.Manageability.Cim.Untyped;
namespace Intel.Manageability.Cim.Typed
{
///
///CIM_NetworkPortConfigurationService provides management of the network interfaces associated with a network port.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPortConfigurationService")]
[System.Xml.Serialization.XmlRootAttribute("CIM_NetworkPortConfigurationService", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPortConfigurationService", IsNullable=false)]
public class CIM_NetworkPortConfigurationService : CIM_Service
{
///
/// Default constructor.
///
public CIM_NetworkPortConfigurationService() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_NetworkPortConfigurationService(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_NetworkPortConfigurationService(IWSManClient client): base(client)
{
}
///
///Create a CIM_LANEndpoint instance and associate it with the specified NetworkPort instance via an instance of CIM_PortImplementsEndpoint. The newly created instance of CIM_LANEndpont contains the configuration properties specified or default values applicable for the specified NetworkPort instance. This method will also create an instance of CIM_HostedAccessPoint which associates the newly created CIM_LANEndpoint instance with the instance of CIM_ComputerSystem which scopes the specified CIM_NetworkPort. An extrinsic method is required in order to provide atomic creation of multiple, related instances. Prior to creating the instances, the implementation will verify that a CIM_LANEndpoint instance can be created and associated with the CIM_NetworkPort instance.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPortConfigurationService", IsNullable=false)]
private class AddLANEndpoint_INPUT : CimParams
{
public AddLANEndpoint_INPUT(string ns) : base(ns)
{
}
///
/// Required, The NetworkPort to which the network interface will be added.
///
[CimField(false,false)]
public virtual CimReference Port
{
set
{
this.SetOrAddField("Port",value.Serialize(false));
}
}
///
/// Required, The MAC address requested.
///
[CimField(false,true)]
public virtual string Address
{
set
{
this.SetOrAddField("Address",value);
}
}
///
/// Optional, The requested LAN ID.
///
[CimField(false,false)]
public virtual string LANID
{
set
{
this.SetOrAddField("LANID",value);
}
}
///
/// Optional, The requested alias addresses.
///
[CimField(false,false)]
public virtual string[] AliasAddresses
{
set
{
this.SetOrAddField("AliasAddresses",value);
}
}
///
/// Optional, The requested group addresses.
///
[CimField(false,false)]
public virtual string[] GroupAddresses
{
set
{
this.SetOrAddField("GroupAddresses",value);
}
}
}
///
///Create a CIM_LANEndpoint instance and associate it with the specified NetworkPort instance via an instance of CIM_PortImplementsEndpoint. The newly created instance of CIM_LANEndpont contains the configuration properties specified or default values applicable for the specified NetworkPort instance. This method will also create an instance of CIM_HostedAccessPoint which associates the newly created CIM_LANEndpoint instance with the instance of CIM_ComputerSystem which scopes the specified CIM_NetworkPort. An extrinsic method is required in order to provide atomic creation of multiple, related instances. Prior to creating the instances, the implementation will verify that a CIM_LANEndpoint instance can be created and associated with the CIM_NetworkPort instance.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPortConfigurationService", IsNullable=false)]
private class AddLANEndpoint_OUTPUT : CimParams
{
public AddLANEndpoint_OUTPUT() : base("")
{
}
///
/// Optional, The created LANEndpoint.
///
[CimField(false,false)]
public virtual CimReference Endpoint
{
get
{
string innerXML = this.GetField("Endpoint")[0];
CimReference epr = new CimReference("Endpoint", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPortConfigurationService", innerXML);
return epr;
}
}
}
///
///Create a CIM_LANEndpoint instance and associate it with the specified NetworkPort instance via an instance of CIM_PortImplementsEndpoint. The newly created instance of CIM_LANEndpont contains the configuration properties specified or default values applicable for the specified NetworkPort instance. This method will also create an instance of CIM_HostedAccessPoint which associates the newly created CIM_LANEndpoint instance with the instance of CIM_ComputerSystem which scopes the specified CIM_NetworkPort. An extrinsic method is required in order to provide atomic creation of multiple, related instances. Prior to creating the instances, the implementation will verify that a CIM_LANEndpoint instance can be created and associated with the CIM_NetworkPort instance.
///
/// Required, IN -The NetworkPort to which the network interface will be added.
/// Required, IN -The MAC address requested.
/// Optional, IN -The requested LAN ID.
/// Optional, IN -The requested alias addresses.
/// Optional, IN -The requested group addresses.
/// OUT - The created LANEndpoint.
///
/// Legal values:
/// Completed with No Error : 0
/// Not Supported : 1
/// Unknown/Unspecified Error : 2
/// Failed : 3
/// Invalid Parameter : 4
/// DMTF Reserved : ..
/// Vendor Reserved : 32768..65535
///
public virtual uint AddLANEndpoint(CimReference inPort,string inAddress,string inLANID,string[] inAliasAddresses,string[] inGroupAddresses,out CimReference outEndpoint)
{
AddLANEndpoint_INPUT input = new AddLANEndpoint_INPUT(this.XmlNamespace);
if (inPort != null)
input.Port=inPort;
if (inAddress != null)
input.Address=inAddress;
if (inLANID != null)
input.LANID=inLANID;
if (inAliasAddresses != null)
input.AliasAddresses=inAliasAddresses;
if (inGroupAddresses != null)
input.GroupAddresses=inGroupAddresses;
AddLANEndpoint_OUTPUT output = new AddLANEndpoint_OUTPUT();
uint returnValue = base.Invoke("AddLANEndpoint",input,out output);
outEndpoint=null;
if (returnValue == 0)
{
if (output.ContainsField("Endpoint"))
outEndpoint = output.Endpoint;
}
return returnValue;
}
///
/// Enumerate instances of CIM_NetworkPortConfigurationService class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_NetworkPortConfigurationService objects
public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_NetworkPortConfigurationService class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_NetworkPortConfigurationService objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_NetworkPortConfigurationService if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
///
/// WS-Management client
public static new void Delete(IWSManClient client)
{
CimBase.Delete(client);
}
///
/// Represents the keys of the CIM_NetworkPortConfigurationService class.
///
public new class CimKeys : CIM_Service.CimKeys
{
}
}
}