vmc 0.4.0.beta.79 → 0.4.0.beta.80
Sign up to get free protection for your applications and to get access to all the features.
- data/vmc-ng/lib/vmc/cli/domain.rb +11 -7
- data/vmc-ng/lib/vmc/version.rb +1 -1
- metadata +3 -3
@@ -104,23 +104,27 @@ module VMC
|
|
104
104
|
with_progress("Creating domain #{c(name, :name)}") do
|
105
105
|
domain.create!
|
106
106
|
end
|
107
|
+
|
108
|
+
domain
|
107
109
|
end
|
108
110
|
|
109
111
|
|
110
112
|
desc "Add a domain to a space"
|
111
113
|
group :domains
|
112
|
-
input
|
113
|
-
|
114
|
-
:desc => "Domain to add") {
|
115
|
-
ask "Which domain?", :choices => client.current_organization.domains,
|
116
|
-
:display => proc(&:name)
|
117
|
-
}
|
114
|
+
input :name, :argument => :required,
|
115
|
+
:desc => "Domain to add"
|
118
116
|
input :space, :from_given => by_name("space"),
|
119
117
|
:default => proc { client.current_space },
|
120
118
|
:desc => "Space to add the domain to"
|
121
119
|
def add_domain
|
122
120
|
space = input[:space]
|
123
|
-
|
121
|
+
name = input[:name].sub(/^\*\./, "")
|
122
|
+
|
123
|
+
org = space.organization
|
124
|
+
|
125
|
+
domain =
|
126
|
+
org.domains.find { |d| d.name == name } ||
|
127
|
+
invoke(:create_domain, :org => org, :name => name)
|
124
128
|
|
125
129
|
with_progress("Adding #{c(domain.name, :name)} to #{c(space.name, :name)}") do
|
126
130
|
space.add_domain(domain)
|
data/vmc-ng/lib/vmc/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 2565518183
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.4.0.beta.
|
11
|
+
- 80
|
12
|
+
version: 0.4.0.beta.80
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- VMware
|