Commit 3c657abe authored by Dietmar Maurer's avatar Dietmar Maurer

GUI: use lxc instead of openvz

parent 04a567a6
...@@ -10,7 +10,7 @@ JSSRC= \ ...@@ -10,7 +10,7 @@ JSSRC= \
qemu/SendKeyMenu.js \ qemu/SendKeyMenu.js \
qemu/CmdMenu.js \ qemu/CmdMenu.js \
qemu/TemplateMenu.js \ qemu/TemplateMenu.js \
openvz/CmdMenu.js \ lxc/CmdMenu.js \
VNCConsole.js \ VNCConsole.js \
data/TimezoneStore.js \ data/TimezoneStore.js \
data/reader/JsonObject.js \ data/reader/JsonObject.js \
...@@ -139,16 +139,10 @@ JSSRC= \ ...@@ -139,16 +139,10 @@ JSSRC= \
qemu/SnapshotTree.js \ qemu/SnapshotTree.js \
qemu/Config.js \ qemu/Config.js \
qemu/CreateWizard.js \ qemu/CreateWizard.js \
openvz/StatusView.js \ lxc/StatusView.js \
openvz/Summary.js \ lxc/Summary.js \
openvz/RessourceEdit.js \ lxc/Config.js \
openvz/RessourceView.js \ lxc/CreateWizard.js \
openvz/Options.js \
openvz/Network.js \
openvz/DNS.js \
openvz/BeanCounterGrid.js \
openvz/Config.js \
openvz/CreateWizard.js \
pool/StatusView.js \ pool/StatusView.js \
pool/Summary.js \ pool/Summary.js \
pool/Config.js \ pool/Config.js \
......
...@@ -924,9 +924,9 @@ Ext.define('PVE.Utils', { statics: { ...@@ -924,9 +924,9 @@ Ext.define('PVE.Utils', { statics: {
}, },
openConsoleWindow: function(viewer, vmtype, vmid, nodename, vmname) { openConsoleWindow: function(viewer, vmtype, vmid, nodename, vmname) {
// kvm, openvz, shell, upgrade // kvm, lxc, shell, upgrade
if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'openvz')) { if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'lxc')) {
throw "missing vmid"; throw "missing vmid";
} }
...@@ -942,8 +942,8 @@ Ext.define('PVE.Utils', { statics: { ...@@ -942,8 +942,8 @@ Ext.define('PVE.Utils', { statics: {
if (vmtype === 'kvm') { if (vmtype === 'kvm') {
url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy'; url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params); PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'openvz') { } else if (vmtype === 'lxc') {
url = '/nodes/' + nodename + '/openvz/' + vmid.toString() + '/spiceproxy'; url = '/nodes/' + nodename + '/lxc/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params); PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'shell') { } else if (vmtype === 'shell') {
url = '/nodes/' + nodename + '/spiceshell'; url = '/nodes/' + nodename + '/spiceshell';
...@@ -970,7 +970,7 @@ Ext.define('PVE.Utils', { statics: { ...@@ -970,7 +970,7 @@ Ext.define('PVE.Utils', { statics: {
openVNCViewer: function(vmtype, vmid, nodename, vmname, novnc) { openVNCViewer: function(vmtype, vmid, nodename, vmname, novnc) {
var url = Ext.urlEncode({ var url = Ext.urlEncode({
console: vmtype, // kvm, openvz, upgrade or shell console: vmtype, // kvm, lxc, upgrade or shell
novnc: novnc ? 1 : 0, novnc: novnc ? 1 : 0,
vmid: vmid, vmid: vmid,
vmname: vmname, vmname: vmname,
......
...@@ -393,9 +393,9 @@ Ext.define('PVE.KVMConsole', { ...@@ -393,9 +393,9 @@ Ext.define('PVE.KVMConsole', {
} }
}); });
Ext.define('PVE.OpenVZConsole', { Ext.define('PVE.LxcConsole', {
extend: 'PVE.VNCConsole', extend: 'PVE.VNCConsole',
alias: ['widget.pveOpenVZConsole'], alias: ['widget.pveLxcConsole'],
initComponent : function() { initComponent : function() {
var me = this; var me = this;
...@@ -408,7 +408,7 @@ Ext.define('PVE.OpenVZConsole', { ...@@ -408,7 +408,7 @@ Ext.define('PVE.OpenVZConsole', {
throw "no VM ID specified"; throw "no VM ID specified";
} }
var baseUrl = "/nodes/" + me.nodename + "/openvz/" + me.vmid; var baseUrl = "/nodes/" + me.nodename + "/lxc/" + me.vmid;
var vm_command = function(cmd, params, reload_applet) { var vm_command = function(cmd, params, reload_applet) {
PVE.Utils.API2Request({ PVE.Utils.API2Request({
......
...@@ -132,13 +132,13 @@ Ext.define('PVE.ConsoleWorkspace', { ...@@ -132,13 +132,13 @@ Ext.define('PVE.ConsoleWorkspace', {
vmname: param.vmname, vmname: param.vmname,
toplevel: true toplevel: true
}; };
} else if (consoleType === 'openvz') { } else if (consoleType === 'lxc') {
me.title = "CT " + param.vmid; me.title = "CT " + param.vmid;
if (param.vmname) { if (param.vmname) {
me.title += " ('" + param.vmname + "')"; me.title += " ('" + param.vmname + "')";
} }
content = { content = {
xtype: 'pveOpenVZConsole', xtype: 'pveLxcConsole',
novnc: param.novnc, novnc: param.novnc,
vmid: param.vmid, vmid: param.vmid,
nodename: param.node, nodename: param.node,
...@@ -288,7 +288,7 @@ Ext.define('PVE.StdWorkspace', { ...@@ -288,7 +288,7 @@ Ext.define('PVE.StdWorkspace', {
root: 'PVE.dc.Config', root: 'PVE.dc.Config',
node: 'PVE.node.Config', node: 'PVE.node.Config',
qemu: 'PVE.qemu.Config', qemu: 'PVE.qemu.Config',
openvz: 'PVE.openvz.Config', lxc: 'PVE.lxc.Config',
storage: 'PVE.storage.Browser', storage: 'PVE.storage.Browser',
pool: 'pvePoolConfig' pool: 'pvePoolConfig'
}; };
...@@ -342,7 +342,7 @@ Ext.define('PVE.StdWorkspace', { ...@@ -342,7 +342,7 @@ Ext.define('PVE.StdWorkspace', {
text: gettext("Create CT"), text: gettext("Create CT"),
disabled: !caps.vms['VM.Allocate'], disabled: !caps.vms['VM.Allocate'],
handler: function() { handler: function() {
var wiz = Ext.create('PVE.openvz.CreateWizard', {}); var wiz = Ext.create('PVE.lxc.CreateWizard', {});
wiz.show(); wiz.show();
} }
}); });
......
...@@ -2,7 +2,7 @@ Ext.define('PVE.button.ConsoleButton', { ...@@ -2,7 +2,7 @@ Ext.define('PVE.button.ConsoleButton', {
extend: 'Ext.button.Split', extend: 'Ext.button.Split',
alias: 'widget.pveConsoleButton', alias: 'widget.pveConsoleButton',
consoleType: 'shell', // one of 'shell', 'kvm', 'openvz', 'upgrade' consoleType: 'shell', // one of 'shell', 'kvm', 'lxc', 'upgrade'
consoleName: undefined, consoleName: undefined,
......
...@@ -39,7 +39,7 @@ Ext.define('PVE.data.ResourceStore', { ...@@ -39,7 +39,7 @@ Ext.define('PVE.data.ResourceStore', {
hidden: true, hidden: true,
convert: function(value, record) { convert: function(value, record) {
var info = record.data; var info = record.data;
if (info.type === 'qemu' || info.type === 'openvz' || info.type === 'node') { if (info.type === 'qemu' || info.type === 'lxc' || info.type === 'node') {
return (Ext.isNumeric(info.uptime) && (info.uptime > 0)); return (Ext.isNumeric(info.uptime) && (info.uptime > 0));
} else { } else {
return false; return false;
...@@ -65,7 +65,7 @@ Ext.define('PVE.data.ResourceStore', { ...@@ -65,7 +65,7 @@ Ext.define('PVE.data.ResourceStore', {
text = info.pool; text = info.pool;
} else if (info.type === 'storage') { } else if (info.type === 'storage') {
text = info.storage + ' (' + info.node + ')'; text = info.storage + ' (' + info.node + ')';
} else if (info.type === 'qemu' || info.type === 'openvz') { } else if (info.type === 'qemu' || info.type === 'lxc') {
text = String(info.vmid); text = String(info.vmid);
if (info.name) { if (info.name) {
text += " (" + info.name + ')'; text += " (" + info.name + ')';
......
...@@ -27,6 +27,10 @@ Ext.define('PVE.grid.BackupView', { ...@@ -27,6 +27,10 @@ Ext.define('PVE.grid.BackupView', {
filterFn = function(item) { filterFn = function(item) {
return item.data.volid.match(':backup/vzdump-openvz-'); return item.data.volid.match(':backup/vzdump-openvz-');
}; };
} else if (vmtype === 'lxc') {
filterFn = function(item) {
return item.data.volid.match(':backup/vzdump-lxc-');
};
} else if (vmtype === 'qemu') { } else if (vmtype === 'qemu') {
filterFn = function(item) { filterFn = function(item) {
return item.data.volid.match(':backup/vzdump-qemu-'); return item.data.volid.match(':backup/vzdump-qemu-');
......
...@@ -203,8 +203,8 @@ Ext.define('PVE.grid.ResourceGrid', { ...@@ -203,8 +203,8 @@ Ext.define('PVE.grid.ResourceGrid', {
menu = Ext.create('PVE.qemu.TemplateMenu', { menu = Ext.create('PVE.qemu.TemplateMenu', {
pveSelNode: record pveSelNode: record
}); });
} else if (record.data.type === 'openvz') { } else if (record.data.type === 'lxc') {
menu = Ext.create('PVE.openvz.CmdMenu', { menu = Ext.create('PVE.lxc.CmdMenu', {
pveSelNode: record pveSelNode: record
}); });
} else { } else {
......
...@@ -35,8 +35,8 @@ Ext.define('PVE.panel.NotesView', { ...@@ -35,8 +35,8 @@ Ext.define('PVE.panel.NotesView', {
if (vmtype === 'qemu') { if (vmtype === 'qemu') {
me.url = '/api2/extjs/nodes/' + nodename + '/qemu/' + vmid + '/config'; me.url = '/api2/extjs/nodes/' + nodename + '/qemu/' + vmid + '/config';
} else if (vmtype === 'openvz') { } else if (vmtype === 'lxc') {
me.url = '/api2/extjs/nodes/' + nodename + '/openvz/' + vmid + '/config'; me.url = '/api2/extjs/nodes/' + nodename + '/lxc/' + vmid + '/config';
} else { } else {
throw "unknown vm type '" + vmtype + "'"; throw "unknown vm type '" + vmtype + "'";
} }
......
...@@ -20,9 +20,9 @@ Ext.define('PVE.tree.ResourceTree', { ...@@ -20,9 +20,9 @@ Ext.define('PVE.tree.ResourceTree', {
iconCls: 'x-tree-node-computer', iconCls: 'x-tree-node-computer',
text: gettext('Virtual Machine') text: gettext('Virtual Machine')
}, },
openvz: { lxc: {
iconCls: 'x-tree-node-openvz', iconCls: 'x-tree-node-openvz',
text: gettext('OpenVZ Container') text: gettext('LXC Container')
} }
} }
}, },
...@@ -46,7 +46,7 @@ Ext.define('PVE.tree.ResourceTree', { ...@@ -46,7 +46,7 @@ Ext.define('PVE.tree.ResourceTree', {
// numeric compare for VM IDs // numeric compare for VM IDs
// sort templates after regular VMs // sort templates after regular VMs
if (v1 === 'qemu' || v1 === 'openvz') { if (v1 === 'qemu' || v1 === 'lxc') {
if (n1.template && !n2.template) { if (n1.template && !n2.template) {
return 1; return 1;
} else if (n2.template && !n1.template) { } else if (n2.template && !n1.template) {
...@@ -340,8 +340,8 @@ Ext.define('PVE.tree.ResourceTree', { ...@@ -340,8 +340,8 @@ Ext.define('PVE.tree.ResourceTree', {
menu = Ext.create('PVE.qemu.TemplateMenu', { menu = Ext.create('PVE.qemu.TemplateMenu', {
pveSelNode: record pveSelNode: record
}); });
} else if (record.data.type === 'openvz') { } else if (record.data.type === 'lxc') {
menu = Ext.create('PVE.openvz.CmdMenu', { menu = Ext.create('PVE.lxc.CmdMenu', {
pveSelNode: record pveSelNode: record
}); });
} else { } else {
...@@ -393,7 +393,7 @@ Ext.define('PVE.tree.ResourceTree', { ...@@ -393,7 +393,7 @@ Ext.define('PVE.tree.ResourceTree', {
} }
}, },
checkVmMigration: function(record) { checkVmMigration: function(record) {
if (!(record.data.type === 'qemu' || record.data.type === 'openvz')) { if (!(record.data.type === 'qemu' || record.data.type === 'lxc')) {
throw "not a vm type"; throw "not a vm type";
} }
......
...@@ -924,9 +924,9 @@ Ext.define('PVE.Utils', { statics: { ...@@ -924,9 +924,9 @@ Ext.define('PVE.Utils', { statics: {
}, },
openConsoleWindow: function(viewer, vmtype, vmid, nodename, vmname) { openConsoleWindow: function(viewer, vmtype, vmid, nodename, vmname) {
// kvm, openvz, shell, upgrade // kvm, lxc, shell, upgrade
if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'openvz')) { if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'lxc')) {
throw "missing vmid"; throw "missing vmid";
} }
...@@ -942,8 +942,8 @@ Ext.define('PVE.Utils', { statics: { ...@@ -942,8 +942,8 @@ Ext.define('PVE.Utils', { statics: {
if (vmtype === 'kvm') { if (vmtype === 'kvm') {
url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy'; url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params); PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'openvz') { } else if (vmtype === 'lxc') {
url = '/nodes/' + nodename + '/openvz/' + vmid.toString() + '/spiceproxy'; url = '/nodes/' + nodename + '/lxc/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params); PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'shell') { } else if (vmtype === 'shell') {
url = '/nodes/' + nodename + '/spiceshell'; url = '/nodes/' + nodename + '/spiceshell';
...@@ -970,7 +970,7 @@ Ext.define('PVE.Utils', { statics: { ...@@ -970,7 +970,7 @@ Ext.define('PVE.Utils', { statics: {
openVNCViewer: function(vmtype, vmid, nodename, vmname, novnc) { openVNCViewer: function(vmtype, vmid, nodename, vmname, novnc) {
var url = Ext.urlEncode({ var url = Ext.urlEncode({
console: vmtype, // kvm, openvz, upgrade or shell console: vmtype, // kvm, lxc, upgrade or shell
novnc: novnc ? 1 : 0, novnc: novnc ? 1 : 0,
vmid: vmid, vmid: vmid,
vmname: vmname, vmname: vmname,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment