vmc 0.4.0.beta.76 → 0.4.0.beta.77

Sign up to get free protection for your applications and to get access to all the features.
@@ -602,7 +602,7 @@ module VMC
602
602
  with_progress("Creating route #{c(simple, :name)}") do
603
603
  route.host = host
604
604
  route.domain = domain
605
- route.organization = client.current_organization
605
+ route.space = app.space
606
606
  route.create!
607
607
  end
608
608
  end
@@ -24,10 +24,9 @@ module VMC
24
24
  line unless quiet?
25
25
 
26
26
  table(
27
- %w{name wildcard? owner},
27
+ %w{name owner},
28
28
  domains.sort_by(&:name).collect { |r|
29
29
  [ c(r.name, :name),
30
- c(r.wildcard, r.wildcard ? :yes : :no),
31
30
  if org = r.owning_organization
32
31
  c(org.name, :name)
33
32
  else
@@ -87,30 +86,23 @@ module VMC
87
86
  desc "Create a domain"
88
87
  group :domains
89
88
  input :name, :argument => :required,
90
- :desc => "Domain name to create (*.foo.com for wildcard)"
89
+ :desc => "Domain name to create"
91
90
  input :organization, :aliases => ["--org", "-o"],
92
91
  :from_given => by_name("organization"),
93
92
  :default => proc { client.current_organization },
94
93
  :desc => "Organization to add the domain to"
94
+ input :shared, :type => :boolean, :default => false,
95
+ :desc => "Create a shared domain (admin-only)"
95
96
  def create_domain
96
97
  org = input[:organization]
97
- name = input[:name]
98
- wildcard = false
99
-
100
- # *.foo.com for wildcard
101
- if name =~ /^\*\.(.+)$/
102
- name = $1
103
- wildcard = true
104
- end
98
+ name = input[:name].sub(/^\*\./, "")
105
99
 
106
100
  domain = client.domain
107
101
  domain.name = name
108
- domain.wildcard = wildcard
109
- domain.owning_organization = org
102
+ domain.owning_organization = org unless input[:shared]
110
103
 
111
104
  with_progress("Creating domain #{c(name, :name)}") do
112
105
  domain.create!
113
- org.add_domain(domain) if org
114
106
  end
115
107
  end
116
108
 
@@ -90,7 +90,7 @@ module VMC
90
90
  route = client.route
91
91
  route.host = host
92
92
  route.domain = domain
93
- route.organization = client.current_organization
93
+ route.space = client.current_space
94
94
 
95
95
  with_progress("Creating route #{c("#{host}.#{domain.name}", :name)}") do
96
96
  route.create!
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.76"
2
+ VERSION = "0.4.0.beta.77"
3
3
  end
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: 26822539
4
+ hash: 2296988067
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 76
12
- version: 0.4.0.beta.76
11
+ - 77
12
+ version: 0.4.0.beta.77
13
13
  platform: ruby
14
14
  authors:
15
15
  - VMware
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-11-01 00:00:00 Z
20
+ date: 2012-11-05 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: json_pure
@@ -265,12 +265,12 @@ dependencies:
265
265
  requirements:
266
266
  - - ~>
267
267
  - !ruby/object:Gem::Version
268
- hash: 117
268
+ hash: 123
269
269
  segments:
270
270
  - 0
271
271
  - 3
272
- - 51
273
- version: 0.3.51
272
+ - 52
273
+ version: 0.3.52
274
274
  type: :runtime
275
275
  version_requirements: *id015
276
276
  - !ruby/object:Gem::Dependency