//---------------------------------------------------------------------------------------------------------------------

        public override CloudAppliance CreateInstance(string name, VirtualMachineTemplate template, VirtualDisk[] disks, VirtualNetwork network)
        {
            CloudAppliance appliance = OcciCloudAppliance.FromResources(context, template as OcciInstanceType, disks as OcciStorage[], network as OcciNetwork);

            appliance.Name = name;
            appliance.Create();
            return(appliance);
        }
Ejemplo n.º 2
0
        //---------------------------------------------------------------------------------------------------------------------

        public override CloudAppliance CreateInstance(string name, VirtualMachineTemplate template, VirtualDisk[] disks, VirtualNetwork network)
        {
            OneCloudAppliance appliance = OneCloudAppliance.FromResources(context, template as OneVMTemplate, disks as OneImage[], network as OneNetwork);

            appliance.XmlRpcProvider     = this;
            appliance.Name               = name;
            appliance.AdditionalTemplate = template.AdditionalContent;

            //delegate client user
            CloudUser owner = CloudUser.FromIdAndProvider(context, context.OwnerId, this.Id);

            this.StartDelegate(owner.CloudUsername);
            appliance.Create();
            this.EndDelegate();

            foreach (OneImage disk in disks)
            {
                this.XmlRpc.VMAttachDisk(Int32.Parse(appliance.Vm.ID), "<TEMPLATE><DISK><IMAGE_ID>" + disk.RemoteId + "</IMAGE_ID></DISK></TEMPLATE>");
            }

            return(appliance);
        }
Ejemplo n.º 3
0
        //---------------------------------------------------------------------------------------------------------------------

        public override CloudAppliance CreateInstance(string caption, VirtualMachineTemplate template, VirtualDisk[] disks, VirtualNetwork network)
        {
            return(null);
        }
Ejemplo n.º 4
0
        //---------------------------------------------------------------------------------------------------------------------

        public abstract CloudAppliance CreateInstance(string caption, VirtualMachineTemplate template, VirtualDisk[] disks, VirtualNetwork network);