Exemplo n.º 1
0
 def setUpClass(cls):
     cls.hosts_json = ('{"hosts":'
                       '[{"host_name":'
                       ' "host_name1","service": "compute1",'
                       '"zone": "nova1"},'
                       '{"host_name": "host_name2",'
                       '"service": "compute2","zone": "nova2"}]}')
     cls.hosts = Host.deserialize(cls.hosts_json, "json")
Exemplo n.º 2
0
 def setUpClass(cls):
     cls.host_json = ('{"host":[{"resource":'
                      '{"cpu": "1",'
                      '"disk_gb": "1028", '
                      ' "host": "nova", '
                      '"memory_mb": "8192", '
                      '"project": "(total)"}}]}')
     cls.host = Host.deserialize(cls.host_json, "json")
Exemplo n.º 3
0
 def setUp(cls):
     cls.hosts_json = '{"hosts":' \
                      '[{"host_name":' \
                      ' "host_name1","service": "compute1",' \
                      '"zone": "nova1"},' \
                      '{"host_name": "host_name2",' \
                      '"service": "compute2","zone": "nova2"}]}'
     cls.hosts = Host.deserialize(cls.hosts_json, "json")
Exemplo n.º 4
0
 def setUpClass(cls):
     cls.hosts_xml = ('<?xml version="1.0" encoding="UTF-8"?>'
                      '<hosts>'
                      '<host host_name="host_name1" '
                      'service="compute1" zone="nova1"/>'
                      '<host host_name="host_name2"'
                      ' service="compute2" zone="nova2"/>'
                      '</hosts>')
     cls.hosts = Host.deserialize(cls.hosts_xml, "xml")
Exemplo n.º 5
0
    def setUpClass(cls):
        cls.host_xml = ('<?xml version="1.0" encoding="UTF-8"?>'
                        '<host> <resource>'
                        ' <project>(total)</project>'
                        ' <memory_mb>8192</memory_mb>'
                        ' <host>nova</host> <cpu>1</cpu>'
                        ' <disk_gb>1028</disk_gb>'
                        ' </resource> </host>')

        cls.host = Host.deserialize(cls.host_xml, "xml")
Exemplo n.º 6
0
    def setUp(cls):
        cls.host_xml = '<?xml version="1.0" encoding="UTF-8"?>' \
                       '<host> <resource>' \
                       ' <project>(total)</project>' \
                       ' <memory_mb>8192</memory_mb>' \
                       ' <host>nova</host> <cpu>1</cpu>' \
                       ' <disk_gb>1028</disk_gb>' \
                       ' </resource> </host>'

        cls.host = Host.deserialize(cls.host_xml, "xml")