237 lines
9.9 KiB
C#
237 lines
9.9 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
///CIM_NetworkPortConfigurationService provides management of the network interfaces associated with a network port.
|
|
/// </summary>
|
|
[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
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_NetworkPortConfigurationService() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_NetworkPortConfigurationService(string xml): base((IWSManClient)null)
|
|
{
|
|
this.Deserialize(xml);
|
|
}
|
|
/// <summary>
|
|
/// Constructor which recieves a Ws-Management client object.
|
|
/// </summary>
|
|
/// <param name="client">Ws-Management client</param>
|
|
public CIM_NetworkPortConfigurationService(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
///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.
|
|
/// </summary>
|
|
[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)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, The NetworkPort to which the network interface will be added.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference Port
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("Port",value.Serialize(false));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The MAC address requested.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual string Address
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("Address",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Optional, The requested LAN ID.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual string LANID
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("LANID",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Optional, The requested alias addresses.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual string[] AliasAddresses
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("AliasAddresses",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Optional, The requested group addresses.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual string[] GroupAddresses
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("GroupAddresses",value);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///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.
|
|
/// </summary>
|
|
[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("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The created LANEndpoint.
|
|
/// </summary>
|
|
[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;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///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.
|
|
/// </summary>
|
|
/// <param name="inPort">Required, IN -The NetworkPort to which the network interface will be added.</param>
|
|
/// <param name="inAddress">Required, IN -The MAC address requested.</param>
|
|
/// <param name="inLANID">Optional, IN -The requested LAN ID.</param>
|
|
/// <param name="inAliasAddresses">Optional, IN -The requested alias addresses.</param>
|
|
/// <param name="inGroupAddresses">Optional, IN -The requested group addresses.</param>
|
|
/// <param name="outEndpoint">OUT - The created LANEndpoint.</param>
|
|
/// <returns>
|
|
/// 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
|
|
/// </returns>
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_NetworkPortConfigurationService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of CIM_NetworkPortConfigurationService objects</returns>
|
|
public static new Collection<CIM_NetworkPortConfigurationService> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_NetworkPortConfigurationService> ret = CimBase.Enumerate<CIM_NetworkPortConfigurationService>(client, cimKeys);
|
|
return new Collection<CIM_NetworkPortConfigurationService>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_NetworkPortConfigurationService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_NetworkPortConfigurationService objects</returns>
|
|
public static new Collection<CIM_NetworkPortConfigurationService> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_NetworkPortConfigurationService> ret = CimBase.Enumerate<CIM_NetworkPortConfigurationService>(client);
|
|
return new Collection<CIM_NetworkPortConfigurationService>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_NetworkPortConfigurationService if it is singular.
|
|
/// Note: This method will succeed only if a single instance of the class exists.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
public static new void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_NetworkPortConfigurationService>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_NetworkPortConfigurationService class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Service.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|