from neutron.plugins.nicira.common import (
exceptions as nvp_exc)
from neutron.plugins.nicira import NvpApiClient
+from neutron.version import version_info
LOG = log.getLogger(__name__)
LQUEUE_RESOURCE = "lqueue"
GWSERVICE_RESOURCE = "gateway-service"
# Current neutron version
-NEUTRON_VERSION = "2013.1"
+NEUTRON_VERSION = version_info.release_string()
# Other constants for NVP resource
MAX_DISPLAY_NAME_LEN = 40
# Constants for NAT rules
router = {'display_name': router_name,
'uuid': router_id,
- 'tags': [{'scope': 'quantum', 'tag': '2013.1'},
+ 'tags': [{'scope': 'quantum', 'tag': nvplib.NEUTRON_VERSION},
{'scope': 'os_tid', 'tag': '%s' % tenant_id}],
'distributed': False,
'routing_config': {'type': 'RoutingTableRoutingConfig',
'type': 'RouterNextHop'},
'type': 'SingleDefaultRouteImplicitRoutingConfig'},
'tags': [{'scope': 'os_tid', 'tag': 'fake_tenant_id'},
- {'scope': 'quantum', 'tag': '2013.1'}],
+ {'scope': 'quantum',
+ 'tag': nvplib.NEUTRON_VERSION}],
'type': 'LogicalRouterConfig'}
self.assertEqual(expected, body)
expected = {'display_name': 'fake_router_name',
'routing_config': {'type': 'RoutingTableRoutingConfig'},
'tags': [{'scope': 'os_tid', 'tag': 'fake_tenant_id'},
- {'scope': 'quantum', 'tag': '2013.1'}],
+ {'scope': 'quantum',
+ 'tag': nvplib.NEUTRON_VERSION}],
'type': 'LogicalRouterConfig'}
self.assertEqual(expected, body)