Debian Codegraph @

neutronclient/osc/v2/networking_bgpvpn/network_association.py

raw
1 # Copyright (c) 2016 Juniper Networks Inc.
2 # All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15 #
16
17 from osc_lib.utils import columns as column_util
18
19 from neutronclient._i18n import _
20 from neutronclient.osc.v2.networking_bgpvpn import constants
21 from neutronclient.osc.v2.networking_bgpvpn.resource_association import\
22 CreateBgpvpnResAssoc
23 from neutronclient.osc.v2.networking_bgpvpn.resource_association import\
24 DeleteBgpvpnResAssoc
25 from neutronclient.osc.v2.networking_bgpvpn.resource_association import\
26 ListBgpvpnResAssoc
27 from neutronclient.osc.v2.networking_bgpvpn.resource_association import\
28 ShowBgpvpnResAssoc
29
30
31 class BgpvpnNetAssoc(object):
32 _assoc_res_name = constants.NETWORK_RESOURCE_NAME
33 _resource = constants.NETWORK_ASSOC
34 _resource_plural = constants.NETWORK_ASSOCS
35
36 _attr_map = (
37 ('id', 'ID', column_util.LIST_BOTH),
38 ('tenant_id', 'Project', column_util.LIST_LONG_ONLY),
39 ('%s_id' % _assoc_res_name, '%s ID' % _assoc_res_name.capitalize(),
40 column_util.LIST_BOTH),
41 )
42 _formatters = {}
43
44
45 class CreateBgpvpnNetAssoc(BgpvpnNetAssoc, CreateBgpvpnResAssoc):
46 _description = _("Create a BGP VPN network association")
47 pass
48
49
50 class DeleteBgpvpnNetAssoc(BgpvpnNetAssoc, DeleteBgpvpnResAssoc):
51 _description = _("Delete a BGP VPN network association(s) for a given BGP "
52 "VPN")
53 pass
54
55
56 class ListBgpvpnNetAssoc(BgpvpnNetAssoc, ListBgpvpnResAssoc):
57 _description = _("List BGP VPN network associations for a given BGP VPN")
58 pass
59
60
61 class ShowBgpvpnNetAssoc(BgpvpnNetAssoc, ShowBgpvpnResAssoc):
62 _description = _("Show information of a given BGP VPN network association")
63 pass