Manage base configuration on server

Fix #786
This commit is contained in:
Julien Duponchelle committed 2017-02-03 13:19:14 +01:00
1 parent afcd27f348
commit e892e5dfab
32 files changed
+652 -334

No files matched your search

-8
View File
@@ -80,7 +80,6 @@ def test_iou_create_with_params(http_compute, project, base_params):
params["l1_keepalives"] = True
params["startup_config_content"] = "hostname test"
params["use_default_iou_values"] = True
params["iourc_content"] = "test"
response = http_compute.post("/projects/{project_id}/iou/nodes".format(project_id=project.id), params, example=True)
assert response.status == 201
@@ -94,7 +93,6 @@ def test_iou_create_with_params(http_compute, project, base_params):
assert response.json["l1_keepalives"] is True
assert response.json["use_default_iou_values"] is True
assert "startup-config.cfg" in response.json["startup_config"]
with open(startup_config_file(project, response.json)) as f:
assert f.read() == "hostname test"
@@ -115,7 +113,6 @@ def test_iou_create_startup_config_already_exist(http_compute, project, base_par
assert response.status == 201
assert response.route == "/projects/{project_id}/iou/nodes"
assert "startup-config.cfg" in response.json["startup_config"]
with open(startup_config_file(project, response.json)) as f:
assert f.read() == "echo hello"
@@ -183,9 +180,7 @@ def test_iou_update(http_compute, vm, tmpdir, free_console_port, project):
"ethernet_adapters": 4,
"serial_adapters": 0,
"l1_keepalives": True,
"startup_config_content": "hostname test",
"use_default_iou_values": True,
"iourc_content": "test"
}
response = http_compute.put("/projects/{project_id}/iou/nodes/{node_id}".format(project_id=vm["project_id"], node_id=vm["node_id"]), params, example=True)
assert response.status == 200
@@ -197,9 +192,6 @@ def test_iou_update(http_compute, vm, tmpdir, free_console_port, project):
assert response.json["nvram"] == 2048
assert response.json["l1_keepalives"] is True
assert response.json["use_default_iou_values"] is True
assert "startup-config.cfg" in response.json["startup_config"]
with open(startup_config_file(project, response.json)) as f:
assert f.read() == "hostname test"
def test_iou_nio_create_udp(http_compute, vm):
-3
View File
@@ -43,7 +43,6 @@ def test_vpcs_get(http_compute, project, vm):
assert response.route == "/projects/{project_id}/vpcs/nodes/{node_id}"
assert response.json["name"] == "PC TEST 1"
assert response.json["project_id"] == project.id
assert response.json["startup_script_path"] is None
assert response.json["status"] == "stopped"
@@ -53,8 +52,6 @@ def test_vpcs_create_startup_script(http_compute, project):
assert response.route == "/projects/{project_id}/vpcs/nodes"
assert response.json["name"] == "PC TEST 1"
assert response.json["project_id"] == project.id
assert response.json["startup_script"] == os.linesep.join(["ip 192.168.1.2", "echo TEST"])
assert response.json["startup_script_path"] == "startup.vpc"
def test_vpcs_create_port(http_compute, project, free_console_port):