lbagent: 改正cloudcommon.CommonOptions使用

This commit is contained in:
Yousong Zhou
2019-01-15 08:00:44 +00:00
parent 67a9a1921d
commit 082cff6acd
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func main() {
consts.SetServiceType("lbagent")
opts := &lbagent.Options{}
commonOpts := &opts.CommonOpts
commonOpts := &opts.CommonOptions
{
cloudcommon.ParseOptions(opts, commonOpts, os.Args, "lbagent.conf")
cloudcommon.InitAuth(commonOpts, func() {
+1 -1
View File
@@ -63,7 +63,7 @@ func (h *ApiHelper) Run(ctx context.Context) {
}
func (h *ApiHelper) adminClientSession(ctx context.Context) *mcclient.ClientSession {
region := h.opts.CommonOpts.Region
region := h.opts.CommonOptions.Region
apiVersion := "v2"
s := auth.GetAdminSession(ctx, region, apiVersion)
return s
+1 -1
View File
@@ -31,7 +31,7 @@ type LbagentOptions struct {
}
type Options struct {
CommonOpts cloudcommon.CommonOptions
cloudcommon.CommonOptions
LbagentOptions
}