Commit a328b950 authored by Łukasz Nowak's avatar Łukasz Nowak

kvm: Switch default and kvm-cluster to json-in-xml

default and kvm-cluster software types are now json-in-xml, so they accept
and return json-in-xml.

Update tests to show that xml and json-in-xml serialization works.

Note: There was invective to publish with pure XML serialisation, but it is
wrong idea because:

 1) serialisation in the software.cfg.json is provided for both ways
 2) requesting instances with given serialisation by profiles expect same
    serialisation

Request resilient instances with serialised, as they reply with json-in-xml.
parent cf488283
...@@ -19,15 +19,15 @@ md5sum = 7e90da1f6dac4233e1aa3248f48e357c ...@@ -19,15 +19,15 @@ md5sum = 7e90da1f6dac4233e1aa3248f48e357c
[template-kvm] [template-kvm]
filename = instance-kvm.cfg.jinja2 filename = instance-kvm.cfg.jinja2
md5sum = fb8f9a962cc1c0d986305c6a6ce59082 md5sum = 6db48369e93d740db3cf283f021a9652
[template-kvm-cluster] [template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in filename = instance-kvm-cluster.cfg.jinja2.in
md5sum = 8562882ac4a888d18db50e2a22e3ca86 md5sum = 406bf455afe1c71cb0e8cc04dd877f1d
[template-kvm-resilient] [template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2 filename = instance-kvm-resilient.cfg.jinja2
md5sum = a0fd4911401cbbda74323e8d1c7b18ad md5sum = 839fc16c112d3b87e2dbd2e382e326de
[template-kvm-import] [template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in filename = instance-kvm-import.cfg.jinja2.in
......
...@@ -32,7 +32,6 @@ global-ipv6 = {{ ipv6 }} ...@@ -32,7 +32,6 @@ global-ipv6 = {{ ipv6 }}
{% endfor -%} {% endfor -%}
[request-common] [request-common]
recipe = slapos.cookbook:request
software-url = ${slap-connection:software-release-url} software-url = ${slap-connection:software-release-url}
server-url = ${slap-connection:server-url} server-url = ${slap-connection:server-url}
key-file = ${slap-connection:key-file} key-file = ${slap-connection:key-file}
...@@ -47,6 +46,7 @@ config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }} ...@@ -47,6 +46,7 @@ config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
{% set use_nat = kvm_parameter_dict.get('use-nat', True) -%} {% set use_nat = kvm_parameter_dict.get('use-nat', True) -%}
[{{ section }}] [{{ section }}]
<= request-common <= request-common
recipe = slapos.cookbook:request.serialised
software-type = kvm software-type = kvm
name = {{ instance_name }} name = {{ instance_name }}
{% if kvm_parameter_dict.get('sticky-computer', '') -%} {% if kvm_parameter_dict.get('sticky-computer', '') -%}
...@@ -319,7 +319,7 @@ private-path-list += ...@@ -319,7 +319,7 @@ private-path-list +=
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
-extends = publish-early -extends = publish-early
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish.serialised
{% for name, value in publish_dict.items() -%} {% for name, value in publish_dict.items() -%}
{{ name }} = {{ value }} {{ name }} = {{ value }}
{% endfor %} {% endfor %}
......
...@@ -61,6 +61,7 @@ etc = ${buildout:directory}/etc ...@@ -61,6 +61,7 @@ etc = ${buildout:directory}/etc
# Bubble down the parameters of the requested instance to the user # Bubble down the parameters of the requested instance to the user
[request-kvm] [request-kvm]
recipe = slapos.cookbook:request.serialised
# Note: += doesn't work. # Note: += doesn't work.
return = return =
# Resilient related parameters # Resilient related parameters
......
...@@ -819,7 +819,9 @@ blank-line = ...@@ -819,7 +819,9 @@ blank-line =
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish # even if serialisation is json-in-xml, still use xml for publish, as
# SlapOS Master implementation does not support it
recipe = slapos.cookbook:publish.serialised
ipv6 = ${slap-network-information:global-ipv6} ipv6 = ${slap-network-information:global-ipv6}
backend-url = https://[${novnc-instance:ip}]:${novnc-instance:port}/vnc.html?auto=1&encrypt=1&password=${kvm-controller-parameter-dict:vnc-passwd} backend-url = https://[${novnc-instance:ip}]:${novnc-instance:port}/vnc.html?auto=1&encrypt=1&password=${kvm-controller-parameter-dict:vnc-passwd}
url = ${request-slave-frontend:connection-secure_access}/vnc.html?auto=1&encrypt=1&password=${kvm-controller-parameter-dict:vnc-passwd} url = ${request-slave-frontend:connection-secure_access}/vnc.html?auto=1&encrypt=1&password=${kvm-controller-parameter-dict:vnc-passwd}
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"software-type": { "software-type": {
"default": { "default": {
"title": "Default", "title": "Default",
"serialisation": "json-in-xml",
"description": "Standalone KVM", "description": "Standalone KVM",
"request": "instance-kvm-input-schema.json", "request": "instance-kvm-input-schema.json",
"response": "instance-kvm-output-schema.json", "response": "instance-kvm-output-schema.json",
......
...@@ -119,6 +119,10 @@ bootstrap_machine_param_dict = { ...@@ -119,6 +119,10 @@ bootstrap_machine_param_dict = {
class KvmMixin(object): class KvmMixin(object):
def getConnectionParameterDictJson(self):
return json.loads(
self.computer_partition.getConnectionParameterDict()['_'])
def getProcessInfo(self): def getProcessInfo(self):
hash_value = generateHashFromFiles([ hash_value = generateHashFromFiles([
os.path.join(self.computer_partition_root_path, hash_file) os.path.join(self.computer_partition_root_path, hash_file)
...@@ -161,13 +165,25 @@ class KvmMixin(object): ...@@ -161,13 +165,25 @@ class KvmMixin(object):
state=state) state=state)
class KvmMixinJson(object):
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps(super(KvmMixinJson, cls).getInstanceParameterDict())}
def rerequestInstance(self, parameter_dict, *args, **kwargs):
return super(KvmMixinJson, self).rerequestInstance(
parameter_dict={'_': json.dumps(parameter_dict)},
*args, **kwargs
)
@skipUnlessKvm @skipUnlessKvm
class TestInstance(InstanceTestCase, KvmMixin): class TestInstance(InstanceTestCase, KvmMixin):
__partition_reference__ = 'i' __partition_reference__ = 'i'
def test(self): def test(self):
connection_parameter_dict = self\ connection_parameter_dict = self.getConnectionParameterDictJson()
.computer_partition.getConnectionParameterDict()
present_key_list = [] present_key_list = []
assert_key_list = [ assert_key_list = [
'backend-url', 'url', 'monitor-setup-url', 'ipv6-network-info', 'backend-url', 'url', 'monitor-setup-url', 'ipv6-network-info',
...@@ -308,7 +324,12 @@ class TestMemoryManagement(InstanceTestCase, KvmMixin): ...@@ -308,7 +324,12 @@ class TestMemoryManagement(InstanceTestCase, KvmMixin):
) )
class MonitorAccessMixin(object): @skipUnlessKvm
class TestMemoryManagementJson(KvmMixinJson, TestMemoryManagement):
pass
class MonitorAccessMixin(KvmMixin):
def sqlite3_connect(self): def sqlite3_connect(self):
sqlitedb_file = os.path.join( sqlitedb_file = os.path.join(
os.path.abspath( os.path.abspath(
...@@ -335,8 +356,7 @@ class MonitorAccessMixin(object): ...@@ -335,8 +356,7 @@ class MonitorAccessMixin(object):
db.close() db.close()
def test_access_monitor(self): def test_access_monitor(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
monitor_setup_url = connection_parameter_dict['monitor-setup-url'] monitor_setup_url = connection_parameter_dict['monitor-setup-url']
monitor_url_with_auth = 'https' + monitor_setup_url.split('https')[2] monitor_url_with_auth = 'https' + monitor_setup_url.split('https')[2]
...@@ -349,8 +369,8 @@ class MonitorAccessMixin(object): ...@@ -349,8 +369,8 @@ class MonitorAccessMixin(object):
connection_xml = partition_information.get('connection_xml') connection_xml = partition_information.get('connection_xml')
if not connection_xml: if not connection_xml:
continue continue
connection_dict = slapos.util.xml2dict( connection_dict = json.loads(slapos.util.xml2dict(
connection_xml if six.PY3 else connection_xml.encode('utf-8')) connection_xml if six.PY3 else connection_xml.encode('utf-8'))['_'])
monitor_base_url = connection_dict.get('monitor-base-url') monitor_base_url = connection_dict.get('monitor-base-url')
if not monitor_base_url: if not monitor_base_url:
continue continue
...@@ -377,8 +397,7 @@ class TestAccessDefault(MonitorAccessMixin, InstanceTestCase): ...@@ -377,8 +397,7 @@ class TestAccessDefault(MonitorAccessMixin, InstanceTestCase):
expected_partition_with_monitor_base_url_count = 1 expected_partition_with_monitor_base_url_count = 1
def test(self): def test(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['url'], verify=False) result = requests.get(connection_parameter_dict['url'], verify=False)
self.assertEqual( self.assertEqual(
httplib.OK, httplib.OK,
...@@ -388,6 +407,11 @@ class TestAccessDefault(MonitorAccessMixin, InstanceTestCase): ...@@ -388,6 +407,11 @@ class TestAccessDefault(MonitorAccessMixin, InstanceTestCase):
self.assertNotIn('url-additional', connection_parameter_dict) self.assertNotIn('url-additional', connection_parameter_dict)
@skipUnlessKvm
class TestAccessDefaultJson(KvmMixinJson, TestAccessDefault):
pass
@skipUnlessKvm @skipUnlessKvm
class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase): class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'ada' __partition_reference__ = 'ada'
...@@ -400,8 +424,7 @@ class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase): ...@@ -400,8 +424,7 @@ class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase):
} }
def test(self): def test(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['url'], verify=False) result = requests.get(connection_parameter_dict['url'], verify=False)
self.assertEqual( self.assertEqual(
...@@ -419,6 +442,12 @@ class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase): ...@@ -419,6 +442,12 @@ class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase):
self.assertIn('<title>noVNC</title>', result.text) self.assertIn('<title>noVNC</title>', result.text)
@skipUnlessKvm
class TestAccessDefaultAdditionalJson(
KvmMixinJson, TestAccessDefaultAdditional):
pass
@skipUnlessKvm @skipUnlessKvm
class TestAccessDefaultBootstrap(MonitorAccessMixin, InstanceTestCase): class TestAccessDefaultBootstrap(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'adb' __partition_reference__ = 'adb'
...@@ -456,8 +485,7 @@ class TestAccessDefaultBootstrap(MonitorAccessMixin, InstanceTestCase): ...@@ -456,8 +485,7 @@ class TestAccessDefaultBootstrap(MonitorAccessMixin, InstanceTestCase):
self.slap.waitForInstance(max_retry=10) self.slap.waitForInstance(max_retry=10)
# END: mock .slapos-resource with tap.ipv4_addr # END: mock .slapos-resource with tap.ipv4_addr
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['url'], verify=False) result = requests.get(connection_parameter_dict['url'], verify=False)
self.assertEqual( self.assertEqual(
...@@ -493,8 +521,7 @@ class TestAccessKvmCluster(MonitorAccessMixin, InstanceTestCase): ...@@ -493,8 +521,7 @@ class TestAccessKvmCluster(MonitorAccessMixin, InstanceTestCase):
})} })}
def test(self): def test(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['KVM0-url'], verify=False) result = requests.get(connection_parameter_dict['KVM0-url'], verify=False)
self.assertEqual( self.assertEqual(
httplib.OK, httplib.OK,
...@@ -527,8 +554,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase): ...@@ -527,8 +554,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
})} })}
def test(self): def test(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['KVM0-url'], verify=False) result = requests.get(connection_parameter_dict['KVM0-url'], verify=False)
self.assertEqual( self.assertEqual(
httplib.OK, httplib.OK,
...@@ -571,8 +597,7 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase): ...@@ -571,8 +597,7 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase):
}))} }))}
def test(self): def test(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
result = requests.get( result = requests.get(
connection_parameter_dict['test-machine1-url'], verify=False) connection_parameter_dict['test-machine1-url'], verify=False)
self.assertEqual( self.assertEqual(
...@@ -697,6 +722,12 @@ ir3:sshd-on-watch RUNNING""", ...@@ -697,6 +722,12 @@ ir3:sshd-on-watch RUNNING""",
) )
@skipUnlessKvm
class TestInstanceResilientJson(
KvmMixinJson, TestInstanceResilient):
pass
@skipUnlessKvm @skipUnlessKvm
class TestInstanceResilientDiskTypeIde(InstanceTestCase, KvmMixin): class TestInstanceResilientDiskTypeIde(InstanceTestCase, KvmMixin):
@classmethod @classmethod
...@@ -706,6 +737,12 @@ class TestInstanceResilientDiskTypeIde(InstanceTestCase, KvmMixin): ...@@ -706,6 +737,12 @@ class TestInstanceResilientDiskTypeIde(InstanceTestCase, KvmMixin):
} }
@skipUnlessKvm
class TestInstanceResilientDiskTypeIdeJson(
KvmMixinJson, TestInstanceResilientDiskTypeIde):
pass
@skipUnlessKvm @skipUnlessKvm
class TestAccessResilientAdditional(InstanceTestCase): class TestAccessResilientAdditional(InstanceTestCase):
__partition_reference__ = 'ara' __partition_reference__ = 'ara'
...@@ -741,6 +778,12 @@ class TestAccessResilientAdditional(InstanceTestCase): ...@@ -741,6 +778,12 @@ class TestAccessResilientAdditional(InstanceTestCase):
self.assertIn('<title>noVNC</title>', result.text) self.assertIn('<title>noVNC</title>', result.text)
@skipUnlessKvm
class TestAccessResilientAdditionalJson(
KvmMixinJson, TestAccessResilientAdditional):
pass
class TestInstanceNbdServer(InstanceTestCase): class TestInstanceNbdServer(InstanceTestCase):
__partition_reference__ = 'ins' __partition_reference__ = 'ins'
instance_max_retry = 5 instance_max_retry = 5
...@@ -769,6 +812,12 @@ class TestInstanceNbdServer(InstanceTestCase): ...@@ -769,6 +812,12 @@ class TestInstanceNbdServer(InstanceTestCase):
self.assertIn("WARNING", connection_parameter_dict['status_message']) self.assertIn("WARNING", connection_parameter_dict['status_message'])
@skipUnlessKvm
class TestInstanceNbdServerJson(
KvmMixinJson, TestInstanceNbdServer):
pass
class FakeImageHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): class FakeImageHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def log_message(self, *args): def log_message(self, *args):
if os.environ.get('SLAPOS_TEST_DEBUG'): if os.environ.get('SLAPOS_TEST_DEBUG'):
...@@ -1047,6 +1096,12 @@ class TestBootImageUrlList(InstanceTestCase, FakeImageServerMixin): ...@@ -1047,6 +1096,12 @@ class TestBootImageUrlList(InstanceTestCase, FakeImageServerMixin):
self.assertPromiseFails(self.config_state_promise) self.assertPromiseFails(self.config_state_promise)
@skipUnlessKvm
class TestBootImageUrlListJson(
KvmMixinJson, TestBootImageUrlList):
pass
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlListResilient(TestBootImageUrlList): class TestBootImageUrlListResilient(TestBootImageUrlList):
kvm_instance_partition_reference = 'biul2' kvm_instance_partition_reference = 'biul2'
...@@ -1056,6 +1111,12 @@ class TestBootImageUrlListResilient(TestBootImageUrlList): ...@@ -1056,6 +1111,12 @@ class TestBootImageUrlListResilient(TestBootImageUrlList):
return 'kvm-resilient' return 'kvm-resilient'
@skipUnlessKvm
class TestBootImageUrlListResilientJson(
KvmMixinJson, TestBootImageUrlListResilient):
pass
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlSelect(TestBootImageUrlList): class TestBootImageUrlSelect(TestBootImageUrlList):
__partition_reference__ = 'bius' __partition_reference__ = 'bius'
...@@ -1158,6 +1219,12 @@ class TestBootImageUrlSelect(TestBootImageUrlList): ...@@ -1158,6 +1219,12 @@ class TestBootImageUrlSelect(TestBootImageUrlList):
) )
@skipUnlessKvm
class TestBootImageUrlSelectJson(
KvmMixinJson, TestBootImageUrlSelect):
pass
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlSelectResilient(TestBootImageUrlSelect): class TestBootImageUrlSelectResilient(TestBootImageUrlSelect):
kvm_instance_partition_reference = 'bius2' kvm_instance_partition_reference = 'bius2'
...@@ -1167,6 +1234,12 @@ class TestBootImageUrlSelectResilient(TestBootImageUrlSelect): ...@@ -1167,6 +1234,12 @@ class TestBootImageUrlSelectResilient(TestBootImageUrlSelect):
return 'kvm-resilient' return 'kvm-resilient'
@skipUnlessKvm
class TestBootImageUrlSelectResilientJson(
KvmMixinJson, TestBootImageUrlSelectResilient):
pass
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlListKvmCluster(InstanceTestCase, FakeImageServerMixin): class TestBootImageUrlListKvmCluster(InstanceTestCase, FakeImageServerMixin):
__partition_reference__ = 'biulkc' __partition_reference__ = 'biulkc'
...@@ -1246,7 +1319,7 @@ class TestBootImageUrlSelectKvmCluster(TestBootImageUrlListKvmCluster): ...@@ -1246,7 +1319,7 @@ class TestBootImageUrlSelectKvmCluster(TestBootImageUrlListKvmCluster):
@skipUnlessKvm @skipUnlessKvm
class TestNatRules(InstanceTestCase): class TestNatRules(KvmMixin, InstanceTestCase):
__partition_reference__ = 'nr' __partition_reference__ = 'nr'
@classmethod @classmethod
...@@ -1256,8 +1329,7 @@ class TestNatRules(InstanceTestCase): ...@@ -1256,8 +1329,7 @@ class TestNatRules(InstanceTestCase):
} }
def test(self): def test(self):
connection_parameter_dict = self.computer_partition\ connection_parameter_dict = self.getConnectionParameterDictJson()
.getConnectionParameterDict()
self.assertIn('nat-rule-port-tcp-100', connection_parameter_dict) self.assertIn('nat-rule-port-tcp-100', connection_parameter_dict)
self.assertIn('nat-rule-port-tcp-200', connection_parameter_dict) self.assertIn('nat-rule-port-tcp-200', connection_parameter_dict)
...@@ -1272,6 +1344,12 @@ class TestNatRules(InstanceTestCase): ...@@ -1272,6 +1344,12 @@ class TestNatRules(InstanceTestCase):
) )
@skipUnlessKvm
class TestNatRulesJson(
KvmMixinJson, TestNatRules):
pass
@skipUnlessKvm @skipUnlessKvm
class TestNatRulesKvmCluster(InstanceTestCase): class TestNatRulesKvmCluster(InstanceTestCase):
__partition_reference__ = 'nrkc' __partition_reference__ = 'nrkc'
...@@ -1351,6 +1429,12 @@ class TestWhitelistFirewall(InstanceTestCase): ...@@ -1351,6 +1429,12 @@ class TestWhitelistFirewall(InstanceTestCase):
self.assertGreater(len(self.content_json), len(resolv_conf_ip_list)) self.assertGreater(len(self.content_json), len(resolv_conf_ip_list))
@skipUnlessKvm
class TestWhitelistFirewallJson(
KvmMixinJson, TestWhitelistFirewall):
pass
@skipUnlessKvm @skipUnlessKvm
class TestWhitelistFirewallRequest(TestWhitelistFirewall): class TestWhitelistFirewallRequest(TestWhitelistFirewall):
whitelist_domains = '2.2.2.2 3.3.3.3\n4.4.4.4' whitelist_domains = '2.2.2.2 3.3.3.3\n4.4.4.4'
...@@ -1368,6 +1452,12 @@ class TestWhitelistFirewallRequest(TestWhitelistFirewall): ...@@ -1368,6 +1452,12 @@ class TestWhitelistFirewallRequest(TestWhitelistFirewall):
self.assertIn('4.4.4.4', self.content_json) self.assertIn('4.4.4.4', self.content_json)
@skipUnlessKvm
class TestWhitelistFirewallRequestJson(
KvmMixinJson, TestWhitelistFirewallRequest):
pass
@skipUnlessKvm @skipUnlessKvm
class TestWhitelistFirewallResilient(TestWhitelistFirewall): class TestWhitelistFirewallResilient(TestWhitelistFirewall):
kvm_instance_partition_reference = 'wf2' kvm_instance_partition_reference = 'wf2'
...@@ -1377,6 +1467,12 @@ class TestWhitelistFirewallResilient(TestWhitelistFirewall): ...@@ -1377,6 +1467,12 @@ class TestWhitelistFirewallResilient(TestWhitelistFirewall):
return 'kvm-resilient' return 'kvm-resilient'
@skipUnlessKvm
class TestWhitelistFirewallResilientJson(
KvmMixinJson, TestWhitelistFirewallResilient):
pass
@skipUnlessKvm @skipUnlessKvm
class TestWhitelistFirewallRequestResilient(TestWhitelistFirewallRequest): class TestWhitelistFirewallRequestResilient(TestWhitelistFirewallRequest):
kvm_instance_partition_reference = 'wf2' kvm_instance_partition_reference = 'wf2'
...@@ -1386,6 +1482,12 @@ class TestWhitelistFirewallRequestResilient(TestWhitelistFirewallRequest): ...@@ -1386,6 +1482,12 @@ class TestWhitelistFirewallRequestResilient(TestWhitelistFirewallRequest):
return 'kvm-resilient' return 'kvm-resilient'
@skipUnlessKvm
class TestWhitelistFirewallRequestResilientJson(
KvmMixinJson, TestWhitelistFirewallRequestResilient):
pass
@skipUnlessKvm @skipUnlessKvm
class TestWhitelistFirewallCluster(TestWhitelistFirewall): class TestWhitelistFirewallCluster(TestWhitelistFirewall):
kvm_instance_partition_reference = 'wf1' kvm_instance_partition_reference = 'wf1'
...@@ -1454,6 +1556,12 @@ dd if=/dev/zero of=/dev/virt1 bs=4096 count=500k""" ...@@ -1454,6 +1556,12 @@ dd if=/dev/zero of=/dev/virt1 bs=4096 count=500k"""
self.assertTrue(os.access(slapos_wipe_device_disk, os.X_OK)) self.assertTrue(os.access(slapos_wipe_device_disk, os.X_OK))
@skipUnlessKvm
class TestDiskDevicePathWipeDiskOndestroyJson(
KvmMixinJson, TestDiskDevicePathWipeDiskOndestroy):
pass
@skipUnlessKvm @skipUnlessKvm
class TestImageDownloadController(InstanceTestCase, FakeImageServerMixin): class TestImageDownloadController(InstanceTestCase, FakeImageServerMixin):
__partition_reference__ = 'idc' __partition_reference__ = 'idc'
...@@ -1716,6 +1824,12 @@ class TestParameterDefault(InstanceTestCase, KvmMixin): ...@@ -1716,6 +1824,12 @@ class TestParameterDefault(InstanceTestCase, KvmMixin):
self._test({'ram-size': 2048}, "ram_max_size = '2560'") self._test({'ram-size': 2048}, "ram_max_size = '2560'")
@skipUnlessKvm
class TestParameterDefaultJson(
KvmMixinJson, TestParameterDefault):
pass
@skipUnlessKvm @skipUnlessKvm
class TestParameterResilient(TestParameterDefault): class TestParameterResilient(TestParameterDefault):
__partition_reference__ = 'pr' __partition_reference__ = 'pr'
......
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