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

Client SDK changes for foundation based bare metal provisioning #352

Conversation

bhatipradeep
Copy link
Contributor

Changes:

  • Added a new foundation client with appropriate structs.
  • Updated(Temporary) client_test.go as per changes in credentials struct, which now also have foundation related attributes.
  • Updated config.go and provider.go for accomodating newly created foundation client and its requirements.

…2.[Fix] Foundation Client to make requests with correct URL and client.

3. [Fix] Foundation structs and service logic to accept error response.
client/client.go Outdated Show resolved Hide resolved
client/foundation/foundation_file_management_service.go Outdated Show resolved Hide resolved
client/foundation/foundation_file_management_service.go Outdated Show resolved Hide resolved
nutanix/config.go Outdated Show resolved Hide resolved
nutanix/provider.go Outdated Show resolved Hide resolved
@@ -96,7 +98,12 @@ func NewClient(credentials *Credentials, userAgent string, absolutePath string)

httpClient.Transport = logging.NewTransport("Nutanix", transCfg)

baseURL, err := url.Parse(fmt.Sprintf(defaultBaseURL, credentials.URL))
protocol := "https"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets move http / https in constants.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also create a method to figure out and construct a baseURL

@siddharth-nutanix siddharth-nutanix merged commit 298ded1 into nutanix:feat/m-foundation Feb 22, 2022
@siddharth-nutanix siddharth-nutanix linked an issue Feb 23, 2022 that may be closed by this pull request
@bhati-pradeep bhati-pradeep linked an issue Mar 31, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add resources and data sources for Nutanix Foundation [Foundation] Provision Image Nodes
3 participants