[CORD-2783] Adding c/s_tag proxy method to volt convenience
Change-Id: I33371305f5c533f41c66e61a2e3760894a0b53c1
diff --git a/xos/tools/xossh-local b/xos/tools/xossh-local
index 2fd5dad..da4848c 100755
--- a/xos/tools/xossh-local
+++ b/xos/tools/xossh-local
@@ -3,14 +3,16 @@
# This is a stub for launching xossh in the xosproject/xos-client container.
# It's assumed that this script is being invoked on your machine in the local scenario
-SCRIPT_DIR=`dirname $0`
-CERT_FILE="$PWD/$SCRIPT_DIR/../../../../../cord_profile/im_cert_chain.pem"
-CRED_FILENAME="$SCRIPT_DIR/../../../../build/platform-install/credentials/xosadmin@opencord.org"
+CERT_FILE="$PWD/../../../../../cord_profile/im_cert_chain.pem"
+CRED_FILENAME="$PWD/../../../../build/platform-install/credentials/xosadmin@opencord.org"
PASSWORD=`cat $CRED_FILENAME`
+echo $CERT_FILE
+echo $PASSWORD
+
docker run --rm -it --name xossh \
--link rcord_xos_core_1:xos-core --net xos \
- -v "$CERT_FILE":/usr/local/share/ca-certificates/local_certs.crt \
+ -v $CERT_FILE:/usr/local/share/ca-certificates/local_certs.crt \
xosproject/xos-client:candidate \
-u xosadmin@opencord.org \
-p "$PASSWORD" \
diff --git a/xos/xos_client/xosapi/convenience/volttenant.py b/xos/xos_client/xosapi/convenience/volttenant.py
index 54b7e12..25f978e 100644
--- a/xos/xos_client/xosapi/convenience/volttenant.py
+++ b/xos/xos_client/xosapi/convenience/volttenant.py
@@ -30,10 +30,12 @@
# DEPRECATED
@property
def vcpe(self):
+ self.logger.warning('VOLTTenant.vcpe is DEPRECATED, use VOLTTenant.vsg instead')
return self.vsg
@property
def subscriber(self):
+ # NOTE this assume that each VOLT has just 1 subscriber, is that right?
links = self.stub.ServiceInstanceLink.objects.filter(provider_service_instance_id = self.id)
for link in links:
subs = self.stub.CordSubscriberRoot.objects.filter(id=link.subscriber_service_instance_id)
@@ -41,4 +43,12 @@
return subs[0]
return None
+ @property
+ def c_tag(self):
+ return self.subscriber.c_tag
+
+ @property
+ def s_tag(self):
+ return self.subscriber.s_tag
+
register_convenience_wrapper("VOLTTenant", ORMWrapperVOLTTenant)