Пример #1
0
 public void AddPortGroup(HostPortGroupSpec portgrp)
 {
     try
     {
         AddPortGroupRequestType addPortGroupRequestType = new AddPortGroupRequestType();
         addPortGroupRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         addPortGroupRequestType.portgrp = (VimApi_65.HostPortGroupSpec)VIConvert.ToWsdlType(portgrp);
         this.VimServiceProxy.AddPortGroup(new AddPortGroupRequest(addPortGroupRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Пример #2
0
 public void UpdatePortGroup(string pgName, HostPortGroupSpec portgrp)
 {
     try
     {
         UpdatePortGroupRequestType updatePortGroupRequestType = new UpdatePortGroupRequestType();
         updatePortGroupRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updatePortGroupRequestType.pgName  = pgName;
         updatePortGroupRequestType.portgrp = (VimApi_65.HostPortGroupSpec)VIConvert.ToWsdlType(portgrp);
         this.VimServiceProxy.UpdatePortGroup(new UpdatePortGroupRequest(updatePortGroupRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }