punch ssh_command through to CordSubscriber API
diff --git a/xos/cord/models.py b/xos/cord/models.py
index a7a05c0..7977f22 100644
--- a/xos/cord/models.py
+++ b/xos/cord/models.py
@@ -387,6 +387,17 @@
def bbs_account(self, value):
return self.set_attribute("bbs_account", value)
+ @property
+ def ssh_command(self):
+ if self.sliver:
+ return self.sliver.get_ssh_command()
+ else:
+ return "no-sliver"
+
+ @ssh_command.setter
+ def ssh_command(self, value):
+ pass
+
def find_user(self, uid):
uid = int(uid)
for user in self.users:
diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index 524dff1..cc56bc2 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -41,6 +41,7 @@
sliver_name = ReadOnlyField()
image_name = ReadOnlyField()
routeable_subnet = serializers.CharField(required=False)
+ ssh_command = ReadOnlyField()
bbs_account = ReadOnlyField()
lan_ip = ReadOnlyField()
@@ -58,6 +59,7 @@
'firewall_enable', 'firewall_rules',
'url_filter_enable', 'url_filter_rules', 'url_filter_level',
'bbs_account',
+ 'ssh_command',
'cdn_enable', 'vbng_id', 'routeable_subnet', 'nat_ip', 'lan_ip', 'wan_ip', 'private_ip')
diff --git a/xos/core/xoslib/objects/cordsubscriber.py b/xos/core/xoslib/objects/cordsubscriber.py
index 1301f90..97624f1 100644
--- a/xos/core/xoslib/objects/cordsubscriber.py
+++ b/xos/core/xoslib/objects/cordsubscriber.py
@@ -33,6 +33,7 @@
("url_filter_enable", "vcpe.url_filter_enable"),
("url_filter_rules", "vcpe.url_filter_rules"),
("url_filter_level", "vcpe.url_filter_level"),
+ ("ssh_command", "vcpe.ssh_command"),
("bbs_account", "vcpe.bbs_account"),
("users", "vcpe.users"),
("services", "vcpe.services"),
diff --git a/xos/core/xoslib/static/js/xoslib/xos-backbone.js b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
index e8fe33b..c4f1126 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -731,7 +731,7 @@
define_model(this, {urlRoot: CORDSUBSCRIBER_API,
modelName: "cordSubscriber",
relatedCollections: {"cordUsers": "subscriber"},
- listFields: ["id", "vlan_id", "routeable_subnet"],
+ listFields: ["id", "service_specific_id", "vlan_id", "routeable_subnet"],
detailFields: ["id", "service_specific_id", "vcpe_id", "image_name", "sliver_name",
"firewall_enable", "firewall_rules", "url_filter_enable", "url_filter_rules", "cdn_enable",
"nat_ip", "lan_ip", "wan_ip", "private_ip",