Skip to content

Commit 13a336c

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
added 'features' (like nfs:on) to openvz See merge request !179
2 parents ab79c2c + 503bbb5 commit 13a336c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+86
-9
lines changed

install/sql/incremental/upd_dev_collection.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,7 @@ UPDATE `dbispconfig`.`sys_ini` SET `default_logo` = 'data:image/png;base64,iVBOR
140140
ALTER TABLE `directive_snippets` ADD `required_php_snippets` VARCHAR(255) NOT NULL DEFAULT '' AFTER `customer_viewable`;
141141
ALTER TABLE `dns_rr` CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600';
142142
ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600';
143-
ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm';
143+
ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm';
144+
145+
ALTER TABLE openvz_template ADD COLUMN `features` varchar(255) DEFAULT NULL AFTER `capability`;
146+
ALTER TABLE openvz_vm ADD COLUMN `features` TEXT DEFAULT NULL AFTER `capability`;

install/sql/ispconfig3.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,14 +1087,15 @@ CREATE TABLE IF NOT EXISTS `openvz_template` (
10871087
`nameserver` varchar(255) DEFAULT NULL,
10881088
`create_dns` varchar(1) NOT NULL DEFAULT 'n',
10891089
`capability` varchar(255) DEFAULT NULL,
1090+
`features` varchar(255) DEFAULT NULL,
10901091
PRIMARY KEY (`template_id`)
10911092
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
10921093

10931094
--
10941095
-- Dumping data for table `openvz_template`
10951096
--
10961097

1097-
INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '');
1098+
INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`, `features`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '', '');
10981099

10991100
-- --------------------------------------------------------
11001101

@@ -1150,6 +1151,7 @@ CREATE TABLE IF NOT EXISTS `openvz_vm` (
11501151
`nameserver` varchar(255) NOT NULL DEFAULT '8.8.8.8 8.8.4.4',
11511152
`create_dns` varchar(1) NOT NULL DEFAULT 'n',
11521153
`capability` text,
1154+
`features` text,
11531155
`config` mediumtext,
11541156
PRIMARY KEY (`vm_id`)
11551157
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

interface/lib/plugins/vm_openvz_plugin.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ private function applyTemplate() {
132132
$sql .= "io_priority = ?, ";
133133
$sql .= "nameserver = ?, ";
134134
$sql .= "create_dns = ?, ";
135-
$sql .= "capability = ? ";
135+
$sql .= "capability = ?, ";
136+
$sql .= "features = ? ";
136137
$sql .= "WHERE vm_id = ?";
137-
$app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $this->id);
138+
$app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $tpl['features'], $this->id);
138139

139140
}
140141

@@ -193,6 +194,7 @@ private function makeOpenVZConfig() {
193194
$tpl->setVar('ip_address', $vm['ip_address']);
194195
$tpl->setVar('nameserver', $vm['nameserver']);
195196
$tpl->setVar('capability', $vm['capability']);
197+
$tpl->setVar('features', $vm['features']);
196198

197199
$tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ?", $app->functions->intval($vm['ostemplate_id']));
198200
$tpl->setVar('ostemplate', $tmp['template_file']);

interface/web/vm/form/openvz_template.tform.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,14 @@
459459
'width' => '30',
460460
'maxlength' => '255'
461461
),
462+
'features' => array (
463+
'datatype' => 'VARCHAR',
464+
'formtype' => 'TEXT',
465+
'default' => '',
466+
'value' => '',
467+
'width' => '30',
468+
'maxlength' => '255'
469+
),
462470
//#################################
463471
// ENDE Datatable fields
464472
//#################################

interface/web/vm/form/openvz_vm.tform.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,14 @@
306306
'width' => '30',
307307
'maxlength' => '255'
308308
),
309+
'features' => array (
310+
'datatype' => 'VARCHAR',
311+
'formtype' => 'TEXT',
312+
'default' => '',
313+
'value' => '',
314+
'width' => '30',
315+
'maxlength' => '255'
316+
),
309317
//#################################
310318
// ENDE Datatable fields
311319
//#################################

interface/web/vm/lib/lang/ar_openvz_template.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.';
9090
$wb['swappages_error_empty'] = 'Swappages is empty.';
9191
$wb['Template'] = 'Template';
9292
$wb['Advanced'] = 'Advanced';
93+
$wb['features_txt'] = 'Features';
9394
?>

interface/web/vm/lib/lang/ar_openvz_vm.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.';
3737
$wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
3838
$wb['Virtual server'] = 'Virtual server';
3939
$wb['Advanced'] = 'Advanced';
40+
$wb['features_txt'] = 'Features';
4041
?>

interface/web/vm/lib/lang/bg_openvz_template.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.';
9090
$wb['swappages_error_empty'] = 'Swappages is empty.';
9191
$wb['Template'] = 'Template';
9292
$wb['Advanced'] = 'Advanced';
93+
$wb['features_txt'] = 'Features';
9394
?>

interface/web/vm/lib/lang/bg_openvz_vm.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.';
3737
$wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.';
3838
$wb['Virtual server'] = 'Virtual server';
3939
$wb['Advanced'] = 'Advanced';
40+
$wb['features_txt'] = 'Features';
4041
?>

interface/web/vm/lib/lang/br_openvz_template.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.';
9090
$wb['swappages_error_empty'] = 'Swappages is empty.';
9191
$wb['Template'] = 'Template';
9292
$wb['Advanced'] = 'Advanced';
93+
$wb['features_txt'] = 'Features';
9394
?>

0 commit comments

Comments
 (0)