Product:
Search Type:

[How To] How to assign subnet mask for IP address using SOAP

Article ID: 3102 
Last Review: Nov,30 2007
APPLIES TO:
  • Virtuozzo for Windows 3.5.1 SP1

Answer

It is necessary to use ip_addressType: 
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.swsoft.com/webservices/vza/3.0.3/types")]
   public class ip_addressType {      
        /// <remarks/>
        public string ip;      
        /// <remarks/>
        public string netmask;
    }
Example:
// vemBinding vem;
create2 parameter = new create2();
.......
((ve_configType)parameter.Item).address =new ip_addressType [1];
((ve_configType)parameter.Item).address[0]=new ip_addressType ();
((ve_configType)parameter.Item).address[0].ip ="10.0.0.3";
((ve_configType)parameter.Item).address[0].netmask ="255.255.255.0";       
......
vem.create(parameter);    

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields