29 lines
732 B
Plaintext
29 lines
732 B
Plaintext
error(vm) :- nova:virtual_machine(vm), nova:network(vm, network),
|
|
not neutron:public_network(network),
|
|
neutron:owner(network, netowner), nova:owner(vm, vmowner), not same_group(netowner, vmowner)
|
|
|
|
|
|
same_group(user1, user2) :- cms:group(user1, group), cms:group(user2, group)
|
|
|
|
|
|
nova:virtual_machine("vm1")
|
|
nova:virtual_machine("vm2")
|
|
nova:virtual_machine("vm3")
|
|
nova:network("vm1", "net_private")
|
|
nova:network("vm2", "net_public")
|
|
|
|
neutron:public_network("net_public")
|
|
|
|
nova:owner("vm1", "tim")
|
|
nova:owner("vm2", "pete")
|
|
nova:owner("vm3", "pierre")
|
|
neutron:owner("net_private", "martin")
|
|
|
|
cms:group("pete", "congress")
|
|
cms:group("tim", "congress")
|
|
cms:group("martin", "congress")
|
|
cms:group("pierre", "congress")
|
|
|
|
|
|
|