azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

[Compute] Update NAT pool to NAT rule V2 for VMSS creation

Open zhoxing-ms opened this issue 2 years ago • 2 comments

Feature request - Close: #22682

Related command

az vmss create

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change [Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

zhoxing-ms avatar Aug 23 '22 10:08 zhoxing-ms

Compute

yonzhan avatar Aug 23 '22 11:08 yonzhan

@Mahip @.***>, could you help look into this?

-a


From: Xing Zhou @.> Sent: Tuesday, August 23, 2022 3:08 AM To: Azure/azure-cli @.> Cc: Anavi Nahar @.>; Mention @.> Subject: Re: [Azure/azure-cli] [Compute] Update NAT pool to NAT rule V2 for VMSS creation (PR #23638)

@zhoxing-ms commented on this pull request.


In src/azure-cli/azure/cli/command_modules/vm/_template_builder.pyhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fpull%2F23638%23discussion_r952417682&data=05%7C01%7Canavin%40microsoft.com%7C34f876c820b442cdf29808da84ef6733%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637968461014345806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uZVj8eb3ZNjPpuo7aNIEHWDZfwBDXHfSazgA1tuHNS8%3D&reserved=0:

+def build_nat_rule_v2(cmd, name, location, lb_name, frontend_ip_name, backend_pool_name, backend_port, instance_count,

  •                  disable_overprovision):
    
  • lb_id = "resourceId('Microsoft.Network/loadBalancers', '{}')".format(lb_name)
  • nat_rule = {
  •    "type": "Microsoft.Network/loadBalancers/inboundNatRules",
    
  •    "apiVersion": get_target_network_api(cmd.cli_ctx),
    
  •    "name": name,
    
  •    "location": location,
    
  •    "properties": {
    
  •        "frontendIPConfiguration": {
    
  •            'id': "[concat({}, '/frontendIPConfigurations/', '{}')]".format(lb_id, frontend_ip_name)
    
  •        },
    
  •        "backendAddressPool": {
    
  •            "id": "[concat({}, '/backendAddressPools/', '{}')]".format(lb_id, backend_pool_name)
    
  •        },
    
  •        "backendPort": backend_port,
    
  •        "frontendPortRangeStart": "50000",
    
  •        "frontendPortRangeEnd": str(max(50119, 49999 + instance_count * (1 if disable_overprovision else 2))),
    
  •        "protocol": "tcp",
    
  •        "idleTimeoutInMinutes": 5
    
  •    },
    
  •    "dependsOn": [
    
  •        "[concat('Microsoft.Network/loadBalancers/', '{}')]".format(lb_name)
    
  •    ]
    
  • }
  • return nat_rule

@fitzgeraldsteelehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffitzgeraldsteele&data=05%7C01%7Canavin%40microsoft.com%7C34f876c820b442cdf29808da84ef6733%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637968461014345806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FXo9nfCom%2F4%2F7FM%2B3Owfgca2BZ9Pp0Qs6r2xPetgbog%3D&reserved=0 @anavinaharhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fanavinahar&data=05%7C01%7Canavin%40microsoft.com%7C34f876c820b442cdf29808da84ef6733%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637968461014345806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2kphXfmazz%2Fi8BCrYQQrX3yUcAmnkT7ZTDoMS7xDv2s%3D&reserved=0 Could you help confirm that the definition of NAT Rule V2 resource is in line with expectations?

— Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fpull%2F23638%23pullrequestreview-1081851117&data=05%7C01%7Canavin%40microsoft.com%7C34f876c820b442cdf29808da84ef6733%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637968461014345806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5F6uoSmbN7k9poL%2BSx71wsCn6OuTEc1BAubhzIc8oPE%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE4ERXUHOMSWZCDG24IKJMTV2SPJFANCNFSM57K2FH4Q&data=05%7C01%7Canavin%40microsoft.com%7C34f876c820b442cdf29808da84ef6733%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637968461014345806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Jry0x01rQS18wqRuB7cyVCUhMaPAcg7c6GsXzt7N%2Fjs%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

anavinahar avatar Aug 23 '22 14:08 anavinahar