CORD-2184: Remove leftover artifacts from exampleservice
Change-Id: I9f41b2e80c666a6ed5ab57ceb6dfb569e8f82578
(cherry picked from commit c9cdf759b9a70ce2c06f078813a8100c2ee3eb8c)
diff --git a/xos/attic/header.py b/xos/attic/header.py
index 15d1329..2ff43f2 100644
--- a/xos/attic/header.py
+++ b/xos/attic/header.py
@@ -17,11 +17,4 @@
# models.py - ExampleService Models
from core.models import Service, TenantWithContainer, XOSBase
-from django.db import transaction
from django.db.models import *
-
-SERVICE_NAME = 'exampleservice'
-SERVICE_NAME_VERBOSE = 'Example Service'
-SERVICE_NAME_VERBOSE_PLURAL = 'Example Services'
-SERVICE_INSTANCE_NAME_VERBOSE = 'Example Service Instance'
-SERVICE_INSTANCE_VERBOSE_PLURAL = 'Example Service Instances'
diff --git a/xos/exampleservice-onboard.yaml b/xos/exampleservice-onboard.yaml
index 29a40b1..0261330 100644
--- a/xos/exampleservice-onboard.yaml
+++ b/xos/exampleservice-onboard.yaml
@@ -30,8 +30,6 @@
# The following will concatenate with base_url automatically, if
# base_url is non-null.
xproto: ./
- tosca_custom_types: exampleservice.yaml
- tosca_resource: tosca/resources/exampleservice.py, tosca/resources/exampleserviceinstance.py
private_key: file:///opt/xos/key_import/exampleservice_rsa
public_key: file:///opt/xos/key_import/exampleservice_rsa.pub
diff --git a/xos/exampleservice.m4 b/xos/exampleservice.m4
deleted file mode 100644
index 214130c..0000000
--- a/xos/exampleservice.m4
+++ /dev/null
@@ -1,58 +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.
-
-
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-# compile this with "m4 exampleservice.m4 > exampleservice.yaml"
-
-# include macros
-include(macros.m4)
-
-node_types:
- tosca.nodes.ExampleService:
- derived_from: tosca.nodes.Root
- description: >
- Example Service
- capabilities:
- xos_base_service_caps
- properties:
- xos_base_props
- xos_base_service_props
- service_message:
- type: string
- required: false
-
- tosca.nodes.ExampleServiceInstance:
- derived_from: tosca.nodes.Root
- description: >
- A ServiceInstance of the example service
- properties:
- xos_base_tenant_props
- tenant_message:
- type: string
- required: false
-
- # deprecated, replaced by ExampleServiceInstance
- tosca.nodes.ExampleTenant:
- derived_from: tosca.nodes.Root
- description: >
- A Tenant of the example service
- properties:
- xos_base_tenant_props
- tenant_message:
- type: string
- required: false
-
diff --git a/xos/exampleservice.yaml b/xos/exampleservice.yaml
deleted file mode 100644
index 04eed5c..0000000
--- a/xos/exampleservice.yaml
+++ /dev/null
@@ -1,135 +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.
-
-
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-# compile this with "m4 exampleservice.m4 > exampleservice.yaml"
-
-# include macros
-# Note: Tosca derived_from isn't working the way I think it should, it's not
-# inheriting from the parent template. Until we get that figured out, use
-# m4 macros do our inheritance
-
-
-# Service
-
-
-# Subscriber
-
-
-
-
-# end m4 macros
-
-
-
-node_types:
- tosca.nodes.ExampleService:
- derived_from: tosca.nodes.Root
- description: >
- Example Service
- capabilities:
- scalable:
- type: tosca.capabilities.Scalable
- service:
- type: tosca.capabilities.xos.Service
- properties:
- no-delete:
- type: boolean
- default: false
- description: Do not allow Tosca to delete this object
- no-create:
- type: boolean
- default: false
- description: Do not allow Tosca to create this object
- no-update:
- type: boolean
- default: false
- description: Do not allow Tosca to update this object
- replaces:
- type: string
- required: false
- descrption: Replaces/renames this object
- kind:
- type: string
- default: generic
- description: Type of service.
- view_url:
- type: string
- required: false
- description: URL to follow when icon is clicked in the Service Directory.
- icon_url:
- type: string
- required: false
- description: ICON to display in the Service Directory.
- enabled:
- type: boolean
- default: true
- published:
- type: boolean
- default: true
- description: If True then display this Service in the Service Directory.
- public_key:
- type: string
- required: false
- description: Public key to install into Instances to allows Services to SSH into them.
- private_key_fn:
- type: string
- required: false
- description: Location of private key file
- versionNumber:
- type: string
- required: false
- description: Version number of Service.
- service_message:
- type: string
- required: false
-
- tosca.nodes.ExampleServiceInstance:
- derived_from: tosca.nodes.Root
- description: >
- A ServiceInstance of the example service
- properties:
- kind:
- type: string
- default: generic
- description: Kind of tenant
- service_specific_id:
- type: string
- required: false
- description: Service specific ID opaque to XOS but meaningful to service
- tenant_message:
- type: string
- required: false
-
- # deprecated, replaced by ExampleServiceInstance
- tosca.nodes.ExampleTenant:
- derived_from: tosca.nodes.Root
- description: >
- A Tenant of the example service
- properties:
- kind:
- type: string
- default: generic
- description: Kind of tenant
- service_specific_id:
- type: string
- required: false
- description: Service specific ID opaque to XOS but meaningful to service
- tenant_message:
- type: string
- required: false
-
diff --git a/xos/macros.m4 b/xos/macros.m4
deleted file mode 100644
index 391aafd..0000000
--- a/xos/macros.m4
+++ /dev/null
@@ -1,100 +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.
-
-
-# Note: Tosca derived_from isn't working the way I think it should, it's not
-# inheriting from the parent template. Until we get that figured out, use
-# m4 macros do our inheritance
-
-define(xos_base_props,
- no-delete:
- type: boolean
- default: false
- description: Do not allow Tosca to delete this object
- no-create:
- type: boolean
- default: false
- description: Do not allow Tosca to create this object
- no-update:
- type: boolean
- default: false
- description: Do not allow Tosca to update this object
- replaces:
- type: string
- required: false
- descrption: Replaces/renames this object)
-# Service
-define(xos_base_service_caps,
- scalable:
- type: tosca.capabilities.Scalable
- service:
- type: tosca.capabilities.xos.Service)
-define(xos_base_service_props,
- kind:
- type: string
- default: generic
- description: Type of service.
- view_url:
- type: string
- required: false
- description: URL to follow when icon is clicked in the Service Directory.
- icon_url:
- type: string
- required: false
- description: ICON to display in the Service Directory.
- enabled:
- type: boolean
- default: true
- published:
- type: boolean
- default: true
- description: If True then display this Service in the Service Directory.
- public_key:
- type: string
- required: false
- description: Public key to install into Instances to allows Services to SSH into them.
- private_key_fn:
- type: string
- required: false
- description: Location of private key file
- versionNumber:
- type: string
- required: false
- description: Version number of Service.)
-# Subscriber
-define(xos_base_subscriber_caps,
- subscriber:
- type: tosca.capabilities.xos.Subscriber)
-define(xos_base_subscriber_props,
- kind:
- type: string
- default: generic
- description: Kind of subscriber
- service_specific_id:
- type: string
- required: false
- description: Service specific ID opaque to XOS but meaningful to service)
-define(xos_base_tenant_props,
- kind:
- type: string
- default: generic
- description: Kind of tenant
- service_specific_id:
- type: string
- required: false
- description: Service specific ID opaque to XOS but meaningful to service)
-
-# end m4 macros
-
diff --git a/xos/make_synchronizer_manifest.sh b/xos/make_synchronizer_manifest.sh
deleted file mode 100644
index 0b16750..0000000
--- a/xos/make_synchronizer_manifest.sh
+++ /dev/null
@@ -1,18 +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.
-
-
-#! /bin/bash
-find synchronizer -type f | cut -b 14- > synchronizer/manifest
diff --git a/xos/tosca/resources/exampleservice.py b/xos/tosca/resources/exampleservice.py
deleted file mode 100644
index 29115ba..0000000
--- a/xos/tosca/resources/exampleservice.py
+++ /dev/null
@@ -1,25 +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 service import XOSService
-from services.exampleservice.models import ExampleService
-
-class XOSExampleService(XOSService):
- provides = "tosca.nodes.ExampleService"
- xos_model = ExampleService
- copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber", "service_message"]
-
-
diff --git a/xos/tosca/resources/exampleserviceinstance.py b/xos/tosca/resources/exampleserviceinstance.py
deleted file mode 100644
index 090f381..0000000
--- a/xos/tosca/resources/exampleserviceinstance.py
+++ /dev/null
@@ -1,38 +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 xosresource import XOSResource
-from core.models import Service
-from services.exampleservice.models import ExampleServiceInstance
-
-class XOSExampleServiceInstance(XOSResource):
- provides = ["tosca.nodes.ExampleServiceInstance",
- "tosca.nodes.ExampleTenant" # deprecated
- ]
- xos_model = ExampleServiceInstance
- copyin_props = ("tenant_message",)
-
- def get_xos_args(self, throw_exception=True):
- args = super(XOSExampleServiceInstance, self).get_xos_args()
-
- # ExampleServiceInstance must always have a provider_service
- provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
- if provider_name:
- args["owner"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
-
- return args
-
- def can_delete(self, obj):
- return super(XOSExampleServiceInstance, self).can_delete(obj)
-