mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
lbagent: 改正cloudcommon.CommonOptions使用
This commit is contained in:
+1
-1
@@ -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
@@ -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
|
||||
|
||||
@@ -31,7 +31,7 @@ type LbagentOptions struct {
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
CommonOpts cloudcommon.CommonOptions
|
||||
cloudcommon.CommonOptions
|
||||
|
||||
LbagentOptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user