climc: make k8s repo sharable

This commit is contained in:
Zexi Li
2018-11-21 17:54:32 +08:00
parent b63d5bbb93
commit 4098440c8f
2 changed files with 23 additions and 1 deletions
+5 -1
View File
@@ -16,13 +16,17 @@ type RepoGetOptions struct {
type RepoCreateOptions struct {
RepoGetOptions
URL string `help:"Repository url"`
URL string `help:"Repository url"`
Public bool `help:"Make repostitory public"`
}
func (o RepoCreateOptions) Params() *jsonutils.JSONDict {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(o.NAME), "name")
params.Add(jsonutils.NewString(o.URL), "url")
if o.Public {
params.Add(jsonutils.JSONTrue, "is_public")
}
return params
}