16
16
__author__ = 'VMware, Inc.'
17
17
18
18
import argparse
19
- import requests
20
19
from com .vmware .nsx_policy_client_for_vmc import create_nsx_policy_client_for_vmc
21
20
from vmware .vapi .bindings .struct import PrettyPrinter as NsxPrettyPrinter
22
21
from com .vmware .nsx_policy .model_client import ApiError
@@ -85,7 +84,7 @@ def create_policy_based_l3_vpn(self, vpn_id):
85
84
try :
86
85
context = self .get_l3_vpn_context ()
87
86
local_end_point_ip = context .available_local_addresses [0 ].address_value
88
- print "local_end_point_ip={}" .format (local_end_point_ip )
87
+ print ( "local_end_point_ip={}" .format (local_end_point_ip ) )
89
88
destination_subnet = [L3VpnSubnet (subnet = "10.3.0.0/16" )] # Value should be per the user setup config
90
89
source_subnet = [L3VpnSubnet (subnet = "10.2.0.0/16" )] # Value should be per the user setup config
91
90
@@ -135,7 +134,7 @@ def create_route_based_l3_vpn(self, vpn_id):
135
134
try :
136
135
context = self .get_l3_vpn_context ()
137
136
local_end_point_ip = context .available_local_addresses [0 ].address_value
138
- print "local_end_point_ip={}" .format (local_end_point_ip )
137
+ print ( "local_end_point_ip={}" .format (local_end_point_ip ) )
139
138
tunnel_subnet = TunnelSubnet (ip_addresses = ["169.254.2.1" ], # Value should be per the user setup config
140
139
prefix_length = 24 ) # Value should be per the user setup config
141
140
bgpconfig1 = BgpNeighborConfig (links = None ,
@@ -152,10 +151,10 @@ def create_route_based_l3_vpn(self, vpn_id):
152
151
neighbor_list = self .nsx_client .infra .tier_0s .locale_services .bgp .Neighbors .list (tier0_id = "vmc" ,
153
152
locale_service_id = "default"
154
153
)
155
- print "List of neighbors={}" .format (neighbor_list )
154
+ print ( "List of neighbors={}" .format (neighbor_list ) )
156
155
get_neighbhor = self .nsx_client .infra .tier_0s .locale_services .bgp .Neighbors .get (
157
156
tier0_id = "vmc" , locale_service_id = "default" , neighbor_id = "rb_neighbor_1" )
158
- print "get_neighbhor={}" .format (get_neighbhor )
157
+ print ( "get_neighbhor={}" .format (get_neighbhor ) )
159
158
160
159
l3vpn_session = RouteBasedL3VpnSession (routing_config_path = get_neighbhor .path ,
161
160
tunnel_subnets = [
0 commit comments