Example #1
0
 public DiskUpdate(Model.DiskUpdate diskUpdate)
 {
     this.Name = diskUpdate.Name;
     this.Size = diskUpdate.Size;
     this.KernelVersion = diskUpdate.KernelVersion;
     this.CommandLine = diskUpdate.CommandLine;
 }
 public VirtualMachineUpdate(Model.VirtualMachineUpdate virtualMachineUpdate)
 {
     this.MaxMemory = virtualMachineUpdate.MaxMemory;
     this.Shares = virtualMachineUpdate.Shares;
     this.Memory = virtualMachineUpdate.Memory;
     if (virtualMachineUpdate.IsRescueConsoleActive.HasValue)
         this.IsRescueConsoleActive = (virtualMachineUpdate.IsRescueConsoleActive.Value ? 1 : 0);
     this.UnixPassword = virtualMachineUpdate.UnixPassword;
 }
 public VirtualMachineCreation(Model.VirtualMachineCreation virtualMachineCreation)
 {
     this.Hostname = virtualMachineCreation.Hostname;
     this.Memory = virtualMachineCreation.Memory;
     this.Shares = virtualMachineCreation.Shares;
     this.DataCenterId = virtualMachineCreation.DataCenter.Id;
     this.SystemDiskId = virtualMachineCreation.SystemDisk.Id;
     this.IpVersion = Converter.ToIpVersion(virtualMachineCreation.IpVersion);
     this.IsGandiAI = (virtualMachineCreation.IsGandiAI ? 1 : 0);
     this.UnixLogin = virtualMachineCreation.UnixLogin;
     this.UnixPassword = virtualMachineCreation.UnixPassword;
 }
Example #4
0
        public DiskCopy(Model.DiskCopy diskCopy)
        {
            this.DataCenterId = diskCopy.DataCenter.Id;
            this.Name = diskCopy.Name;

            List<int> repulsedDiskIdList = new List<int>();
            if (diskCopy.RepulsedDisks != null)
            {
                foreach (Model.Disk repulsedDisk in diskCopy.RepulsedDisks)
                    repulsedDiskIdList.Add(repulsedDisk.Id);
            }
            this.RepulsedDiskIds = repulsedDiskIdList.ToArray();
        }
Example #5
0
        public DiskCreation(Model.DiskCreation diskCreation)
        {
            this.DataCenterId = diskCreation.DataCenter.Id;
            this.Name = diskCreation.Name;
            this.Size = diskCreation.Size;
            this.Type = Converter.ToDiskType(diskCreation.Type);

            List<int> repulsedDiskIdList = new List<int>();
            if (diskCreation.RepulsedDisks != null)
            {
                foreach (Model.Disk repulsedDisk in diskCreation.RepulsedDisks)
                    repulsedDiskIdList.Add(repulsedDisk.Id);
            }
            this.RepulsedDiskIds = repulsedDiskIdList.ToArray();
        }
 public IpAddressCreation(Model.IpAddressCreation ipAddressCreation)
 {
     this.DataCenterId = ipAddressCreation.DataCenter.Id;
     this.IpVersion = Converter.ToIpVersion(ipAddressCreation.IpVersion);
     this.Reverse = ipAddressCreation.Reverse;
 }
 public IpAddressUpdate(Model.IpAddressUpdate ipAddressUpdate)
 {
     this.Reverse = ipAddressUpdate.Reverse;
 }