public Response <string> copy_bios_strings(string session, string opaque_ref, string host) { Hashtable src = (Hashtable)proxy.db.Tables["host"].Rows[host].Props["bios_strings"].XapiObjectValue; Db.Row destVm = proxy.db.Tables["vm"].Rows[opaque_ref]; destVm.Props["bios_strings"] = new Db.Prop(destVm, "bios_strings", new Hashtable(src)); proxy.SendModObject("vm", opaque_ref); return(new Response <string>("")); }
protected Response <string> createObj(string clazz, object obj) { Db.Table t = proxy.db.Tables[clazz]; string opaque_ref = proxy.CreateOpaqueRef(); Db.Row r = t.Rows.Add(opaque_ref); r.PopulateFrom(DbProxy.ProxyToHashtable(obj.GetType(), obj)); proxy.SendCreateObject(clazz, opaque_ref); return(new Response <string>(opaque_ref)); }
public Response <string> create(string session, Proxy_VIF vif) { Db.Table t = proxy.db.Tables["vif"]; string opaque_ref = proxy.CreateOpaqueRef(); Db.Row r = t.Rows.Add(opaque_ref); r.PopulateFrom(DbProxy.ProxyToHashtable(typeof(Proxy_VIF), vif)); proxy.SendCreateObject("vif", opaque_ref); return(new Response <string>(opaque_ref)); }