Mailing List Archive

v2 subnet deletion
Hi,
I have a question regarding the deletion of a subnet in v2.
If Quantum has allocated IP's from this subnet to port's should we allow
the deletion of the subnet?
Do we want to prevent this until all of the allocated IP's on the subnet
are released?deleted?
Thanks
Gary

--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp
Re: v2 subnet deletion [ In reply to ]
On Tue, Jun 19, 2012 at 7:47 AM, Gary Kotton <gkotton@redhat.com> wrote:

> Hi,
> I have a question regarding the deletion of a subnet in v2.
> If Quantum has allocated IP's from this subnet to port's should we allow
> the deletion of the subnet?
> Do we want to prevent this until all of the allocated IP's on the subnet
> are released?deleted?
>

I would think so. This maps to what we have done with networks + ports in
quantum v1. Maybe some of the melange authors can comment here as well.

dan



> Thanks
> Gary
>
> --
> Mailing list: https://launchpad.net/~**netstack<https://launchpad.net/~netstack>
> Post to : netstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~**netstack<https://launchpad.net/~netstack>
> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: v2 subnet deletion [ In reply to ]
On 06/19/2012 05:49 PM, Dan Wendlandt wrote:
>
>
> On Tue, Jun 19, 2012 at 7:47 AM, Gary Kotton <gkotton@redhat.com
> <mailto:gkotton@redhat.com>> wrote:
>
> Hi,
> I have a question regarding the deletion of a subnet in v2.
> If Quantum has allocated IP's from this subnet to port's should we
> allow the deletion of the subnet?
> Do we want to prevent this until all of the allocated IP's on the
> subnet are released?deleted?
>
>
> I would think so. This maps to what we have done with networks +
> ports in quantum v1. Maybe some of the melange authors can comment
> here as well.
Thanks!
It seems that this is not the case with the base v2 support - for
example the deletion of a network:

def delete_network(self, context, id):
with context.session.begin():
network = self._get_network(context, id)

# TODO(anyone) Delegation?
ports_qry = context.session.query(models_v2.Port)
ports_qry.filter_by(network_id=id).delete()

subnets_qry = context.session.query(models_v2.Subnet)
subnets_qry.filter_by(network_id=id).delete()

context.session.delete(network)

I think that I now understand what "Delegation?" means. :)

Thanks
Gary
>
> dan
>
> Thanks
> Gary
>
> --
> Mailing list: https://launchpad.net/~netstack
> <https://launchpad.net/%7Enetstack>
> Post to : netstack@lists.launchpad.net
> <mailto:netstack@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~netstack
> <https://launchpad.net/%7Enetstack>
> More help : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Wendlandt
> Nicira, Inc: www.nicira.com <http://www.nicira.com>
> twitter: danwendlandt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>