Skip to content

Commit 56754e0

Browse files
fixes in print to work in python3
Signed-off-by: chandrashekh-vmw <[email protected]>
1 parent ac26bfa commit 56754e0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

samples/vmc/networks_nsxt/l3_vpn_crud.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
__author__ = 'VMware, Inc.'
1717

1818
import argparse
19-
import requests
2019
from com.vmware.nsx_policy_client_for_vmc import create_nsx_policy_client_for_vmc
2120
from vmware.vapi.bindings.struct import PrettyPrinter as NsxPrettyPrinter
2221
from com.vmware.nsx_policy.model_client import ApiError
@@ -85,7 +84,7 @@ def create_policy_based_l3_vpn(self, vpn_id):
8584
try:
8685
context = self.get_l3_vpn_context()
8786
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))
8988
destination_subnet = [L3VpnSubnet(subnet="10.3.0.0/16")] # Value should be per the user setup config
9089
source_subnet = [L3VpnSubnet(subnet="10.2.0.0/16")] # Value should be per the user setup config
9190

@@ -135,7 +134,7 @@ def create_route_based_l3_vpn(self, vpn_id):
135134
try:
136135
context = self.get_l3_vpn_context()
137136
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))
139138
tunnel_subnet = TunnelSubnet(ip_addresses=["169.254.2.1"], # Value should be per the user setup config
140139
prefix_length=24) # Value should be per the user setup config
141140
bgpconfig1 = BgpNeighborConfig(links=None,
@@ -152,10 +151,10 @@ def create_route_based_l3_vpn(self, vpn_id):
152151
neighbor_list = self.nsx_client.infra.tier_0s.locale_services.bgp.Neighbors.list(tier0_id="vmc",
153152
locale_service_id="default"
154153
)
155-
print "List of neighbors={}".format(neighbor_list)
154+
print("List of neighbors={}".format(neighbor_list))
156155
get_neighbhor = self.nsx_client.infra.tier_0s.locale_services.bgp.Neighbors.get(
157156
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))
159158

160159
l3vpn_session = RouteBasedL3VpnSession(routing_config_path=get_neighbhor.path,
161160
tunnel_subnets=[

0 commit comments

Comments
 (0)