blob: ed387023b2db01f8253d51bacf48d25fe7c8819c [file] [log] [blame]
from plstackapi.openstack.client import OpenStackClient
from plstackapi.openstack.driver import OpenStackDriver
from plstackapi.planetstack.api.auth import auth_check
from plstackapi.planetstack.models import DeploymentNetwork
def add_deployment_network(auth, name):
auth_check(auth)
deployment = DeploymentNetwork(name=name)
deployment.save()
return deployment
def delete_deployment_network(auth, filter={}):
auth_check(auth)
deployments = DeploymentNetwork.objects.filter(**filter)
for deployment in deployments:
deployment.delete()
return 1
def get_deployment_networks(auth, filter={}):
auth_check(auth)
deployments = DeploymentNetwork.objects.filter(**filter)
return deployments