mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-10 03:30:52 +02:00
Add fixtures for nodes, instance_config and agent_info
This commit is contained in:
parent
7823343332
commit
1a19aac85a
41
prometheuspvesd/test/fixtures/fixtures.py
vendored
41
prometheuspvesd/test/fixtures/fixtures.py
vendored
|
@ -160,6 +160,24 @@ def defaults():
|
|||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def nodes():
|
||||
return [{
|
||||
"level": "",
|
||||
"id": "node/example-node",
|
||||
"disk": 4783488,
|
||||
"cpu": 0.0935113631167406,
|
||||
"maxcpu": 24,
|
||||
"maxmem": 142073272990,
|
||||
"mem": 135884478304,
|
||||
"node": "example-node",
|
||||
"type": "node",
|
||||
"status": "online",
|
||||
"maxdisk": 504209920,
|
||||
"uptime": 200
|
||||
}]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def qemus():
|
||||
return [
|
||||
|
@ -222,6 +240,29 @@ def qemus():
|
|||
]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def instance_config():
|
||||
return {
|
||||
"name": "102.example.com",
|
||||
"description": "{\"groups\": \"test-group\"}",
|
||||
"net0": "virtio=D8-85-75-47-2E-8D,bridge=vmbr122",
|
||||
"cpu": 2,
|
||||
"cores": 2
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def agent_info():
|
||||
return {
|
||||
"supported_commands": [{
|
||||
"name": "guest-network-get-interfaces",
|
||||
"enabled": True,
|
||||
"success-response": True
|
||||
}],
|
||||
"version": "5.2.0"
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def addresses():
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user