mirror of https://github.com/apache/cloudstack.git
add getGuestOsType
This commit is contained in:
parent
ae87c21491
commit
d18f60379f
|
|
@ -465,6 +465,7 @@ fi
|
|||
%exclude %{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/vmopspremium
|
||||
%exclude %{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenheartbeat.sh
|
||||
%exclude %{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenserver56/patch-premium
|
||||
%exclude %{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch-premium
|
||||
%exclude %{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenserver56/InterfaceReconfigure.py
|
||||
%exclude %{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xs_cleanup.sh
|
||||
%endif
|
||||
|
|
@ -697,6 +698,7 @@ fi
|
|||
%{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/vmopspremium
|
||||
%{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenheartbeat.sh
|
||||
%{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenserver56/patch-premium
|
||||
%{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch-premium
|
||||
%{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xenserver56/InterfaceReconfigure.py
|
||||
%{_libdir}/%{name}/agent/scripts/vm/hypervisor/xenserver/xs_cleanup.sh
|
||||
%doc README
|
||||
|
|
|
|||
|
|
@ -626,6 +626,12 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*Override by subclass*/
|
||||
protected String getGuestOsType(String stdType, boolean bootFromCD) {
|
||||
return stdType;
|
||||
}
|
||||
|
||||
protected Answer execute(ModifySshKeysCommand cmd) {
|
||||
String publickey = cmd.getPubKey();
|
||||
String privatekey = cmd.getPrvKey();
|
||||
|
|
@ -2171,7 +2177,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
protected VM createVmFromTemplate(Connection conn, StartCommand cmd) throws XenAPIException, XmlRpcException {
|
||||
Set<VM> templates;
|
||||
VM vm = null;
|
||||
String guestOsTypeName = cmd.getGuestOSDescription();
|
||||
String guestOsTypeName = getGuestOsType(cmd.getGuestOSDescription(), false);
|
||||
templates = VM.getByNameLabel(conn, guestOsTypeName);
|
||||
assert templates.size() == 1 : "Should only have 1 template but found " + templates.size();
|
||||
VM template = templates.iterator().next();
|
||||
|
|
|
|||
Loading…
Reference in New Issue