CORD-1951: Remove obsolete files; replace header.py with symlink

Change-Id: Ib77a7c770a4bdee34a2aaf6f5056d30878c565b8
(cherry picked from commit a1c823c000359f2e9735336239d2fdbe0403cf9b)
diff --git a/xos/admin.py b/xos/admin.py
deleted file mode 100644
index 4d1de3a..0000000
--- a/xos/admin.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from django.contrib import admin
-
-from services.veg.models import *
-from django import forms
-from django.utils.safestring import mark_safe
-from django.contrib.auth.admin import UserAdmin
-from django.contrib.admin.widgets import FilteredSelectMultiple
-from django.contrib.auth.forms import ReadOnlyPasswordHashField
-from django.contrib.auth.signals import user_logged_in
-from django.utils import timezone
-from django.contrib.contenttypes import generic
-from suit.widgets import LinkedSelect
-from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, SubscriberLinkInline, ProviderLinkInline, ProviderDependencyInline,SubscriberDependencyInline
-from core.middleware import get_request
-
-from functools import update_wrapper
-from django.contrib.admin.views.main import ChangeList
-from django.core.urlresolvers import reverse
-from django.contrib.admin.utils import quote
-
-class VEGServiceAdmin(ReadOnlyAwareAdmin):
-    model = VEGService
-    verbose_name = "vEG Service"
-    verbose_name_plural = "vEG Service"
-    list_display = ("backend_status_icon", "name", "enabled")
-    list_display_links = ('backend_status_icon', 'name', )
-    fieldsets = [(None,             {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description', "view_url", "icon_url", "service_specific_attribute", "node_label"],
-                                     'classes':['suit-tab suit-tab-general']}),
-                 ("backend config", {'fields': [ "url_filter_kind" ],
-                                     'classes':['suit-tab suit-tab-backend']}),
-                 ("vEG config", {'fields': ["dns_servers", "docker_image_name", "docker_insecure_registry"],
-                                     'classes':['suit-tab suit-tab-veg']}) ]
-    readonly_fields = ('backend_status_text', "service_specific_attribute")
-    inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline, ProviderDependencyInline,SubscriberDependencyInline]
-
-    extracontext_registered_admins = True
-
-    user_readonly_fields = ["name", "enabled", "versionNumber", "description"]
-
-    suit_form_tabs =(('general', 'Service Details'),
-        ('backend', 'Backend Config'),
-        ('veg', 'vEG Config'),
-        ('administration', 'Administration'),
-        #('tools', 'Tools'),
-        ('slices','Slices'),
-        ('serviceattrs','Additional Attributes'),
-        ('servicetenants', 'Dependencies'),
-        ('serviceprivileges','Privileges') ,
-    )
-
-    suit_form_includes = (('vegadmin.html', 'top', 'administration'),
-                           ) #('hpctools.html', 'top', 'tools') )
-
-    def get_queryset(self, request):
-        return VEGService.select_by_user(request.user)
-
-class VEGTenantForm(forms.ModelForm):
-    last_ansible_hash = forms.CharField(required=False)
-    wan_container_ip = forms.CharField(required=False)
-    wan_container_mac = forms.CharField(required=False)
-
-    def __init__(self,*args,**kwargs):
-        super (VEGTenantForm,self ).__init__(*args,**kwargs)
-        self.fields['owner'].queryset = VEGService.objects.all()
-        if self.instance:
-            # fields for the attributes
-            self.fields['last_ansible_hash'].initial = self.instance.last_ansible_hash
-            self.fields['wan_container_ip'].initial = self.instance.wan_container_ip
-            self.fields['wan_container_mac'].initial = self.instance.wan_container_mac
-        if (not self.instance) or (not self.instance.pk):
-            # default fields for an 'add' form
-            self.fields['creator'].initial = get_request().user
-            if VEGService.objects.exists():
-               self.fields["owner"].initial = VEGService.objects.all()[0]
-
-    def save(self, commit=True):
-        self.instance.creator = self.cleaned_data.get("creator")
-        self.instance.instance = self.cleaned_data.get("instance")
-        self.instance.last_ansible_hash = self.cleaned_data.get("last_ansible_hash")
-        return super(VEGTenantForm, self).save(commit=commit)
-
-    class Meta:
-        model = VEGTenant
-        fields = '__all__'
-
-class VEGTenantAdmin(ReadOnlyAwareAdmin):
-    list_display = ('backend_status_icon', 'id', )
-    list_display_links = ('backend_status_icon', 'id')
-    fieldsets = [ (None, {'fields': ['backend_status_text', 'owner', 'service_specific_id',
-                                     'wan_container_ip', 'wan_container_mac', 'creator', 'instance', 'last_ansible_hash'],
-                          'classes':['suit-tab suit-tab-general']})]
-    readonly_fields = ('backend_status_text', 'service_specific_attribute', 'wan_container_ip', 'wan_container_mac')
-    inlines = (ProviderLinkInline, SubscriberLinkInline)
-    form = VEGTenantForm
-
-    suit_form_tabs = (('general','Details'),
-                      ('servicelinks','Links'),)
-
-    def get_queryset(self, request):
-        return VEGTenant.select_by_user(request.user)
-
-
-admin.site.register(VEGService, VEGServiceAdmin)
-admin.site.register(VEGTenant, VEGTenantAdmin)
-
diff --git a/xos/attic/header.py b/xos/attic/header.py
index 2c1b707..81facf7 100644
--- a/xos/attic/header.py
+++ b/xos/attic/header.py
@@ -25,10 +25,3 @@
 import traceback
 from xos.exceptions import *
 from django.contrib.contenttypes.models import ContentType
-
-class ConfigurationError(Exception):
-    pass
-
-VEG_KIND = "vEG"
-CORD_SUBSCRIBER_KIND = "CordSubscriberRoot"
-
diff --git a/xos/header.py b/xos/header.py
deleted file mode 100644
index 9889cea..0000000
--- a/xos/header.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-from django.db import models
-from core.models import Service, XOSBase, Slice, Instance, TenantWithContainer, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool, User
-from core.models.xosbase import StrippedCharField
-import os
-from django.db import models, transaction
-from django.forms.models import model_to_dict
-from django.db.models import *
-from operator import itemgetter, attrgetter, methodcaller
-from core.models import Tag
-from core.models.service import LeastLoadedNodeScheduler
-import traceback
-from xos.exceptions import *
-from django.contrib.contenttypes.models import ContentType
-
-class ConfigurationError(Exception):
-    pass
-
-VEG_KIND = "vEG"
-CORD_SUBSCRIBER_KIND = "CordSubscriberRoot"
-
diff --git a/xos/header.py b/xos/header.py
new file mode 120000
index 0000000..721b5c0
--- /dev/null
+++ b/xos/header.py
@@ -0,0 +1 @@
+attic/header.py
\ No newline at end of file
diff --git a/xos/templates/vegadmin.html b/xos/templates/vegadmin.html
deleted file mode 100644
index bb9c303..0000000
--- a/xos/templates/vegadmin.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-<!--
-Copyright 2017-present Open Networking Foundation
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-
-<div class = "row text-center">
-    <div class="col-xs-6">
-        <a class="btn btn-primary" href="/admin/veg/vegtenant/">vEG Tenants</a>
-    </div>
-    <div class="col-xs-6">
-        <a class="btn btn-primary" href="/admin/dashboard/subscribers/">Subscriber View</a>
-    </div>
-</div>
-
diff --git a/xos/veg-onboard.yaml b/xos/veg-onboard.yaml
index 378c453..be20a52 100644
--- a/xos/veg-onboard.yaml
+++ b/xos/veg-onboard.yaml
@@ -30,8 +30,6 @@
           # The following will concatenate with base_url automatically, if
           # base_url is non-null.
           xproto: ./
-          admin: admin.py
-          admin_template: templates/vegadmin.html
           tosca_custom_types: veg.yaml
           tosca_resource: tosca/resources/vegservice.py, tosca/resources/vegtenant.py
           private_key: file:///opt/xos/key_import/veg_rsa