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

Can't list/add firewall rules on VMC 1.5 patch 01, NSX-T #39

Open
datvmc opened this issue Nov 13, 2018 · 5 comments
Open

Can't list/add firewall rules on VMC 1.5 patch 01, NSX-T #39

datvmc opened this issue Nov 13, 2018 · 5 comments
Assignees

Comments

@datvmc
Copy link

datvmc commented Nov 13, 2018

  • [ x] I am using the latest SDK version
  • [x ] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [x ] I have searched existing issues

Description

I am not able to list or get the firewall rules with my NSX-T VMC which is running 1.5 Patch 01
nsxApiClient = VmcNsxClients.custom()
.setBaseUrl(vmcUrl)
.setAuthorizationUrl(cspUrl)
.setRefreshToken()
.setOrganizationId(orgId)
.setSddcId(sddcId)
.build();
CommunicationMaps communicationMaps = nsxApiClient.createStub(CommunicationMaps.class);
CommunicationMapListResult mapListResult = ((CommunicationMaps) communicationMaps).list("mgw", null, null, 1000L, false, null);

Have the new apis been tested against the latest VMC version? If you could some sample code on how to create a firewall rule on a NSX-T VMC, that would be helpful.

Environment

  • SDK version:
  • Java version:
  • vSphere version:

Steps or code snippet to reproduce

Actual behavior

Expected behavior

@ggoodvmw
Copy link
Contributor

datvmc, that code works for me. What error are you getting? Is it the same error as in the other issue you've opened?

@datvmc
Copy link
Author

datvmc commented Nov 14, 2018

Hi ggoodvmw, thanks for taking a look. No, I am not getting an error. It just doesn't return anything.

Basically, I am trying to list and create firewall rules on NSX-T. I used to be able to do that with NSX-V, but looks like those APIs won't work with NSX-T.

I don't have a definitive document for that so sort of trying out from whatever I found googling. So, may be thats not the right API to start with to list/create firewall rules on mgmt/compute networks? Do you have some sample code for firewall rules on NSX-T? Or any documentation you could point me at?

@datvmc
Copy link
Author

datvmc commented Nov 14, 2018

Ok, it seems we have to go through the gateway policies api to list/create firewalls. I sort of got that working and will play around with it some more. If this is not the right way to do this, please let me know.

@ggoodvmw
Copy link
Contributor

Good to hear. I'll work with the gw firewall team to create some example code.

@skymeted
Copy link

skymeted commented Feb 4, 2019

I got samiliar issue.This sample code https://github.com/vmware/vsphere-automation-sdk-java/blob/master/src/main/java/vmware/samples/vmc/networks/LogicalNetworkCrud.java is not working for NSX-T. It will be helpful if you can provide which API should be used for? Some sample code will be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants