Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abbedsedk opened this issue Sep 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@abbedsedk
Copy link

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

@abbedsedk abbedsedk added the bug Something isn't working label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant