Skip to content

inconsistent IpAddressBlock visibility - powercli VMware.Sdk.Nsx.Policy 4.1.0.21605558 #38

Description

@abbedsedk

Describe the bug

Uppon creation of NSX Project, in the scenario when adding an External ip address block to the project for external connectivity,
the Invoke-OrgsOrgIdProjectsProjectIdInfraCreateOrPatchIpAddressBlock command expect a visibility of "EXTERNAL"
but before using the invoke command, the Initialize-IpAddressBlock command expect a visibility of "PUBLIC".

Reproduction steps

1.$IpAddressBlock = Initialize-IpAddressBlock -Description $ProjectPUBipBlockId -Id $ProjectPUBipBlockId -Cidr $ProjectPUBcidr -Visibility "EXTERNAL"
Initialize-IpAddressBlock: Cannot bind parameter 'Visibility'. Cannot convert value "EXTERNAL" to type "VMware.Bindings.Nsx.Policy.Model.IpAddressBlock+VisibilityEnum". Error: "Unable to match the identifier name EXTERNAL to a valid enumerator name. Specify one of the following enumerator names and try again:
PRIVATE, PUBLIC"
2.$IpAddressBlock = Initialize-IpAddressBlock -Description $ProjectPUBipBlockId -Id $ProjectPUBipBlockId -Cidr $ProjectPUBcidr -Visibility "PUBLIC"
3. Invoke-OrgsOrgIdProjectsProjectIdInfraCreateOrPatchIpAddressBlock -orgId $Orgs -projectId $ProjectName -ipBlockId $ProjectPUBipBlockId -ipAddressBlock $ipAddressBlock -Verbose -Debug
Invoke-OrgsOrgIdProjectsProjectIdInfraCreateOrPatchIpAddressBlock: Error calling OrgsOrgIdProjectsProjectIdInfraCreateOrPatchIpAddressBlock: {
"details" : "Field level validation errors: {value PUBLIC of property visibility is not one of the allowed values [PRIVATE, EXTERNAL]}",
"httpStatus" : "BAD_REQUEST",
"error_code" : 255,
"module_name" : "common-services",
"error_message" : "Field level validation errors: {value PUBLIC of property visibility is not one of the allowed values [PRIVATE, EXTERNAL]}"
}

Expected behavior

Initialize-IpAddressBlock should be expecting the same allowed values property of visibility [PRIVATE, EXTERNAL]
as Invoke-OrgsOrgIdProjectsProjectIdInfraCreateOrPatchIpAddressBlock

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions