remove vlan_id
diff --git a/views/ngXosViews/diagnostic/mocks/data/cordsubscriber.json b/views/ngXosViews/diagnostic/mocks/data/cordsubscriber.json
index e2409a7..9f5919a 100644
--- a/views/ngXosViews/diagnostic/mocks/data/cordsubscriber.json
+++ b/views/ngXosViews/diagnostic/mocks/data/cordsubscriber.json
@@ -3,7 +3,6 @@
"humanReadableName": "cordSubscriber-1",
"id": 1,
"service_specific_id": "123",
- "vlan_id": "432",
"s_tag": "222",
"c_tag": "432",
"vcpe_id": 4,
diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index 0be9b33..b69b09d 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -28,7 +28,6 @@
class CordSubscriberIdSerializer(serializers.ModelSerializer, PlusSerializerMixin):
id = ReadOnlyField()
service_specific_id = ReadOnlyField()
- vlan_id = ReadOnlyField() # XXX remove this
c_tag = ReadOnlyField()
s_tag = ReadOnlyField()
vcpe_id = ReadOnlyField()
@@ -67,7 +66,7 @@
class Meta:
model = CordSubscriber
fields = ('humanReadableName', 'id',
- 'service_specific_id', 'vlan_id', 's_tag', 'c_tag',
+ 'service_specific_id', 's_tag', 'c_tag',
'vcpe_id', 'instance', 'instance_name', 'image', 'image_name',
'firewall_enable', 'firewall_rules',
'url_filter_enable', 'url_filter_rules', 'url_filter_level',
diff --git a/xos/core/xoslib/methods/volttenant.py b/xos/core/xoslib/methods/volttenant.py
index 229e105..25559a0 100644
--- a/xos/core/xoslib/methods/volttenant.py
+++ b/xos/core/xoslib/methods/volttenant.py
@@ -64,11 +64,6 @@
if service_specific_id is not None:
queryset = queryset.filter(service_specific_id=service_specific_id)
-# vlan_id = self.request.query_params.get('vlan_id', None)
-# if vlan_id is not None:
-# ids = [x.id for x in queryset if x.get_attribute("vlan_id", None)==vlan_id]
-# queryset = queryset.filter(id__in=ids)
-
c_tag = self.request.query_params.get('c_tag', None)
if c_tag is not None:
ids = [x.id for x in queryset if x.get_attribute("c_tag", None)==c_tag]
diff --git a/xos/core/xoslib/objects/cordsubscriber.py b/xos/core/xoslib/objects/cordsubscriber.py
index 27596b7..681b769 100644
--- a/xos/core/xoslib/objects/cordsubscriber.py
+++ b/xos/core/xoslib/objects/cordsubscriber.py
@@ -39,7 +39,6 @@
# ("cdn_enable", "vcpe.cdn_enable"),
# uplink_speed, downlink_speed, status, enable_uverse
- ("vlan_id", "volt.vlan_id"), # XXX remove this
("c_tag", "volt.c_tag"),
("s_tag", "volt.s_tag"),
diff --git a/xos/core/xoslib/static/js/xoslib/xos-backbone.js b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
index 04d5fb7..d22d0ec 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -827,7 +827,7 @@
define_model(this, {urlRoot: CORDSUBSCRIBER_API,
modelName: "cordSubscriber",
relatedCollections: {"cordUsers": "subscriber"},
- listFields: ["id", "service_specific_id", "vlan_id", "routeable_subnet"],
+ listFields: ["id", "service_specific_id", "routeable_subnet"],
detailFields: ["id", "service_specific_id", "vcpe_id", "image_name", "instance_name",
"firewall_enable", "firewall_rules", "url_filter_enable", "url_filter_rules", "cdn_enable",
"nat_ip", "lan_ip", "wan_ip", "private_ip",
diff --git a/xos/services/cord/models.py b/xos/services/cord/models.py
index 48c9597..d3c380d 100644
--- a/xos/services/cord/models.py
+++ b/xos/services/cord/models.py
@@ -196,7 +196,7 @@
KIND = VOLT_KIND
- default_attributes = {"vlan_id": None, "s_tag": None, "c_tag": None}
+ default_attributes = {"s_tag": None, "c_tag": None}
def __init__(self, *args, **kwargs):
volt_services = VOLTService.get_service_objects().all()
if volt_services:
@@ -220,16 +220,6 @@
def c_tag(self, value):
self.set_attribute("c_tag", value)
- # for now, vlan_id is a synonym for c_tag
-
- @property
- def vlan_id(self):
- return self.c_tag
-
- @vlan_id.setter
- def vlan_id(self, value):
- self.c_tag = value
-
@property
def vcpe(self):
vcpe = self.get_newest_subscribed_tenant(VSGTenant)
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
index 9e3dfac..92abe63 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
@@ -130,11 +130,9 @@
else:
logger.info("neither bbs_slice nor bbs_server is configured in the vCPE",extra=o.tologdict())
- vlan_ids = []
s_tags = []
c_tags = []
if o.volt:
- vlan_ids.append(o.volt.vlan_id) # XXX remove this
s_tags.append(o.volt.s_tag)
c_tags.append(o.volt.c_tag)
@@ -153,8 +151,7 @@
if mac:
safe_macs.append(mac)
- fields = {"vlan_ids": vlan_ids, # XXX remove this
- "s_tags": s_tags,
+ fields = {"s_tags": s_tags,
"c_tags": c_tags,
"dnsdemux_ip": dnsdemux_ip,
"cdn_prefixes": cdn_prefixes,
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml
index 3823328..9be0f98 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant.yaml
@@ -9,10 +9,6 @@
dnsdemux_ip: {{ dnsdemux_ip }}
firewall_enable: {{ firewall_enable }}
url_filter_enable: {{ url_filter_enable }}
- vlan_ids:
- {% for vlan_id in vlan_ids %}
- - {{ vlan_id }}
- {% endfor %}
c_tags:
{% for c_tag in c_tags %}
- {{ c_tag }}
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml
index 324e274..435b721 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant_new.yaml
@@ -10,10 +10,6 @@
dnsdemux_ip: {{ dnsdemux_ip }}
firewall_enable: {{ firewall_enable }}
url_filter_enable: {{ url_filter_enable }}
- vlan_ids:
- {% for vlan_id in vlan_ids %}
- - {{ vlan_id }}
- {% endfor %}
c_tags:
{% for c_tag in c_tags %}
- {{ c_tag }}
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
index 09e4d23..b24d15a 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
@@ -10,10 +10,6 @@
dnsdemux_ip: {{ dnsdemux_ip }}
firewall_enable: {{ firewall_enable }}
url_filter_enable: {{ url_filter_enable }}
- vlan_ids:
- {% for vlan_id in vlan_ids %}
- - {{ vlan_id }}
- {% endfor %}
c_tags:
{% for c_tag in c_tags %}
- {{ c_tag }}
diff --git a/xos/synchronizers/vcpe/templates/vlan_sample.j2 b/xos/synchronizers/vcpe/templates/vlan_sample.j2
index a26c840..b73954b 100644
--- a/xos/synchronizers/vcpe/templates/vlan_sample.j2
+++ b/xos/synchronizers/vcpe/templates/vlan_sample.j2
@@ -1,5 +1,5 @@
# below is a list of all vlan_ids associated with this vcpe
-{% for vlan_id in vlan_ids %}
+{% for vlan_id in c_tags %}
{{ vlan_id }}
{% endfor %}