switched container engine to lxc
This commit is contained in:
parent
35c7265bff
commit
25fbc6a088
|
@ -133,3 +133,22 @@ class ProxmoxOpenVZTraffic(ServiceMonitor):
|
|||
'object_id': vps.id,
|
||||
'hostname': vps.hostname,
|
||||
}
|
||||
|
||||
|
||||
class LxcController(ServiceController):
|
||||
model = 'vps.VPS'
|
||||
|
||||
RESOURCES = (
|
||||
('memory', 'mem'),
|
||||
('disk', 'disk'),
|
||||
('vcpu', 'vcpu')
|
||||
)
|
||||
|
||||
def prepare(self):
|
||||
super(LxcController, self).prepare()
|
||||
|
||||
def save(self, vps):
|
||||
# TODO create the container
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -4,13 +4,14 @@ from orchestra.contrib.settings import Setting
|
|||
VPS_TYPES = Setting('VPS_TYPES',
|
||||
(
|
||||
('openvz', 'OpenVZ container'),
|
||||
('lxc', 'LXC container')
|
||||
),
|
||||
validators=[Setting.validate_choices]
|
||||
)
|
||||
|
||||
|
||||
VPS_DEFAULT_TYPE = Setting('VPS_DEFAULT_TYPE',
|
||||
'openvz',
|
||||
'lxc',
|
||||
choices=VPS_TYPES
|
||||
)
|
||||
|
||||
|
@ -18,13 +19,14 @@ VPS_DEFAULT_TYPE = Setting('VPS_DEFAULT_TYPE',
|
|||
VPS_TEMPLATES = Setting('VPS_TEMPLATES',
|
||||
(
|
||||
('debian7', 'Debian 7 - Wheezy'),
|
||||
('placeholder', 'LXC placeholder')
|
||||
),
|
||||
validators=[Setting.validate_choices]
|
||||
)
|
||||
|
||||
|
||||
VPS_DEFAULT_TEMPLATE = Setting('VPS_DEFAULT_TEMPLATE',
|
||||
'debian7',
|
||||
'placeholder',
|
||||
choices=VPS_TEMPLATES
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue