From 56754e064bb36d5b40b32d987fc2813b11b73d70 Mon Sep 17 00:00:00 2001 From: chandrashekh-vmw Date: Mon, 22 Jul 2019 15:06:59 +0000 Subject: [PATCH] fixes in print to work in python3 Signed-off-by: chandrashekh-vmw --- samples/vmc/networks_nsxt/l3_vpn_crud.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/samples/vmc/networks_nsxt/l3_vpn_crud.py b/samples/vmc/networks_nsxt/l3_vpn_crud.py index 80387ff7..96b4ef6b 100644 --- a/samples/vmc/networks_nsxt/l3_vpn_crud.py +++ b/samples/vmc/networks_nsxt/l3_vpn_crud.py @@ -16,7 +16,6 @@ __author__ = 'VMware, Inc.' import argparse -import requests from com.vmware.nsx_policy_client_for_vmc import create_nsx_policy_client_for_vmc from vmware.vapi.bindings.struct import PrettyPrinter as NsxPrettyPrinter from com.vmware.nsx_policy.model_client import ApiError @@ -85,7 +84,7 @@ class NSXPolicyL3VPN(object): try: context = self.get_l3_vpn_context() local_end_point_ip = context.available_local_addresses[0].address_value - print "local_end_point_ip={}".format(local_end_point_ip) + print("local_end_point_ip={}".format(local_end_point_ip)) destination_subnet = [L3VpnSubnet(subnet="10.3.0.0/16")] # Value should be per the user setup config source_subnet = [L3VpnSubnet(subnet="10.2.0.0/16")] # Value should be per the user setup config @@ -135,7 +134,7 @@ class NSXPolicyL3VPN(object): try: context = self.get_l3_vpn_context() local_end_point_ip = context.available_local_addresses[0].address_value - print "local_end_point_ip={}".format(local_end_point_ip) + print("local_end_point_ip={}".format(local_end_point_ip)) tunnel_subnet = TunnelSubnet(ip_addresses=["169.254.2.1"], # Value should be per the user setup config prefix_length=24) # Value should be per the user setup config bgpconfig1 = BgpNeighborConfig(links=None, @@ -152,10 +151,10 @@ class NSXPolicyL3VPN(object): neighbor_list = self.nsx_client.infra.tier_0s.locale_services.bgp.Neighbors.list(tier0_id="vmc", locale_service_id="default" ) - print "List of neighbors={}".format(neighbor_list) + print("List of neighbors={}".format(neighbor_list)) get_neighbhor = self.nsx_client.infra.tier_0s.locale_services.bgp.Neighbors.get( tier0_id="vmc", locale_service_id="default", neighbor_id="rb_neighbor_1") - print "get_neighbhor={}".format(get_neighbhor) + print("get_neighbhor={}".format(get_neighbhor)) l3vpn_session = RouteBasedL3VpnSession(routing_config_path=get_neighbhor.path, tunnel_subnets=[