mirror of https://github.com/apache/cloudstack.git
correctly use session in plugin
Conflicts: scripts/vm/hypervisor/xenserver/xenserver56/patch
This commit is contained in:
parent
0f216c1862
commit
03ddc57939
|
|
@ -4080,8 +4080,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
s_logger.warn(msg);
|
||||
return new Answer(cmd, false, msg);
|
||||
}
|
||||
sr.setNameLabel(conn, pool.getUuid());
|
||||
sr.setNameDescription(conn, pool.getName());
|
||||
long capacity = sr.getPhysicalSize(conn);
|
||||
long available = capacity - sr.getPhysicalUtilisation(conn);
|
||||
if (capacity == -1) {
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ def get_stats(session, collect_host_stats, consolidation_function, interval, sta
|
|||
|
||||
if collect_host_stats == "true" :
|
||||
url = "http://localhost/rrd_updates?"
|
||||
url += "session_id=" + session
|
||||
url += "session_id=" + session._session
|
||||
url += "&host=" + collect_host_stats
|
||||
url += "&cf=" + consolidation_function
|
||||
url += "&interval=" + str(interval)
|
||||
url += "&start=" + str(int(time.time())-100)
|
||||
else :
|
||||
url = "http://localhost/rrd_updates?"
|
||||
url += "session_id=" + session
|
||||
url += "session_id=" + session._session
|
||||
url += "&host=" + collect_host_stats
|
||||
url += "&cf=" + consolidation_function
|
||||
url += "&interval=" + str(interval)
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ def echo(fn):
|
|||
|
||||
|
||||
def get_xapi_session():
|
||||
xapi = XenAPI.xapi_local();
|
||||
xapi.login_with_password("","")
|
||||
return xapi._session
|
||||
session = XenAPI.xapi_local();
|
||||
session.login_with_password("","")
|
||||
return session
|
||||
|
||||
@echo
|
||||
def gethostvmstats(session, args):
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@ nfs.py=/opt/xensource/sm
|
|||
iptables=/etc/sysconfig
|
||||
patch.tgz=..,0775,/opt/xensource/bin
|
||||
vmops=..,0755,/etc/xapi.d/plugins
|
||||
systemvm-premium.zip=../../../../../vms,0755,/opt/xensource/bin
|
||||
systemvm.zip=../../../../../vms,0755,/opt/xensource/bin
|
||||
hostvmstats.py=..,0755,/opt/xensource/sm
|
||||
network_info.sh=..,0755,/opt/xensource/bin
|
||||
prepsystemvm.sh=..,0755,/opt/xensource/bin
|
||||
setupxenserver.sh=..,0755,/opt/xensource/bin
|
||||
make_migratable.sh=..,0755,/opt/xensource/bin
|
||||
networkUsage.sh=..,0755,/opt/xensource/bin
|
||||
setup_iscsi.sh=..,0755,/opt/xensource/bin
|
||||
|
|
|
|||
Loading…
Reference in New Issue