-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add description to resource capi created #870
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jichenjc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adding |
I think we did this all the time :) e.g do some logging etc to add a param, I am not sure why it's not good |
I think I would prefer your current implementation righ tnow. If we put it into the service we have to make all those funcs methods. |
ok, then please check whether current code is ok ..thanks |
Yup will do. Probably will need until next week. Pretty busy right now. |
Almost(All?) done by #871, PTAL. @jichenjc It is ok not to add clusterName into each Service struct in this PR 😸 |
PortID: portID, | ||
Name: trunkName, | ||
PortID: portID, | ||
Description: fmt.Sprintf("Created by cluster-api-provider-openstack cluster %s", clusterName), |
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.
This description value is common among packages. Can we create common func among packages?
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.
agree, I can modify this ~
d7661df
to
3fbd638
Compare
/lgtm |
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.
otherwise lgtm
pkg/utils/utils.go
Outdated
limitations under the License. | ||
*/ | ||
|
||
package utils |
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.
having a generic utils package named utils (without further sub packages) is an absolute anti-pattern in go. Please create a sub-package with a less-generic name.
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.
agree with @sbueringer 😄
/lgtm cancel |
b28ad43
to
f9910e4
Compare
@@ -410,7 +411,7 @@ func (s *Service) getOrCreatePort(eventObject runtime.Object, clusterName string | |||
return port, nil | |||
} | |||
|
|||
func (s *Service) getOrCreateTrunk(eventObject runtime.Object, trunkName, portID string) (*trunks.Trunk, error) { | |||
func getOrCreateTrunk(eventObject runtime.Object, clusterName, trunkName, portID string) (*trunks.Trunk, error) { |
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.
This seems wrongly rebased. Now we need (s *Service)
@@ -194,7 +195,7 @@ func (s *Service) ReconcileSubnet(openStackCluster *infrav1.OpenStackCluster, cl | |||
var subnet *subnets.Subnet | |||
if len(subnetList) == 0 { | |||
var err error | |||
subnet, err = s.createSubnet(openStackCluster, subnetName) | |||
subnet, err = createSubnet(openStackCluster, clusterName, subnetName) |
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.
This seems wrongly rebased. Now we need s.
@@ -212,13 +213,14 @@ func (s *Service) ReconcileSubnet(openStackCluster *infrav1.OpenStackCluster, cl | |||
return nil | |||
} | |||
|
|||
func (s *Service) createSubnet(openStackCluster *infrav1.OpenStackCluster, name string) (*subnets.Subnet, error) { | |||
func createSubnet(openStackCluster *infrav1.OpenStackCluster, clusterName string, name string) (*subnets.Subnet, error) { |
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.
This seems wrongly rebased. Now we need (s *Service)
@@ -65,7 +66,7 @@ func (s *Service) ReconcileRouter(openStackCluster *infrav1.OpenStackCluster, cl | |||
var router *routers.Router | |||
if len(routerList) == 0 { | |||
var err error | |||
router, err = s.createRouter(openStackCluster, routerName) | |||
router, err = createRouter(openStackCluster, clusterName, routerName) |
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.
This seems wrongly rebased. Now we need s.
f9910e4
to
f3088d8
Compare
/lgtm |
@jichenjc imho you can squash & merge |
@jichenjc I actually meant squash the commit and then merge via Prow with /hold cancel (not via the GitHub button which only admins have access to) :) |
@sbueringer @hidekazuna I found I can If you think I need revert this , please let me know |
See: #870 (comment) I think we don't have to revert it. It just added your PR as one commit on the master branch. We just should keep doing it via the regular process the next time. |
* Add description to resource capi created
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):part of #868
please note server description not added yet
gophercloud/gophercloud#1505
I need drive that...
Special notes for your reviewer:
TODOs:
/hold