OpenStack.Compute.v2_1.ServerCreateDefinition.ConfigureBootFromVolume C# (CSharp) Method

ConfigureBootFromVolume() public method

Configures the server to boot from an existing volume.
public ConfigureBootFromVolume ( Identifier volumeId, bool deleteVolumeWithServer = false ) : void
volumeId Identifier The volume identifier.
deleteVolumeWithServer bool if set to true [delete volume with server].
return void
        public void ConfigureBootFromVolume(Identifier volumeId, bool deleteVolumeWithServer = false)
        {
            BlockDeviceMapping.Add(new ServerBlockDeviceMapping
            {
                SourceType = ServerBlockDeviceType.Volume,
                SourceId = volumeId,
                BootIndex = 0,
                DeleteWithServer = deleteVolumeWithServer
            });
        }