
To be able test examples in different envs nodes can not be created in examples. Now before running an example nodes should be created manually. For fuel-devops nodes will be created automaticly in run.sh script
31 lines
570 B
Python
Executable File
31 lines
570 B
Python
Executable File
#!/usr/bin/python
|
|
from solar.core.resource import resource as rs
|
|
|
|
|
|
def run():
|
|
|
|
node1, node2 = rs.load_all(startswith='node')[:2]
|
|
hosts1, hosts2 = rs.load_all(startswith='hosts_file')[:2]
|
|
|
|
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()
|