SSH commands dialog
diff --git a/planetstack/core/xoslib/objects/sliceplus.py b/planetstack/core/xoslib/objects/sliceplus.py
index 7e9836c..9187bff 100644
--- a/planetstack/core/xoslib/objects/sliceplus.py
+++ b/planetstack/core/xoslib/objects/sliceplus.py
@@ -19,6 +19,7 @@
used_sites = {}
used_deployments = {}
sliverCount = 0
+ sshCommands = []
for sliver in self.slivers.all():
site = sliver.node.site_deployment.site
deployment = sliver.node.site_deployment.deployment
@@ -26,6 +27,10 @@
used_deployments[deployment.name] = used_deployments.get(deployment.name, 0) + 1
sliverCount = sliverCount + 1
+ if (sliver.instance_id and sliver.instance_name):
+ sshCommand = 'ssh -o "ProxyCommand ssh -q %s@%s" ubuntu@%s' % (sliver.instance_id, sliver.node.name, sliver.instance_name)
+ sshCommands.append(sshCommand);
+
users = {}
for priv in SlicePrivilege.objects.filter(slice=self):
if not (priv.user.id in users.keys()):
@@ -37,7 +42,8 @@
"sliverCount": sliverCount,
"siteCount": len(used_sites.keys()),
"users": users,
- "roles": []}
+ "roles": [],
+ "sshCommands": sshCommands}
if user:
auser = self._sliceInfo["users"].get(user.id, None)