Merge "Allow 4byte ASNs in dynamic routing client"

This commit is contained in:
Zuul 2020-09-08 22:00:12 +00:00 committed by Gerrit Code Review
commit 62c187f5c7
4 changed files with 8 additions and 6 deletions

View File

@ -22,7 +22,7 @@ from neutronclient.neutron.v2_0.bgp import peer as bgp_peer
# Allowed BGP Autonomous number range # Allowed BGP Autonomous number range
MIN_AS_NUM = 1 MIN_AS_NUM = 1
MAX_AS_NUM = 65535 MAX_AS_NUM = 4294967295
def get_network_id(client, id_or_name): def get_network_id(client, id_or_name):

View File

@ -15,4 +15,4 @@ BGP_SPEAKER = 'bgp_speaker'
BGP_PEERS = 'bgp_peers' BGP_PEERS = 'bgp_peers'
BGP_PEER = 'bgp_peer' BGP_PEER = 'bgp_peer'
MIN_AS_NUM = 1 MIN_AS_NUM = 1
MAX_AS_NUM = 65535 MAX_AS_NUM = 4294967295

View File

@ -96,7 +96,7 @@ class CLITestV20BGPPeerJSON(test_cli20.CLITestV20Base):
name = 'my-name' name = 'my-name'
my_id = 'my-id' my_id = 'my-id'
peerip = '1.1.1.1' peerip = '1.1.1.1'
remote_asnum = '65536' remote_asnum = '4294967296'
args = [name, args = [name,
'--peer-ip', peerip, '--peer-ip', peerip,
'--remote-as', remote_asnum, ] '--remote-as', remote_asnum, ]
@ -107,7 +107,8 @@ class CLITestV20BGPPeerJSON(test_cli20.CLITestV20Base):
self._test_create_resource, self._test_create_resource,
resource, cmd, name, my_id, args, resource, cmd, name, my_id, args,
position_names, position_values) position_names, position_values)
self.assertEqual('remote-as "65536" should be an integer [%s:%s].' % self.assertEqual('remote-as "4294967296" should be an '
'integer [%s:%s].' %
(bgp_speaker.MIN_AS_NUM, bgp_speaker.MAX_AS_NUM), (bgp_speaker.MIN_AS_NUM, bgp_speaker.MAX_AS_NUM),
str(exc)) str(exc))

View File

@ -108,7 +108,7 @@ class CLITestV20BGPSpeakerJSON(test_cli20.CLITestV20Base):
None) None)
name = 'my-name' name = 'my-name'
my_id = 'my-id' my_id = 'my-id'
local_asnum = '65536' local_asnum = '4294967296'
args = [name, args = [name,
'--local-as', local_asnum] '--local-as', local_asnum]
position_names = ['name', 'local_as', ] position_names = ['name', 'local_as', ]
@ -117,7 +117,8 @@ class CLITestV20BGPSpeakerJSON(test_cli20.CLITestV20Base):
self._test_create_resource, self._test_create_resource,
resource, cmd, name, my_id, args, resource, cmd, name, my_id, args,
position_names, position_values) position_names, position_values)
self.assertEqual('local-as "65536" should be an integer [%s:%s].' % self.assertEqual('local-as "4294967296" should be an '
'integer [%s:%s].' %
(bgp_speaker.MIN_AS_NUM, bgp_speaker.MAX_AS_NUM), (bgp_speaker.MIN_AS_NUM, bgp_speaker.MAX_AS_NUM),
str(exc)) str(exc))