-
Notifications
You must be signed in to change notification settings - Fork 85
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
Vpc20 service profile support #1286
Conversation
29e0755
to
f1e1ec4
Compare
SdkFieldName: "IsDefault", | ||
}, | ||
}, | ||
"mac_discovery_profile": { |
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.
Various profiles are policy paths? If so, they can be validated with validatePolicyPath()
var err error | ||
parents := getVpcParentsFromContext(sessionContext) | ||
client := clientLayer.NewVpcServiceProfilesClient(connector) | ||
_, err = client.Get(parents[0], parents[1], id) |
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.
It is simpler to take org/project/VPC from context than loading these into parents array and using from there
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.
For the generator this way is a cleaner and more readable option I think. The only difference is function name, rather than rewriting the whole block.
testResourceName := "nsxt_vpc_service_profile.test" | ||
|
||
resource.ParallelTest(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t); testAccOnlyMultitenancy(t) }, |
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.
TBH I'm not sure if that should be tested with multitenancy or with VPC env. For now definitely with VPC as it runs on v9.0 (these tests will fail with v4.1.2).
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 think this should be part of VPC test suite later on too
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.
So let's replace testAccOnlyMultitenancy(t)
with testAccOnlyVPC(t)
f1e1ec4
to
b16de35
Compare
Extended tests will be added as follow up Signed-off-by: Anna Khmelnitsky <[email protected]>
b16de35
to
8b44c1b
Compare
Extended tests will be added as follow up