jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svet <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] Vagrant provider (#160)
Date Wed, 28 Dec 2016 19:31:30 GMT
neykov commented on this pull request.



> +
+      LoginCredentials loginCredentials = LoginCredentials.builder()
+            .user(sshConfig.getUser())
+            .privateKey(privateKey)
+            .build();
+      return new NodeAndInitialCredentials<VagrantNode>(node, newMachine.getId(), loginCredentials);
+   }
+
+   private Collection<String> getNetworks(String name, VagrantApi vagrant) {
+       String networks = vagrant.ssh(name, "ip address show | grep 'scope global'");
+       Matcher m = INTERFACE.matcher(networks);
+       Collection<String> ips = new ArrayList<String>();
+       while (m.find()) {
+          String network = m.group(1);
+          // TODO figure out a more generic approach to ignore unreachable networkds (this
one is the NAT'd address).
+          if (network.startsWith("10.")) continue;

Do you mean to do it on the host? I'd be hesitant to execute shell commands on the machine
jclouds is running on.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/160
Mime
View raw message