2023-02-09 23:31:22 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) Cloud Software Group, Inc.
|
2017-09-13 18:14:07 +02:00
|
|
|
*
|
2016-08-09 12:12:34 +02:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
2017-09-13 18:14:07 +02:00
|
|
|
*
|
2016-08-09 12:12:34 +02:00
|
|
|
* 1) Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
2017-09-13 18:14:07 +02:00
|
|
|
*
|
2016-08-09 12:12:34 +02:00
|
|
|
* 2) Redistributions in binary form must reproduce the above
|
|
|
|
* copyright notice, this list of conditions and the following
|
|
|
|
* disclaimer in the documentation and/or other materials
|
|
|
|
* provided with the distribution.
|
2017-09-13 18:14:07 +02:00
|
|
|
*
|
2016-08-09 12:12:34 +02:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
|
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
|
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
2017-09-13 18:14:07 +02:00
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Globalization;
|
2021-04-13 11:05:38 +02:00
|
|
|
using System.Linq;
|
2017-09-13 18:14:07 +02:00
|
|
|
using Newtonsoft.Json;
|
2016-08-09 12:12:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
namespace XenAPI
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Describes the storage that is available to a PVS site for caching purposes
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
public partial class PVS_cache_storage : XenObject<PVS_cache_storage>
|
|
|
|
{
|
2019-06-19 10:11:30 +02:00
|
|
|
#region Constructors
|
|
|
|
|
2016-08-09 12:12:34 +02:00
|
|
|
public PVS_cache_storage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public PVS_cache_storage(string uuid,
|
2016-09-20 13:33:00 +02:00
|
|
|
XenRef<Host> host,
|
2016-08-09 12:12:34 +02:00
|
|
|
XenRef<SR> SR,
|
2016-09-20 13:33:00 +02:00
|
|
|
XenRef<PVS_site> site,
|
|
|
|
long size,
|
|
|
|
XenRef<VDI> VDI)
|
2016-08-09 12:12:34 +02:00
|
|
|
{
|
|
|
|
this.uuid = uuid;
|
2016-09-20 13:33:00 +02:00
|
|
|
this.host = host;
|
2016-08-09 12:12:34 +02:00
|
|
|
this.SR = SR;
|
2016-09-20 13:33:00 +02:00
|
|
|
this.site = site;
|
2016-08-09 12:12:34 +02:00
|
|
|
this.size = size;
|
2016-09-20 13:33:00 +02:00
|
|
|
this.VDI = VDI;
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
2019-06-19 10:11:30 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Creates a new PVS_cache_storage from a Hashtable.
|
|
|
|
/// Note that the fields not contained in the Hashtable
|
|
|
|
/// will be created with their default values.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="table"></param>
|
|
|
|
public PVS_cache_storage(Hashtable table)
|
|
|
|
: this()
|
|
|
|
{
|
|
|
|
UpdateFrom(table);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2018-02-16 17:27:30 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Updates each field of this instance with the value of
|
|
|
|
/// the corresponding field of a given PVS_cache_storage.
|
|
|
|
/// </summary>
|
2021-04-13 11:05:38 +02:00
|
|
|
public override void UpdateFrom(PVS_cache_storage record)
|
2016-08-09 12:12:34 +02:00
|
|
|
{
|
2021-04-13 11:05:38 +02:00
|
|
|
uuid = record.uuid;
|
|
|
|
host = record.host;
|
|
|
|
SR = record.SR;
|
|
|
|
site = record.site;
|
|
|
|
size = record.size;
|
|
|
|
VDI = record.VDI;
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
2018-02-16 17:27:30 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Given a Hashtable with field-value pairs, it updates the fields of this PVS_cache_storage
|
|
|
|
/// with the values listed in the Hashtable. Note that only the fields contained
|
|
|
|
/// in the Hashtable will be updated and the rest will remain the same.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="table"></param>
|
2018-02-16 17:27:30 +01:00
|
|
|
public void UpdateFrom(Hashtable table)
|
2016-08-09 12:12:34 +02:00
|
|
|
{
|
2018-02-16 17:27:30 +01:00
|
|
|
if (table.ContainsKey("uuid"))
|
2018-02-23 17:06:32 +01:00
|
|
|
uuid = Marshalling.ParseString(table, "uuid");
|
2018-02-16 17:27:30 +01:00
|
|
|
if (table.ContainsKey("host"))
|
2018-02-23 17:06:32 +01:00
|
|
|
host = Marshalling.ParseRef<Host>(table, "host");
|
2018-02-16 17:27:30 +01:00
|
|
|
if (table.ContainsKey("SR"))
|
2018-02-23 17:06:32 +01:00
|
|
|
SR = Marshalling.ParseRef<SR>(table, "SR");
|
2018-02-16 17:27:30 +01:00
|
|
|
if (table.ContainsKey("site"))
|
2018-02-23 17:06:32 +01:00
|
|
|
site = Marshalling.ParseRef<PVS_site>(table, "site");
|
2018-02-16 17:27:30 +01:00
|
|
|
if (table.ContainsKey("size"))
|
2018-02-23 17:06:32 +01:00
|
|
|
size = Marshalling.ParseLong(table, "size");
|
2018-02-16 17:27:30 +01:00
|
|
|
if (table.ContainsKey("VDI"))
|
2018-02-23 17:06:32 +01:00
|
|
|
VDI = Marshalling.ParseRef<VDI>(table, "VDI");
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool DeepEquals(PVS_cache_storage other)
|
|
|
|
{
|
|
|
|
if (ReferenceEquals(null, other))
|
|
|
|
return false;
|
|
|
|
if (ReferenceEquals(this, other))
|
|
|
|
return true;
|
|
|
|
|
2023-08-20 13:28:53 +02:00
|
|
|
return Helper.AreEqual2(_uuid, other._uuid) &&
|
|
|
|
Helper.AreEqual2(_host, other._host) &&
|
|
|
|
Helper.AreEqual2(_SR, other._SR) &&
|
|
|
|
Helper.AreEqual2(_site, other._site) &&
|
|
|
|
Helper.AreEqual2(_size, other._size) &&
|
|
|
|
Helper.AreEqual2(_VDI, other._VDI);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public override string SaveChanges(Session session, string opaqueRef, PVS_cache_storage server)
|
|
|
|
{
|
|
|
|
if (opaqueRef == null)
|
|
|
|
{
|
2017-09-13 18:14:07 +02:00
|
|
|
var reference = create(session, this);
|
|
|
|
return reference == null ? null : reference.opaque_ref;
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throw new InvalidOperationException("This type has no read/write properties");
|
|
|
|
}
|
|
|
|
}
|
2021-04-13 11:05:38 +02:00
|
|
|
|
2016-08-09 12:12:34 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Get a record containing the current state of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static PVS_cache_storage get_record(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_record(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get a reference to the PVS_cache_storage instance with the specified UUID.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_uuid">UUID of object to return</param>
|
|
|
|
public static XenRef<PVS_cache_storage> get_by_uuid(Session session, string _uuid)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_by_uuid(session.opaque_ref, _uuid);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Create a new PVS_cache_storage instance, and return its handle.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_record">All constructor arguments</param>
|
|
|
|
public static XenRef<PVS_cache_storage> create(Session session, PVS_cache_storage _record)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_create(session.opaque_ref, _record);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Create a new PVS_cache_storage instance, and return its handle.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_record">All constructor arguments</param>
|
|
|
|
public static XenRef<Task> async_create(Session session, PVS_cache_storage _record)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.async_pvs_cache_storage_create(session.opaque_ref, _record);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Destroy the specified PVS_cache_storage instance.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static void destroy(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
session.JsonRpcClient.pvs_cache_storage_destroy(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Destroy the specified PVS_cache_storage instance.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static XenRef<Task> async_destroy(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.async_pvs_cache_storage_destroy(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get the uuid field of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static string get_uuid(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2016-09-20 13:33:00 +02:00
|
|
|
/// Get the host field of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
2016-09-20 13:33:00 +02:00
|
|
|
public static XenRef<Host> get_host(Session session, string _pvs_cache_storage)
|
2016-08-09 12:12:34 +02:00
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_host(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get the SR field of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static XenRef<SR> get_SR(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_sr(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
2016-09-20 13:33:00 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Get the site field of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-09-20 13:33:00 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static XenRef<PVS_site> get_site(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_site(session.opaque_ref, _pvs_cache_storage);
|
2016-09-20 13:33:00 +02:00
|
|
|
}
|
|
|
|
|
2016-08-09 12:12:34 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Get the size field of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static long get_size(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage);
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
|
2016-09-20 13:33:00 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Get the VDI field of the given PVS_cache_storage.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-09-20 13:33:00 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
/// <param name="_pvs_cache_storage">The opaque_ref of the given pvs_cache_storage</param>
|
|
|
|
public static XenRef<VDI> get_VDI(Session session, string _pvs_cache_storage)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_vdi(session.opaque_ref, _pvs_cache_storage);
|
2016-09-20 13:33:00 +02:00
|
|
|
}
|
|
|
|
|
2016-09-05 15:12:42 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Return a list of all the PVS_cache_storages known to the system.
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-09-05 15:12:42 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
public static List<XenRef<PVS_cache_storage>> get_all(Session session)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_all(session.opaque_ref);
|
2016-09-05 15:12:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get all the PVS_cache_storage Records at once, in a single XML RPC call
|
2017-09-13 18:14:07 +02:00
|
|
|
/// First published in XenServer 7.1.
|
2016-09-05 15:12:42 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="session">The session</param>
|
|
|
|
public static Dictionary<XenRef<PVS_cache_storage>, PVS_cache_storage> get_all_records(Session session)
|
|
|
|
{
|
2023-02-09 23:31:22 +01:00
|
|
|
return session.JsonRpcClient.pvs_cache_storage_get_all_records(session.opaque_ref);
|
2016-09-05 15:12:42 +02:00
|
|
|
}
|
|
|
|
|
2016-08-09 12:12:34 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Unique identifier/object reference
|
|
|
|
/// </summary>
|
|
|
|
public virtual string uuid
|
|
|
|
{
|
|
|
|
get { return _uuid; }
|
|
|
|
set
|
|
|
|
{
|
|
|
|
if (!Helper.AreEqual(value, _uuid))
|
|
|
|
{
|
|
|
|
_uuid = value;
|
|
|
|
NotifyPropertyChanged("uuid");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 18:14:07 +02:00
|
|
|
private string _uuid = "";
|
2016-08-09 12:12:34 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2016-09-20 13:33:00 +02:00
|
|
|
/// The host on which this object defines PVS cache storage
|
2016-08-09 12:12:34 +02:00
|
|
|
/// </summary>
|
2017-09-13 18:14:07 +02:00
|
|
|
[JsonConverter(typeof(XenRefConverter<Host>))]
|
2016-09-20 13:33:00 +02:00
|
|
|
public virtual XenRef<Host> host
|
2016-08-09 12:12:34 +02:00
|
|
|
{
|
2016-09-20 13:33:00 +02:00
|
|
|
get { return _host; }
|
2016-08-09 12:12:34 +02:00
|
|
|
set
|
|
|
|
{
|
2016-09-20 13:33:00 +02:00
|
|
|
if (!Helper.AreEqual(value, _host))
|
2016-08-09 12:12:34 +02:00
|
|
|
{
|
2016-09-20 13:33:00 +02:00
|
|
|
_host = value;
|
|
|
|
NotifyPropertyChanged("host");
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 18:14:07 +02:00
|
|
|
private XenRef<Host> _host = new XenRef<Host>("OpaqueRef:NULL");
|
2016-08-09 12:12:34 +02:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// SR providing storage for the PVS cache
|
|
|
|
/// </summary>
|
2017-09-13 18:14:07 +02:00
|
|
|
[JsonConverter(typeof(XenRefConverter<SR>))]
|
2016-08-09 12:12:34 +02:00
|
|
|
public virtual XenRef<SR> SR
|
|
|
|
{
|
|
|
|
get { return _SR; }
|
|
|
|
set
|
|
|
|
{
|
|
|
|
if (!Helper.AreEqual(value, _SR))
|
|
|
|
{
|
|
|
|
_SR = value;
|
|
|
|
NotifyPropertyChanged("SR");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 18:14:07 +02:00
|
|
|
private XenRef<SR> _SR = new XenRef<SR>("OpaqueRef:NULL");
|
2016-08-09 12:12:34 +02:00
|
|
|
|
2016-09-20 13:33:00 +02:00
|
|
|
/// <summary>
|
|
|
|
/// The PVS_site for which this object defines the storage
|
|
|
|
/// </summary>
|
2017-09-13 18:14:07 +02:00
|
|
|
[JsonConverter(typeof(XenRefConverter<PVS_site>))]
|
2016-09-20 13:33:00 +02:00
|
|
|
public virtual XenRef<PVS_site> site
|
|
|
|
{
|
|
|
|
get { return _site; }
|
|
|
|
set
|
|
|
|
{
|
|
|
|
if (!Helper.AreEqual(value, _site))
|
|
|
|
{
|
|
|
|
_site = value;
|
|
|
|
NotifyPropertyChanged("site");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 18:14:07 +02:00
|
|
|
private XenRef<PVS_site> _site = new XenRef<PVS_site>("OpaqueRef:NULL");
|
2016-09-20 13:33:00 +02:00
|
|
|
|
2016-08-09 12:12:34 +02:00
|
|
|
/// <summary>
|
|
|
|
/// The size of the cache VDI (in bytes)
|
|
|
|
/// </summary>
|
|
|
|
public virtual long size
|
|
|
|
{
|
|
|
|
get { return _size; }
|
|
|
|
set
|
|
|
|
{
|
|
|
|
if (!Helper.AreEqual(value, _size))
|
|
|
|
{
|
|
|
|
_size = value;
|
|
|
|
NotifyPropertyChanged("size");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 18:14:07 +02:00
|
|
|
private long _size = 21474836480;
|
2016-09-20 13:33:00 +02:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The VDI used for caching
|
|
|
|
/// </summary>
|
2017-09-13 18:14:07 +02:00
|
|
|
[JsonConverter(typeof(XenRefConverter<VDI>))]
|
2016-09-20 13:33:00 +02:00
|
|
|
public virtual XenRef<VDI> VDI
|
|
|
|
{
|
|
|
|
get { return _VDI; }
|
|
|
|
set
|
|
|
|
{
|
|
|
|
if (!Helper.AreEqual(value, _VDI))
|
|
|
|
{
|
|
|
|
_VDI = value;
|
|
|
|
NotifyPropertyChanged("VDI");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 18:14:07 +02:00
|
|
|
private XenRef<VDI> _VDI = new XenRef<VDI>("OpaqueRef:NULL");
|
2016-08-09 12:12:34 +02:00
|
|
|
}
|
|
|
|
}
|