rename VCPEService to VSGService
diff --git a/xos/configurations/cord/cord.yaml b/xos/configurations/cord/cord.yaml
index f0b45de..e862992 100644
--- a/xos/configurations/cord/cord.yaml
+++ b/xos/configurations/cord/cord.yaml
@@ -12,7 +12,7 @@
type: tosca.nodes.Service
requirements:
- vcpe_tenant:
- node: service_vcpe
+ node: service_vsg
relationship: tosca.relationships.TenantOfService
- lan_network:
node: lan_network
@@ -24,14 +24,14 @@
view_url: /admin/cord/voltservice/$id$/
kind: vOLT
- service_vcpe:
- type: tosca.nodes.VCPEService
+ service_vsg:
+ type: tosca.nodes.VSGService
requirements:
- vbng_tenant:
node: service_vbng
relationship: tosca.relationships.TenantOfService
properties:
- view_url: /admin/cord/vcpeservice/$id$/
+ view_url: /admin/cord/vsgservice/$id$/
backend_network_label: hpc_client
public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
private_key_fn: /opt/xos/synchronizers/vcpe/vcpe_private_key
@@ -270,7 +270,7 @@
type: tosca.nodes.Slice
requirements:
- vcpe_service:
- node: service_vcpe
+ node: service_vsg
relationship: tosca.relationships.MemberOfService
- site:
node: mysite
diff --git a/xos/services/cord/admin.py b/xos/services/cord/admin.py
index 1d71fb6..5cf6b29 100644
--- a/xos/services/cord/admin.py
+++ b/xos/services/cord/admin.py
@@ -98,7 +98,7 @@
# vCPE
#-----------------------------------------------------------------------------
-class VCPEServiceForm(forms.ModelForm):
+class VSGServiceForm(forms.ModelForm):
bbs_api_hostname = forms.CharField(required=False)
bbs_api_port = forms.IntegerField(required=False)
bbs_server = forms.CharField(required=False)
@@ -106,7 +106,7 @@
bbs_slice = forms.ModelChoiceField(queryset=Slice.objects.all(), required=False)
def __init__(self,*args,**kwargs):
- super (VCPEServiceForm,self ).__init__(*args,**kwargs)
+ super (VSGServiceForm,self ).__init__(*args,**kwargs)
if self.instance:
self.fields['bbs_api_hostname'].initial = self.instance.bbs_api_hostname
self.fields['bbs_api_port'].initial = self.instance.bbs_api_port
@@ -120,13 +120,13 @@
self.instance.bbs_server = self.cleaned_data.get("bbs_server")
self.instance.backend_network_label = self.cleaned_data.get("backend_network_label")
self.instance.bbs_slice = self.cleaned_data.get("bbs_slice")
- return super(VCPEServiceForm, self).save(commit=commit)
+ return super(VSGServiceForm, self).save(commit=commit)
class Meta:
- model = VCPEService
+ model = VSGService
-class VCPEServiceAdmin(ReadOnlyAwareAdmin):
- model = VCPEService
+class VSGServiceAdmin(ReadOnlyAwareAdmin):
+ model = VSGService
verbose_name = "vCPE Service"
verbose_name_plural = "vCPE Service"
list_display = ("backend_status_icon", "name", "enabled")
@@ -137,7 +137,7 @@
'classes':['suit-tab suit-tab-backend']}) ]
readonly_fields = ('backend_status_text', "service_specific_attribute")
inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
- form = VCPEServiceForm
+ form = VSGServiceForm
extracontext_registered_admins = True
@@ -156,7 +156,7 @@
) #('hpctools.html', 'top', 'tools') )
def queryset(self, request):
- return VCPEService.get_service_objects_by_user(request.user)
+ return VSGService.get_service_objects_by_user(request.user)
class VSGTenantForm(forms.ModelForm):
bbs_account = forms.CharField(required=False)
@@ -167,7 +167,7 @@
def __init__(self,*args,**kwargs):
super (VSGTenantForm,self ).__init__(*args,**kwargs)
self.fields['kind'].widget.attrs['readonly'] = True
- self.fields['provider_service'].queryset = VCPEService.get_service_objects().all()
+ self.fields['provider_service'].queryset = VSGService.get_service_objects().all()
if self.instance:
# fields for the attributes
self.fields['bbs_account'].initial = self.instance.bbs_account
@@ -178,8 +178,8 @@
# default fields for an 'add' form
self.fields['kind'].initial = VCPE_KIND
self.fields['creator'].initial = get_request().user
- if VCPEService.get_service_objects().exists():
- self.fields["provider_service"].initial = VCPEService.get_service_objects().all()[0]
+ if VSGService.get_service_objects().exists():
+ self.fields["provider_service"].initial = VSGService.get_service_objects().all()[0]
def save(self, commit=True):
self.instance.creator = self.cleaned_data.get("creator")
@@ -362,7 +362,7 @@
admin.site.register(VOLTService, VOLTServiceAdmin)
admin.site.register(VOLTTenant, VOLTTenantAdmin)
-admin.site.register(VCPEService, VCPEServiceAdmin)
+admin.site.register(VSGService, VSGServiceAdmin)
admin.site.register(VSGTenant, VSGTenantAdmin)
admin.site.register(VBNGService, VBNGServiceAdmin)
admin.site.register(VBNGTenant, VBNGTenantAdmin)
diff --git a/xos/services/cord/models.py b/xos/services/cord/models.py
index d01e4f3..3dfe514 100644
--- a/xos/services/cord/models.py
+++ b/xos/services/cord/models.py
@@ -308,11 +308,11 @@
return
if self.vcpe is None:
- vcpeServices = VCPEService.get_service_objects().all()
- if not vcpeServices:
- raise XOSConfigurationError("No VCPE Services available")
+ vsgServices = VSGService.get_service_objects().all()
+ if not vsgServices:
+ raise XOSConfigurationError("No VSG Services available")
- vcpe = VSGTenant(provider_service = vcpeServices[0],
+ vcpe = VSGTenant(provider_service = vsgServices[0],
subscriber_tenant = self)
vcpe.caller = self.creator
vcpe.save()
@@ -390,7 +390,7 @@
# VCPE
# -------------------------------------------
-class VCPEService(Service):
+class VSGService(Service):
KIND = VCPE_KIND
simple_attributes = ( ("bbs_api_hostname", None),
@@ -399,7 +399,7 @@
("backend_network_label", "hpc_client"), )
def __init__(self, *args, **kwargs):
- super(VCPEService, self).__init__(*args, **kwargs)
+ super(VSGService, self).__init__(*args, **kwargs)
class Meta:
app_label = "cord"
@@ -436,7 +436,7 @@
value = value.id
self.set_attribute("bbs_slice_id", value)
-VCPEService.setup_simple_attributes()
+VSGService.setup_simple_attributes()
#class STagBlock(PlCoreBase):
# instance = models.ForeignKey(Instance, related_name="s_tags")
@@ -711,8 +711,8 @@
if self.volt and self.volt.subscriber and self.volt.subscriber.url_filter_enable:
if not self.bbs_account:
- # make sure we use the proxied VCPEService object, not the generic Service object
- vcpe_service = VCPEService.objects.get(id=self.provider_service.id)
+ # make sure we use the proxied VSGService object, not the generic Service object
+ vcpe_service = VSGService.objects.get(id=self.provider_service.id)
self.bbs_account = vcpe_service.allocate_bbs_account()
super(VSGTenant, self).save()
else:
diff --git a/xos/synchronizers/vbng/steps/sync_vbngtenant.py b/xos/synchronizers/vbng/steps/sync_vbngtenant.py
index d2d1f97..4fa351e 100644
--- a/xos/synchronizers/vbng/steps/sync_vbngtenant.py
+++ b/xos/synchronizers/vbng/steps/sync_vbngtenant.py
@@ -8,7 +8,7 @@
from synchronizers.base.syncstep import SyncStep
from synchronizers.base.ansible import run_template_ssh
from core.models import Service
-from services.cord.models import VCPEService, VSGTenant, VBNGTenant, VBNGService
+from services.cord.models import VSGService, VSGTenant, VBNGTenant, VBNGService
from services.hpc.models import HpcService, CDNPrefix
from xos.logger import Logger, logging
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
index 84be777..bbb3ad5 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
@@ -10,7 +10,7 @@
from synchronizers.base.ansible import run_template_ssh
from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
from core.models import Service, Slice
-from services.cord.models import VCPEService, VSGTenant, VOLTTenant
+from services.cord.models import VSGService, VSGTenant, VOLTTenant
from services.hpc.models import HpcService, CDNPrefix
from xos.logger import Logger, logging
@@ -47,7 +47,7 @@
if not o.provider_service:
return None
- vcpes = VCPEService.get_service_objects().filter(id=o.provider_service.id)
+ vcpes = VSGService.get_service_objects().filter(id=o.provider_service.id)
if not vcpes:
return None
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index 760e3c9..9df9de9 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -202,9 +202,9 @@
type: string
required: false
- tosca.nodes.VCPEService:
+ tosca.nodes.VSGService:
description: >
- CORD: The vCPE Service.
+ CORD: The vSG Service.
derived_from: tosca.nodes.Root
capabilities:
xos_base_service_caps
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 8135b7f..8535ada 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -260,9 +260,9 @@
type: string
required: false
- tosca.nodes.VCPEService:
+ tosca.nodes.VSGService:
description: >
- CORD: The vCPE Service.
+ CORD: The vSG Service.
derived_from: tosca.nodes.Root
capabilities:
scalable:
diff --git a/xos/tosca/resources/vcpeservice.py b/xos/tosca/resources/vcpeservice.py
index abcdea9..5c478ac 100644
--- a/xos/tosca/resources/vcpeservice.py
+++ b/xos/tosca/resources/vcpeservice.py
@@ -5,12 +5,12 @@
sys.path.append("/opt/tosca")
from translator.toscalib.tosca_template import ToscaTemplate
-from services.cord.models import VCPEService
+from services.cord.models import VSGService
from service import XOSService
-class XOSVcpeService(XOSService):
- provides = "tosca.nodes.VCPEService"
- xos_model = VCPEService
+class XOSVsgService(XOSService):
+ provides = "tosca.nodes.VSGService"
+ xos_model = VSGService
copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber", "backend_network_label"]