-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add support for NSX Application Port Profiles #378
Conversation
12727d7
to
0e51c79
Compare
0e51c79
to
c1596fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment.
org, err := vcd.client.GetOrgByName(vcd.config.VCD.Org) | ||
check.Assert(err, IsNil) | ||
|
||
// For PROVIDER scope application port profile must have ContextEntityId set as NSX-T Managers URN and no Org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking is the comment correct? The function seems to be for tenant.
Few lines below Description is also referring to Provider.
BTW, where does the all-capitalized form of "PROVIDER" and "TENANT" come from? Looks to be "yelling" - not sure if that's really needed here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably have overused capitalization :). These are scope
values being set in API.
Basically there are 3 scopes system
, provider
and tenant
system
- read-only (built-in application profiles that are provided bysystem
scope)provider
- can be created and filtered by System user on a particular network provider (NSX-T manager). This means that whatever is set - should be available to all tenants using the same NSX-T managertenant
can be created at tenant level (org VDC)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make a decision on this together with @dataclouder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the API demands uppercase, I prefer keeping the original value in the comments and docs
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left that one conversation open for when @dataclouder is reviewing this PR. LGTM, otherwise!
org, err := vcd.client.GetOrgByName(vcd.config.VCD.Org) | ||
check.Assert(err, IsNil) | ||
|
||
// For PROVIDER scope application port profile must have ContextEntityId set as NSX-T Managers URN and no Org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make a decision on this together with @dataclouder
This PR adds types
NsxtAppPortProfile
andtypes.NsxtAppPortProfile
together withorg.CreateNsxtAppPortProfile
,org.GetAllNsxtAppPortProfiles
,org.GetNsxtAppPortProfileByName
,NsxtAppPortProfile.Update
,NsxtAppPortProfile.Delete
and adds tests on top of it.NsxtAppPortProfile uses OpenAPI endpoint to operate NSX-T Application Port Profiles
It can have 3 types of scopes:
types.ApplicationPortProfileScopeSystem
types.ApplicationPortProfileScopeProvider
types.ApplicationPortProfileScopeTenant
Additionally:
OpenApiGetAllItems
internal functionopenApiGetAllPages
to work around a VCD bug where some endpoints do not returnnextPage
header to follow and showpageCount
as 0 while there are multiple pages available.Misc.LdapContainer
to override default docker container location. (can be used to overcome throttling issues)types.VAppStatuses
-PARTIALLY_POWERED_OFF
andPARTIALLY_SUSPENDED
Note. Test suites passed on 10, 10.1, 10.2