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
79ccbd28
Commit
79ccbd28
authored
Nov 25, 2015
by
vaikas-google
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #126 from bmelville/125
deployed-instances needs to work with primitives.
parents
9854ebd0
047a1f9a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
dm.go
dm/dm.go
+10
-1
No files found.
dm/dm.go
View file @
79ccbd28
...
...
@@ -160,6 +160,10 @@ func main() {
}
tUrl
:=
getTypeUrl
(
args
[
1
])
if
tUrl
==
""
{
// Type is most likely a primitive.
tUrl
=
args
[
1
]
}
path
:=
fmt
.
Sprintf
(
"types/%s/instances"
,
url
.
QueryEscape
(
tUrl
))
action
:=
fmt
.
Sprintf
(
"list deployed instances of type %s"
,
tUrl
)
callService
(
path
,
"GET"
,
action
,
nil
)
...
...
@@ -217,10 +221,14 @@ func describeType(args []string) {
}
tUrl
:=
getTypeUrl
(
args
[
1
])
if
tUrl
==
""
{
log
.
Fatalf
(
"Invalid type name, must be a template URL or in the form
\"
<type-name>:<version>
\"
: %s"
,
args
[
1
])
}
schemaUrl
:=
tUrl
+
".schema"
fmt
.
Println
(
callHttp
(
schemaUrl
,
"GET"
,
"get schema for type ("
+
tUrl
+
")"
,
nil
))
}
// getTypeUrl returns URL or empty if a primitive type.
func
getTypeUrl
(
tName
string
)
string
{
if
util
.
IsHttpUrl
(
tName
)
{
// User can pass raw URL to template.
...
...
@@ -230,7 +238,8 @@ func getTypeUrl(tName string) string {
// User can pass registry type.
t
:=
getRegistryType
(
tName
)
if
t
==
nil
{
log
.
Fatalf
(
"Invalid type name, must be in the form
\"
<type-name>:<version>
\"
: %s"
,
tName
)
// Primitive types have no associated URL.
return
""
}
return
getDownloadUrl
(
*
t
)
...
...
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