Add description to resource capi created#870
Add description to resource capi created#870jichenjc merged 2 commits intokubernetes-sigs:masterfrom
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 DetailsNeeds 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.
This description value is common among packages. Can we create common func among packages?
There was a problem hiding this comment.
agree, I can modify this ~
d7661df to
3fbd638
Compare
|
/lgtm |
pkg/utils/utils.go
Outdated
| limitations under the License. | ||
| */ | ||
|
|
||
| package utils |
There was a problem hiding this comment.
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.
|
/lgtm cancel |
b28ad43 to
f9910e4
Compare
| } | ||
|
|
||
| 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.
This seems wrongly rebased. Now we need (s *Service)
| 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.
This seems wrongly rebased. Now we need s.
| } | ||
|
|
||
| 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.
This seems wrongly rebased. Now we need (s *Service)
| 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.
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