Skip to content

Commit d1d8571

Browse files
authored
Merge pull request #33 from karvis9/terraform_docs_refactor
Cleaning up logs and fixing links
2 parents deb35f9 + 972df49 commit d1d8571

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ free to scratch it.
44

55
### This md is under construction. For now, please refer to the information in README.md.
66

7-
To contribute code or documentation, please submit a **FIXME** [pull request](https://github.com/ibm/repo-template/pulls).
7+
To contribute code or documentation, please submit a [pull request](https://github.com/intel/terraform-provider-intelcloud).
88

99
A good way to familiarize yourself with the codebase and contribution process is
10-
to look for and tackle low-hanging fruit in the **FIXME** [issue tracker](https://github.com/ibm/repo-template/issues).
10+
to look for and tackle low-hanging fruit in the [issue tracker](https://github.com/intel/terraform-provider-intelcloud/issues).
1111
Before embarking on a more ambitious contribution, please quickly [get in touch](#communication) with us.
1212

1313
**Note: We appreciate your effort, and want to avoid a situation where a contribution
@@ -16,14 +16,14 @@ cannot be accepted at all!**
1616

1717
### Proposing new features
1818

19-
If you would like to implement a new feature, please **FIXME** [raise an issue](https://github.com/ibm/repo-template/issues)
19+
If you would like to implement a new feature, please [raise an issue](https://github.com/intel/terraform-provider-intelcloud/issues)
2020
before sending a pull request so the feature can be discussed. This is to avoid
2121
you wasting your valuable time working on a feature that the project developers
2222
are not interested in accepting into the code base.
2323

2424
### Fixing bugs
2525

26-
If you would like to fix a bug, please **FIXME** [raise an issue](https://github.com/ibm/repo-template/issues) before sending a
26+
If you would like to fix a bug, please [raise an issue](https://github.com/intel/terraform-provider-intelcloud/issues) before sending a
2727
pull request so it can be tracked.
2828

2929
### Merge approval

pkg/itacservices/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func NewClient(ctx context.Context, host, tokenSvc, cloudaccount, clientid, clie
6969
req.Header.Set("Authorization", authEncoded)
7070
client := &http.Client{Timeout: 60 * time.Second}
7171

72-
tflog.Info(ctx, "making api client request", map[string]interface{}{"request": req.Header, "url": parsedURL, "auth": authEncoded})
72+
tflog.Info(ctx, "making api client request", map[string]interface{}{"request": req.Header, "url": parsedURL})
7373

7474
resp, err := client.Do(req)
7575
if err != nil {

pkg/itacservices/common/httpclient.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// INTEL CONFIDENTIAL
2-
// Copyright (C) 2023 Intel Corporation
31
package common
42

53
import (
@@ -14,8 +12,7 @@ import (
1412

1513
// MakeGetAPICall :
1614
func MakeGetAPICall(ctx context.Context, connURL, auth string, payload []byte) (int, []byte, error) {
17-
// logger := log.FromContext(ctx).WithName("common.MakeGetAPICall")
18-
// http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: false}
15+
1916
req, err := http.NewRequest("GET", connURL, bytes.NewBuffer(payload))
2017
if err != nil {
2118
return http.StatusInternalServerError, nil, err
@@ -44,14 +41,12 @@ func MakeGetAPICall(ctx context.Context, connURL, auth string, payload []byte) (
4441
retcode = resp.StatusCode
4542
break
4643
}
47-
// body = []byte(sampleFilesystemList)
4844
return retcode, body, nil
4945
}
5046

5147
// MakePOSTAPICall :
5248
func MakePOSTAPICall(ctx context.Context, connURL, auth string, payload []byte) (int, []byte, error) {
5349

54-
// http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: false}
5550
req, err := http.NewRequest("POST", connURL, bytes.NewBuffer(payload))
5651
if err != nil {
5752
return http.StatusInternalServerError, nil, err
@@ -119,8 +114,6 @@ func MakeDeleteAPICall(ctx context.Context, connURL string, auth string, payload
119114

120115
// MakePutAPICall :
121116
func MakePutAPICall(ctx context.Context, connURL, auth string, payload []byte) (int, []byte, error) {
122-
// logger := log.FromContext(ctx).WithName("common.MakeGetAPICall")
123-
// http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: false}
124117
req, err := http.NewRequest("PUT", connURL, bytes.NewBuffer(payload))
125118
if err != nil {
126119
return http.StatusInternalServerError, nil, err
@@ -149,13 +142,11 @@ func MakePutAPICall(ctx context.Context, connURL, auth string, payload []byte) (
149142
retcode = resp.StatusCode
150143
break
151144
}
152-
// body = []byte(sampleFilesystemList)
153145
return retcode, body, nil
154146
}
155147

156148
func printRequest(req *http.Request) {
157149
fmt.Printf("Method: %s\nURL: %s\nHeaders: %v\n", req.Method, req.URL.String(), req.Header)
158-
//fmt.Printf("nHeaders: %v\n", req.Header)
159150

160151
if req.Body != nil {
161152
bodyBytes, _ := io.ReadAll(req.Body)

0 commit comments

Comments
 (0)