vagrant-openvz 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ module VagrantPlugins
|
|
12
12
|
if config.netadapter.nil?
|
13
13
|
env[:machine_ip] ||= env[:machine].provider.driver.fetch_ip(config.vzctid)
|
14
14
|
else
|
15
|
-
env[:machine_ip] ||= env[:machine].provider.driver.fetch_ip_netadapter(config.vzctid)
|
15
|
+
env[:machine_ip] ||= env[:machine].provider.driver.fetch_ip_netadapter(config.vzctid,config.netadapter)
|
16
16
|
end
|
17
17
|
|
18
18
|
@app.call(env)
|
@@ -90,11 +90,10 @@ module VagrantPlugins
|
|
90
90
|
@cli.fetch_ip(vzctlid)
|
91
91
|
end
|
92
92
|
|
93
|
-
def fetch_ip_netadapter(vzctlid)
|
94
|
-
@cli.fetch_ip_netadapter(vzctlid)
|
93
|
+
def fetch_ip_netadapter(vzctlid,netadapter)
|
94
|
+
@cli.fetch_ip_netadapter(vzctlid,netadapter)
|
95
95
|
end
|
96
96
|
|
97
|
-
|
98
97
|
end
|
99
98
|
end
|
100
99
|
end
|
@@ -18,8 +18,8 @@ module VagrantPlugins
|
|
18
18
|
run(:vzlist,"-a","-H","-t","-o","ip","#{vzctlid}")
|
19
19
|
end
|
20
20
|
|
21
|
-
def fetch_ip_netadapter(vzctlid)
|
22
|
-
run(:vzctl,"exec","#{vzctlid}","ip -4 addr show
|
21
|
+
def fetch_ip_netadapter(vzctlid,netadapter)
|
22
|
+
run(:vzctl,"exec","#{vzctlid}","ip -4 addr show #{netadapter} | egrep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | grep -v 255")
|
23
23
|
end
|
24
24
|
|
25
25
|
def create(vzctlid,settings={})
|