blob: ed387023b2db01f8253d51bacf48d25fe7c8819c [file] [log] [blame]
Tony Mack2d81e632013-04-09 02:34:10 -04001from plstackapi.openstack.client import OpenStackClient
2from plstackapi.openstack.driver import OpenStackDriver
3from plstackapi.planetstack.api.auth import auth_check
4from plstackapi.planetstack.models import DeploymentNetwork
5
6
7def add_deployment_network(auth, name):
8 auth_check(auth)
9 deployment = DeploymentNetwork(name=name)
10 deployment.save()
11 return deployment
12
13def delete_deployment_network(auth, filter={}):
14 auth_check(auth)
15 deployments = DeploymentNetwork.objects.filter(**filter)
16 for deployment in deployments:
17 deployment.delete()
18 return 1
19
20def get_deployment_networks(auth, filter={}):
21 auth_check(auth)
22 deployments = DeploymentNetwork.objects.filter(**filter)
23 return deployments
24
25
26