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

Feat/initial #2

Merged
merged 16 commits into from
Mar 19, 2024
Merged

Feat/initial #2

merged 16 commits into from
Mar 19, 2024

Conversation

vlnevyhosteny
Copy link
Contributor

@vlnevyhosteny vlnevyhosteny commented Mar 12, 2024


func (o *userBuilder) ResourceType(ctx context.Context) *v2.ResourceType {
return userResourceType
}

func getUserStatus(user *panorama.User) v2.UserTrait_Status_Status {
if user.Disabled {
return v2.UserTrait_Status_STATUS_ENABLED
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this logic is reversed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copilot 🙃 Resolved in 1fc371d

}

func (c *Client) GetUser(ctx context.Context, name string) (*User, *http.Response, error) {
stringUrl, err := url.JoinPath(c.baseUrl, ApiPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see stringUrl, err := url.JoinPath(c.baseUrl, ApiPath) at the start of every function. Maybe we should just save the API URL since it's the same for every request?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vlnevyhosteny vlnevyhosteny marked this pull request as ready for review March 18, 2024 18:27
return &Connector{}, nil
func New(ctx context.Context, panoramaUrl, username, password string, ignoreBadCertificate bool) (*Panorama, error) {
clientOptions := []uhttp.Option{}
if ignoreBadCertificate {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably log a warning here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vlnevyhosteny vlnevyhosteny requested a review from ggreer March 19, 2024 07:55
@ggreer ggreer merged commit 308795d into main Mar 19, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

baton-panorama
2 participants