-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/initial #2
Conversation
pkg/connector/users.go
Outdated
|
||
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 |
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 logic is reversed :)
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.
Copilot 🙃 Resolved in 1fc371d
pkg/panorama/user.go
Outdated
} | ||
|
||
func (c *Client) GetUser(ctx context.Context, name string) (*User, *http.Response, error) { | ||
stringUrl, err := url.JoinPath(c.baseUrl, ApiPath) |
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 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?
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.
return &Connector{}, nil | ||
func New(ctx context.Context, panoramaUrl, username, password string, ignoreBadCertificate bool) (*Panorama, error) { | ||
clientOptions := []uhttp.Option{} | ||
if ignoreBadCertificate { |
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.
We should probably log a warning 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.
Blocked by ConductorOne/baton-sdk#112 ConductorOne/baton-sdk#111
Closes #1