Convert hosts example to use VRs with all transports
This commit is contained in:
parent
af57691e2f
commit
0e4abe55bd
@ -10,31 +10,7 @@ from solar.dblayer.model import ModelMeta
|
|||||||
def run():
|
def run():
|
||||||
ModelMeta.remove_all()
|
ModelMeta.remove_all()
|
||||||
|
|
||||||
resources = vr.create('nodes', 'templates/nodes_with_transports.yaml', {'count': 2})
|
resources = vr.create('nodes', 'templates/nodes.yaml', {'count': 2})
|
||||||
nodes = [x for x in resources if x.name.startswith('node')]
|
|
||||||
node1, node2 = nodes
|
|
||||||
|
|
||||||
hosts1 = vr.create('hosts_file1', 'resources/hosts_file', {})[0]
|
|
||||||
hosts2 = vr.create('hosts_file2', 'resources/hosts_file', {})[0]
|
|
||||||
node1.connect(hosts1, {
|
|
||||||
'name': 'hosts:name',
|
|
||||||
'ip': 'hosts:ip',
|
|
||||||
})
|
|
||||||
|
|
||||||
node2.connect(hosts1, {
|
|
||||||
'name': 'hosts:name',
|
|
||||||
'ip': 'hosts:ip',
|
|
||||||
})
|
|
||||||
|
|
||||||
node1.connect(hosts2, {
|
|
||||||
'name': 'hosts:name',
|
|
||||||
'ip': 'hosts:ip',
|
|
||||||
})
|
|
||||||
|
|
||||||
node2.connect(hosts2, {
|
|
||||||
'name': 'hosts:name',
|
|
||||||
'ip': 'hosts:ip',
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
run()
|
run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user