Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
cb41b209
Commit
cb41b209
authored
Mar 17, 2016
by
Michelle Noorali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(repo): hook up helm repo remove cmd
parent
10153528
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
helm.go
cmd/helm/helm.go
+0
-4
repository.go
cmd/helm/repository.go
+12
-6
No files found.
cmd/helm/helm.go
View file @
cb41b209
...
@@ -17,11 +17,7 @@ limitations under the License.
...
@@ -17,11 +17,7 @@ limitations under the License.
package
main
package
main
import
(
import
(
"io/ioutil"
"net/http"
"net/url"
"os"
"os"
"strings"
"github.com/codegangsta/cli"
"github.com/codegangsta/cli"
"github.com/kubernetes/helm/pkg/client"
"github.com/kubernetes/helm/pkg/client"
...
...
cmd/helm/repository.go
View file @
cb41b209
...
@@ -28,6 +28,9 @@ func init() {
...
@@ -28,6 +28,9 @@ func init() {
addCommands
(
repoCommands
())
addCommands
(
repoCommands
())
}
}
var
dmURL
string
=
"http://localhost:8080"
var
chartRepoPath
string
=
"chart_repositories"
func
repoCommands
()
cli
.
Command
{
func
repoCommands
()
cli
.
Command
{
return
cli
.
Command
{
return
cli
.
Command
{
Name
:
"repository"
,
Name
:
"repository"
,
...
@@ -89,11 +92,9 @@ func addRepo(c *cli.Context) error {
...
@@ -89,11 +92,9 @@ func addRepo(c *cli.Context) error {
return
errors
.
New
(
"'helm repo add' requires a repository as an argument"
)
return
errors
.
New
(
"'helm repo add' requires a repository as an argument"
)
}
}
dmURL
:=
"http://localhost:8080"
path
:=
"chart_repositories"
client
:=
client
.
NewClient
(
dmURL
)
client
:=
client
.
NewClient
(
dmURL
)
var
dest
string
=
""
var
dest
string
=
""
err
:=
client
.
CallService
(
p
ath
,
"POST"
,
"add a chart repository"
,
&
dest
,
nil
)
err
:=
client
.
CallService
(
chartRepoP
ath
,
"POST"
,
"add a chart repository"
,
&
dest
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -102,11 +103,9 @@ func addRepo(c *cli.Context) error {
...
@@ -102,11 +103,9 @@ func addRepo(c *cli.Context) error {
}
}
func
listRepos
(
c
*
cli
.
Context
)
error
{
func
listRepos
(
c
*
cli
.
Context
)
error
{
dmURL
:=
"http://localhost:8080"
path
:=
"chart_repositories"
client
:=
client
.
NewClient
(
dmURL
)
client
:=
client
.
NewClient
(
dmURL
)
var
dest
string
=
""
var
dest
string
=
""
err
:=
client
.
CallService
(
p
ath
,
"GET"
,
"list chart repos"
,
&
dest
,
nil
)
err
:=
client
.
CallService
(
chartRepoP
ath
,
"GET"
,
"list chart repos"
,
&
dest
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -119,5 +118,12 @@ func removeRepo(c *cli.Context) error {
...
@@ -119,5 +118,12 @@ func removeRepo(c *cli.Context) error {
if
len
(
args
)
<
1
{
if
len
(
args
)
<
1
{
return
errors
.
New
(
"'helm repo remove' requires a repository as an argument"
)
return
errors
.
New
(
"'helm repo remove' requires a repository as an argument"
)
}
}
client
:=
client
.
NewClient
(
dmURL
)
var
dest
string
=
""
err
:=
client
.
CallService
(
chartRepoPath
,
"DELETE"
,
"delete a chart repository from list"
,
&
dest
,
nil
)
if
err
!=
nil
{
return
err
}
format
.
Msg
(
dest
)
return
nil
return
nil
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment