diff --git a/VERSION b/VERSION
index 18d3400..9cc792d 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1,2 @@
-2.1.33
+2.1.34
+
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index 861a1aa..1c9b130 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/chameleon
-FROM xosproject/xos-base:2.1.33
+FROM xosproject/xos-base:2.1.34
 
 # xos-base already has protoc and dependencies installed
 
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index f950968..7ee9bae 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-client
-FROM xosproject/xos-libraries:2.1.33
+FROM xosproject/xos-libraries:2.1.34
 
 # Install XOS client
 COPY lib/xos-api /tmp/xos-api
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index 105bc97..3a8a6a0 100644
--- a/containers/xos/Dockerfile.libraries
+++ b/containers/xos/Dockerfile.libraries
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-libraries
-FROM xosproject/xos-base:2.1.33
+FROM xosproject/xos-base:2.1.34
 
 # Add libraries
 COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 6fd81f5..1458e7e 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -13,11 +13,10 @@
 # limitations under the License.
 
 # xosproject/xos-synchronizer-base
-FROM xosproject/xos-client:2.1.33
+FROM xosproject/xos-client:2.1.34
 
 COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
 COPY xos/xos/logger.py /opt/xos/xos/logger.py
-COPY xos/xos/xml_util.py /opt/xos/xos/xml_util.py
 COPY xos/xos/__init__.py /opt/xos/xos/__init__.py
 COPY xos/synchronizers/__init__.py /opt/xos/synchronizers/__init__.py
 
diff --git a/containers/xos/Dockerfile.xos-core b/containers/xos/Dockerfile.xos-core
index d3935db..8326199 100644
--- a/containers/xos/Dockerfile.xos-core
+++ b/containers/xos/Dockerfile.xos-core
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-core
-FROM xosproject/xos-libraries:2.1.33
+FROM xosproject/xos-libraries:2.1.34
 
 # Install XOS
 ADD xos /opt/xos
diff --git a/xos/api/README.md b/xos/api/README.md
deleted file mode 100644
index eb2bd28..0000000
--- a/xos/api/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## XOS REST API
-
-Source for the XOS REST API lives in directory `xos/api`. An importer
-tool, `import_methods.py`, auto-generates the REST API by searching
-this directory (and sub-directories) for valid API methods. These
-methods are descendents of the Django View class. This should include
-django_rest_framework based Views and Viewsets.
-
-We establish a convention for locating API methods within the XOS
-hierarchy. The root of the api is automatically `/api/`. Under that
-are the following paths:
-
-* `/api/service` ... API endpoints that are service-wide
-* `/api/tenant` ... API endpoints that are relative to a tenant within a service
-
-For example, `/api/tenant/cord/subscriber/` contains the Subscriber
-API for the CORD service.
-
-The API importer automatically constructs REST paths based on
-where files are placed within the directory hierarchy. For example,
-the files in `xos/api/tenant/cord/` will automatically appear at the
-API endpoint `http://server_name/api/tenant/cord/`.  The directory
-`examples` contains examples that demonstrate using the API from the
-Linux command line.
diff --git a/xos/api/__init__.py b/xos/api/__init__.py
deleted file mode 100644
index b0fb0b2..0000000
--- a/xos/api/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/xos/api/examples/README.md b/xos/api/examples/README.md
deleted file mode 100644
index 0ec7b73..0000000
--- a/xos/api/examples/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-## XOS REST API Examples
-
-This directory contains examples that demonstrate using the XOS REST API using the `curl` command-line tool.
-
-To get started, edit `config.sh` so that it points to a valid XOS server.
-
-We recommend running the following examples in order:
-
- * `add_subscriber.sh` ... add a cord subscriber using account number 1238
- * `update_subscriber.sh` ... update the subscriber's upstream_bandwidth feature
- * `add_volt_to_subscriber.sh` ... add a vOLT to the subscriber with s-tag 33 and c-tag 133
- * `get_subscriber.sh` ... get an entire subscriber object
- * `get_subscriber_features.sh` ... get the features of a subscriber
- * `delete_volt_from_subscriber.sh` ... remove the vOLT from the subscriber
- * `delete_subscriber.sh` ... delete the subscriber that has account number 1238
diff --git a/xos/api/examples/config.sh b/xos/api/examples/config.sh
deleted file mode 100644
index d60dba0..0000000
--- a/xos/api/examples/config.sh
+++ /dev/null
@@ -1,20 +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.
-
-
-#HOST=apt187.apt.emulab.net:9999
-HOST=clnode076.clemson.cloudlab.us:9999
-
-AUTH=padmin@vicci.org:letmein
diff --git a/xos/api/examples/cord/add_device_to_subscriber.sh b/xos/api/examples/cord/add_device_to_subscriber.sh
deleted file mode 100755
index 0b55c6f..0000000
--- a/xos/api/examples/cord/add_device_to_subscriber.sh
+++ /dev/null
@@ -1,35 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-MAC="19:28:37:46:55"
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"mac": "$MAC"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "$DATA" $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/devices/
diff --git a/xos/api/examples/cord/add_subscriber.sh b/xos/api/examples/cord/add_subscriber.sh
deleted file mode 100755
index 8720469..0000000
--- a/xos/api/examples/cord/add_subscriber.sh
+++ /dev/null
@@ -1,29 +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
-
-source ./config.sh
-
-ACCOUNT_NUM=1238
-
-DATA=$(cat <<EOF
-{"identity": {"account_num": "$ACCOUNT_NUM", "name": "test-subscriber"},
- "features": {"uplink_speed": 2000000000}}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "$DATA" $HOST/api/tenant/cord/subscriber/   
diff --git a/xos/api/examples/cord/add_volt_to_subscriber.sh b/xos/api/examples/cord/add_volt_to_subscriber.sh
deleted file mode 100755
index 66fdac4..0000000
--- a/xos/api/examples/cord/add_volt_to_subscriber.sh
+++ /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.
-
-
-#!/bin/bash
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-S_TAG=34
-C_TAG=134
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"s_tag": $S_TAG,
- "c_tag": $C_TAG,
- "subscriber": $SUBSCRIBER_ID}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "$DATA" $HOST/api/tenant/cord/volt/
diff --git a/xos/api/examples/cord/all.sh b/xos/api/examples/cord/all.sh
deleted file mode 100644
index c3a9f2f..0000000
--- a/xos/api/examples/cord/all.sh
+++ /dev/null
@@ -1,44 +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.
-
-
-echo add_subscriber
-./add_subscriber.sh
-echo -e "\n update_subscriber"
-./update_subscriber.sh
-echo -e "\n add_volt_to_subscriber"
-./add_volt_to_subscriber.sh
-echo -e "\n get_subscriber"
-./get_subscriber.sh
-echo -e "\n delete_volt_from_subscriber"
-./delete_volt_from_subscriber.sh
-echo -e "\n add_device_to_subscriber"
-./add_device_to_subscriber.sh
-echo -e "\n set_subscriber_device_feature"
-./set_subscriber_device_feature.sh
-echo -e "\n set_subscriber_device_identity"
-./set_subscriber_device_identity.sh
-echo -e "\n get_subscriber_device_feature"
-./get_subscriber_device_feature.sh
-echo -e "\n get_subscriber_device_identity"
-./get_subscriber_device_identity.sh
-echo -e "\n get_subscriber"
-./get_subscriber.sh
-echo -e "\n list_subscriber_devices"
-./list_subscriber_devices.sh
-echo -e "\n delete_subscriber_device"
-./delete_subscriber_device.sh
-echo -e "\n delete_subscriber"
-./delete_subscriber.sh
diff --git a/xos/api/examples/cord/config.sh b/xos/api/examples/cord/config.sh
deleted file mode 100644
index 12d857c..0000000
--- a/xos/api/examples/cord/config.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.
-
-
-# see config.sh in the parent directory
-source ../config.sh
diff --git a/xos/api/examples/cord/delete_subscriber.sh b/xos/api/examples/cord/delete_subscriber.sh
deleted file mode 100755
index 604ad88..0000000
--- a/xos/api/examples/cord/delete_subscriber.sh
+++ /dev/null
@@ -1,29 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -u $AUTH -X DELETE $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/
diff --git a/xos/api/examples/cord/delete_subscriber_device.sh b/xos/api/examples/cord/delete_subscriber_device.sh
deleted file mode 100755
index 08c59b6..0000000
--- a/xos/api/examples/cord/delete_subscriber_device.sh
+++ /dev/null
@@ -1,30 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-MAC="19:28:37:46:55"
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X DELETE $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/devices/$MAC/
diff --git a/xos/api/examples/cord/delete_volt_from_subscriber.sh b/xos/api/examples/cord/delete_volt_from_subscriber.sh
deleted file mode 100755
index 1ac99c0..0000000
--- a/xos/api/examples/cord/delete_volt_from_subscriber.sh
+++ /dev/null
@@ -1,34 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-VOLT_ID=$(lookup_subscriber_volt $SUBSCRIBER_ID)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -u $AUTH -X DELETE $HOST/api/tenant/cord/volt/$VOLT_ID/
diff --git a/xos/api/examples/cord/get_subscriber.sh b/xos/api/examples/cord/get_subscriber.sh
deleted file mode 100755
index 73cc7fe..0000000
--- a/xos/api/examples/cord/get_subscriber.sh
+++ /dev/null
@@ -1,29 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/
diff --git a/xos/api/examples/cord/get_subscriber_device_feature.sh b/xos/api/examples/cord/get_subscriber_device_feature.sh
deleted file mode 100755
index 3da9dbf..0000000
--- a/xos/api/examples/cord/get_subscriber_device_feature.sh
+++ /dev/null
@@ -1,30 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-MAC="19:28:37:46:55"
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X GET $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/devices/$MAC/features/uplink_speed/
diff --git a/xos/api/examples/cord/get_subscriber_device_identity.sh b/xos/api/examples/cord/get_subscriber_device_identity.sh
deleted file mode 100755
index 4596c50..0000000
--- a/xos/api/examples/cord/get_subscriber_device_identity.sh
+++ /dev/null
@@ -1,30 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-MAC="19:28:37:46:55"
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X GET $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/devices/$MAC/identity/name/
diff --git a/xos/api/examples/cord/get_subscriber_features.sh b/xos/api/examples/cord/get_subscriber_features.sh
deleted file mode 100755
index 0374398..0000000
--- a/xos/api/examples/cord/get_subscriber_features.sh
+++ /dev/null
@@ -1,29 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/features/
diff --git a/xos/api/examples/cord/set_subscriber_device_feature.sh b/xos/api/examples/cord/set_subscriber_device_feature.sh
deleted file mode 100755
index 6f7b117..0000000
--- a/xos/api/examples/cord/set_subscriber_device_feature.sh
+++ /dev/null
@@ -1,35 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-MAC="19:28:37:46:55"
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"uplink_speed": 111111}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X PUT -d "$DATA" $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/devices/$MAC/features/uplink_speed/
diff --git a/xos/api/examples/cord/set_subscriber_device_identity.sh b/xos/api/examples/cord/set_subscriber_device_identity.sh
deleted file mode 100755
index 8950d89..0000000
--- a/xos/api/examples/cord/set_subscriber_device_identity.sh
+++ /dev/null
@@ -1,35 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-MAC="19:28:37:46:55"
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"name": "foo"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X PUT -d "$DATA" $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/devices/$MAC/identity/name/
diff --git a/xos/api/examples/cord/update_subscriber.sh b/xos/api/examples/cord/update_subscriber.sh
deleted file mode 100755
index b2e0506..0000000
--- a/xos/api/examples/cord/update_subscriber.sh
+++ /dev/null
@@ -1,34 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"features": {"uplink_speed": 4000000000}}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X PUT -d "$DATA" $HOST/api/tenant/cord/subscriber/$SUBSCRIBER_ID/
diff --git a/xos/api/examples/cord/util.sh b/xos/api/examples/cord/util.sh
deleted file mode 100644
index eecd614..0000000
--- a/xos/api/examples/cord/util.sh
+++ /dev/null
@@ -1,17 +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.
-
-
-source ../util.sh
diff --git a/xos/api/examples/exampleservice/add_exampletenant.sh b/xos/api/examples/exampleservice/add_exampletenant.sh
deleted file mode 100755
index 380dd19..0000000
--- a/xos/api/examples/exampleservice/add_exampletenant.sh
+++ /dev/null
@@ -1,26 +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
-
-source ./config.sh
-
-DATA=$(cat <<EOF
-{"tenant_message": "This is a test"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "$DATA" $HOST/api/tenant/exampletenant/   
diff --git a/xos/api/examples/exampleservice/config.sh b/xos/api/examples/exampleservice/config.sh
deleted file mode 100644
index 12d857c..0000000
--- a/xos/api/examples/exampleservice/config.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.
-
-
-# see config.sh in the parent directory
-source ../config.sh
diff --git a/xos/api/examples/exampleservice/delete_exampletenant.sh b/xos/api/examples/exampleservice/delete_exampletenant.sh
deleted file mode 100755
index ccba996..0000000
--- a/xos/api/examples/exampleservice/delete_exampletenant.sh
+++ /dev/null
@@ -1,28 +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
-
-source ./config.sh
-
-if [[ "$#" -ne 1 ]]; then
-    echo "Syntax: delete_exampletenant.sh <id>"
-    exit -1
-fi
-
-ID=$1
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X DELETE $HOST/api/tenant/exampletenant/$ID/
diff --git a/xos/api/examples/exampleservice/get_exampletenant_message.sh b/xos/api/examples/exampleservice/get_exampletenant_message.sh
deleted file mode 100755
index 7407df2..0000000
--- a/xos/api/examples/exampleservice/get_exampletenant_message.sh
+++ /dev/null
@@ -1,30 +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
-
-# this example illustrates using a custom REST API endpoint
-
-source ./config.sh
-
-if [[ "$#" -ne 1 ]]; then
-    echo "Syntax: get_exampletenant_message.sh <id>"
-    exit -1
-fi
-
-ID=$1
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/tenant/exampletenant/$ID/message/
diff --git a/xos/api/examples/exampleservice/list_exampleservices.sh b/xos/api/examples/exampleservice/list_exampleservices.sh
deleted file mode 100755
index 6edaddd..0000000
--- a/xos/api/examples/exampleservice/list_exampleservices.sh
+++ /dev/null
@@ -1,21 +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
-
-source ./config.sh
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/service/exampleservice/
diff --git a/xos/api/examples/exampleservice/list_exampletenants.sh b/xos/api/examples/exampleservice/list_exampletenants.sh
deleted file mode 100755
index 061dfdc..0000000
--- a/xos/api/examples/exampleservice/list_exampletenants.sh
+++ /dev/null
@@ -1,21 +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
-
-source ./config.sh
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/tenant/exampletenant/   
diff --git a/xos/api/examples/exampleservice/put_exampletenant_message.sh b/xos/api/examples/exampleservice/put_exampletenant_message.sh
deleted file mode 100755
index d5398bb..0000000
--- a/xos/api/examples/exampleservice/put_exampletenant_message.sh
+++ /dev/null
@@ -1,36 +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
-
-# this example illustrates using a custom REST API endpoint  
-
-source ./config.sh
-
-if [[ "$#" -ne 2 ]]; then
-    echo "Syntax: put_exampletenant_message.sh <id> <message>"
-    exit -1
-fi
-
-ID=$1
-NEW_MESSAGE=$2
-
-DATA=$(cat <<EOF
-{"tenant_message": "$NEW_MESSAGE"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X PUT -d "$DATA" $HOST/api/tenant/exampletenant/$ID/message/
diff --git a/xos/api/examples/exampleservice/update_exampletenant.sh b/xos/api/examples/exampleservice/update_exampletenant.sh
deleted file mode 100755
index 537476b..0000000
--- a/xos/api/examples/exampleservice/update_exampletenant.sh
+++ /dev/null
@@ -1,34 +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
-
-source ./config.sh
-
-if [[ "$#" -ne 2 ]]; then
-    echo "Syntax: delete_exampletenant.sh <id> <message>"
-    exit -1
-fi
-
-ID=$1
-NEW_MESSAGE=$2
-
-DATA=$(cat <<EOF
-{"tenant_message": "$NEW_MESSAGE"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X PUT -d "$DATA" $HOST/api/tenant/exampletenant/$ID/
diff --git a/xos/api/examples/misc/add_slice.sh b/xos/api/examples/misc/add_slice.sh
deleted file mode 100755
index 1d2ab1b..0000000
--- a/xos/api/examples/misc/add_slice.sh
+++ /dev/null
@@ -1,32 +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
-
-source ./config.sh
-
-SITE_ID=1
-USER_ID=1
-
-DATA=$(cat <<EOF
-{"name": "mysite_test1",
- "site": $SITE_ID,
- "creator": $USER_ID
-}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "$DATA" $HOST/xos/slices/?no_hyperlinks=1
diff --git a/xos/api/examples/misc/config.sh b/xos/api/examples/misc/config.sh
deleted file mode 100644
index 12d857c..0000000
--- a/xos/api/examples/misc/config.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.
-
-
-# see config.sh in the parent directory
-source ../config.sh
diff --git a/xos/api/examples/misc/delete_slice.sh b/xos/api/examples/misc/delete_slice.sh
deleted file mode 100755
index da3491c..0000000
--- a/xos/api/examples/misc/delete_slice.sh
+++ /dev/null
@@ -1,29 +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
-
-source ./config.sh
-source ./util.sh
-
-SLICE_NAME=mysite_test1
-
-SLICE_ID=$(lookup_slice_id $SLICE_NAME)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-curl -u $AUTH -X DELETE $HOST/xos/slices/$SLICE_ID/
diff --git a/xos/api/examples/misc/get_sshkeys.sh b/xos/api/examples/misc/get_sshkeys.sh
deleted file mode 100755
index cb5e5b1..0000000
--- a/xos/api/examples/misc/get_sshkeys.sh
+++ /dev/null
@@ -1,22 +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
-
-source ./config.sh
-source ./util.sh
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/utility/sshkeys/
diff --git a/xos/api/examples/misc/update_slice.sh b/xos/api/examples/misc/update_slice.sh
deleted file mode 100755
index 3c6ffad..0000000
--- a/xos/api/examples/misc/update_slice.sh
+++ /dev/null
@@ -1,34 +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
-
-source ./config.sh
-source ./util.sh
-
-SLICE_NAME=mysite_test1
-
-SLICE_ID=$(lookup_slice_id $SLICE_NAME)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"description": "foo"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X PATCH -d "$DATA" $HOST/xos/slices/$SLICE_ID/
diff --git a/xos/api/examples/misc/util.sh b/xos/api/examples/misc/util.sh
deleted file mode 100644
index eecd614..0000000
--- a/xos/api/examples/misc/util.sh
+++ /dev/null
@@ -1,17 +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.
-
-
-source ../util.sh
diff --git a/xos/api/examples/util.sh b/xos/api/examples/util.sh
deleted file mode 100644
index f3ddd15..0000000
--- a/xos/api/examples/util.sh
+++ /dev/null
@@ -1,81 +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.
-
-
-source ./config.sh
-
-function lookup_account_num {
-    ID=`curl -f -s -u $AUTH -X GET $HOST/api/tenant/cord/account_num_lookup/$1/`
-    if [[ $? != 0 ]]; then
-        echo "function lookup_account_num with arguments $1 failed" >&2
-        echo "See CURL output below:" >&2
-        curl -s -u $AUTH -X GET $HOST/api/tenant/cord/account_num_lookup/$1/ >&2
-        exit -1
-    fi
-    # echo "(mapped account_num $1 to id $ID)" >&2
-    echo $ID
-}
-
-function lookup_slice_id {
-    JSON=`curl -f -s -u $AUTH -X GET $HOST/xos/slices/?name=$1`
-    if [[ $? != 0 ]]; then
-        echo "function lookup_slice_id with arguments $1 failed" >&2
-        echo "See CURL output below:" >&2
-        curl -s -u $AUTH -X GET $HOST/xos/slices/?name=$1 >&2
-        exit -1
-    fi
-    ID=`echo $JSON | python -c "import json,sys; print json.load(sys.stdin)[0].get('id','')"`
-    #echo "(mapped slice_name to id $ID)" >&2
-    echo $ID
-}
-
-function lookup_subscriber_volt {
-    JSON=`curl -f -s -u $AUTH -X GET $HOST/api/tenant/cord/subscriber/$1/`
-    if [[ $? != 0 ]]; then
-        echo "function lookup_subscriber_volt failed to read subscriber with arg $1" >&2
-        echo "See CURL output below:" >&2
-        curl -s -u $AUTH -X GET $HOST/api/tenant/cord/account_num_lookup/$1/ >&2
-        exit -1
-    fi
-    ID=`echo $JSON | python -c "import json,sys; print json.load(sys.stdin)['related'].get('volt_id','')"`
-    if [[ $ID == "" ]]; then
-        echo "there is no volt for this subscriber" >&2
-        exit -1
-    fi
-
-    # echo "(found volt id %1)" >&2
-
-    echo $ID
-}
-
-function lookup_subscriber_vsg {
-    JSON=`curl -f -s -u $AUTH -X GET $HOST/api/tenant/cord/subscriber/$1/`
-    if [[ $? != 0 ]]; then
-        echo "function lookup_subscriber_vsg failed to read subscriber with arg $1" >&2
-        echo "See CURL output below:" >&2
-        curl -s -u $AUTH -X GET $HOST/api/tenant/cord/account_num_lookup/$1/ >&2
-        exit -1
-    fi
-    ID=`echo $JSON | python -c "import json,sys; print json.load(sys.stdin)['related'].get('vsg_id','')"`
-    if [[ $ID == "" ]]; then
-        echo "there is no vsg for this subscriber" >&2
-        exit -1
-    fi
-
-    # echo "(found vsg id %1)" >&2
-
-    echo $ID
-}
-
diff --git a/xos/api/examples/vtr/add_truckroll_for_subscriber.sh b/xos/api/examples/vtr/add_truckroll_for_subscriber.sh
deleted file mode 100755
index 538f324..0000000
--- a/xos/api/examples/vtr/add_truckroll_for_subscriber.sh
+++ /dev/null
@@ -1,42 +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
-
-source ./config.sh
-source ./util.sh
-
-ACCOUNT_NUM=1238
-
-SUBSCRIBER_ID=$(lookup_account_num $ACCOUNT_NUM)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-VSG_ID=$(lookup_subscriber_vsg $SUBSCRIBER_ID)
-if [[ $? != 0 ]]; then
-    exit -1
-fi
-
-DATA=$(cat <<EOF
-{"target_id": $SUBSCRIBER_ID,
- "scope": "container",
- "test": "ping",
- "argument": "8.8.8.8"}
-EOF
-)
-
-curl -H "Accept: application/json; indent=4" -H "Content-Type: application/json" -u $AUTH -X POST -d "$DATA" $HOST/api/tenant/truckroll/
diff --git a/xos/api/examples/vtr/config.sh b/xos/api/examples/vtr/config.sh
deleted file mode 100644
index 12d857c..0000000
--- a/xos/api/examples/vtr/config.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.
-
-
-# see config.sh in the parent directory
-source ../config.sh
diff --git a/xos/api/examples/vtr/delete_truckroll.sh b/xos/api/examples/vtr/delete_truckroll.sh
deleted file mode 100755
index 22c41af..0000000
--- a/xos/api/examples/vtr/delete_truckroll.sh
+++ /dev/null
@@ -1,28 +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
-
-source ./config.sh
-
-if [[ "$#" -ne 1 ]]; then
-    echo "Syntax: delete_truckroll.sh <id>"
-    exit -1
-fi
-
-ID=$1
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X DELETE $HOST/api/tenant/truckroll/$ID/
diff --git a/xos/api/examples/vtr/list_truckrolls.sh b/xos/api/examples/vtr/list_truckrolls.sh
deleted file mode 100755
index 9ba9cf2..0000000
--- a/xos/api/examples/vtr/list_truckrolls.sh
+++ /dev/null
@@ -1,21 +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
-
-source ./config.sh
-
-curl -H "Accept: application/json; indent=4" -u $AUTH -X GET $HOST/api/tenant/truckroll/
diff --git a/xos/api/examples/vtr/util.sh b/xos/api/examples/vtr/util.sh
deleted file mode 100644
index eecd614..0000000
--- a/xos/api/examples/vtr/util.sh
+++ /dev/null
@@ -1,17 +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.
-
-
-source ../util.sh
diff --git a/xos/api/import_methods.py b/xos/api/import_methods.py
deleted file mode 100644
index e610a31..0000000
--- a/xos/api/import_methods.py
+++ /dev/null
@@ -1,153 +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 __future__ import print_function
-from django.views.generic import View
-from django.conf.urls import url
-from xosapi_helpers import XOSIndexViewSet
-import os
-import sys
-import inspect
-
-urlpatterns = []
-
-
-def import_module_from_filename(dirname, fn):
-    print("importing", dirname, fn)
-    sys_path_save = sys.path
-    try:
-        # __import__() and importlib.import_module() both import modules from
-        # sys.path. So we make sure that the path where we can find the views is
-        # the first thing in sys.path.
-        sys.path = [dirname] + sys.path
-
-        module = __import__(fn[:-3])
-    finally:
-        sys.path = sys_path_save
-
-    return module
-
-
-def import_module_by_dotted_name(name):
-    print("import", name)
-    try:
-        module = __import__(name)
-    except BaseException:
-        # django will eat the exception, and then fail later with
-        #  'conflicting models in application'
-        # when it tries to import the module a second time.
-        print("exception in import_model_by_dotted_name")
-        import traceback
-
-        traceback.print_exc()
-        raise
-    for part in name.split(".")[1:]:
-        module = getattr(module, part)
-    return module
-
-
-def import_api_methods(dirname=None, api_path="api", api_module="api"):
-    has_index_view = False
-    subdirs = []
-    urlpatterns = []
-
-    if not dirname:
-        dirname = os.path.dirname(os.path.abspath(__file__))
-
-    view_urls = []
-    for fn in os.listdir(dirname):
-        pathname = os.path.join(dirname, fn)
-        if (
-            os.path.isfile(pathname)
-            and fn.endswith(".py")
-            and (fn != "__init__.py")
-            and (fn != "import_methods.py")
-        ):
-            # module = import_module_from_filename(dirname, fn)
-            module = import_module_by_dotted_name(api_module + "." + fn[:-3])
-            for classname in dir(module):
-                #                print "  ",classname
-                c = getattr(module, classname, None)
-
-                if (
-                    inspect.isclass(c)
-                    and issubclass(c, View)
-                    and (classname not in globals())
-                ):
-                    globals()[classname] = c
-
-                    method_kind = getattr(c, "method_kind", None)
-                    method_name = getattr(c, "method_name", None)
-                    if method_kind:
-                        if method_name:
-                            method_name = os.path.join(api_path, method_name)
-                        else:
-                            method_name = api_path
-                            has_index_view = True
-                        view_urls.append((method_kind, method_name, classname, c))
-
-        elif os.path.isdir(pathname):
-            urlpatterns.extend(
-                import_api_methods(
-                    pathname, os.path.join(api_path, fn), api_module + "." + fn
-                )
-            )
-            subdirs.append(fn)
-
-    for view_url in view_urls:
-        if view_url[0] == "list":
-            urlpatterns.append(
-                url(
-                    r"^" + view_url[1] + "/$",
-                    view_url[3].as_view(),
-                    name=view_url[1] + "list",
-                )
-            )
-        elif view_url[0] == "detail":
-            urlpatterns.append(
-                url(
-                    r"^" + view_url[1] + r"/(?P<pk>[a-zA-Z0-9\-]+)/$",
-                    view_url[3].as_view(),
-                    name=view_url[1] + "detail",
-                )
-            )
-        elif view_url[0] == "viewset":
-            viewset = view_url[3]
-            urlpatterns.extend(viewset.get_urlpatterns(api_path="^" + api_path + "/"))
-
-    # Only add an index_view if 1) the is not already an index view, and
-    # 2) we have found some methods in this directory.
-    if (not has_index_view) and (urlpatterns):
-        # The browseable API uses the classname as the breadcrumb and page
-        # title, so try to create index views with descriptive classnames
-        viewset = type(
-            "IndexOf" + api_path.split("/")[-1].title(), (XOSIndexViewSet,), {}
-        )
-        urlpatterns.append(
-            url(
-                "^" + api_path + "/$",
-                viewset.as_view(
-                    {"get": "list"},
-                    view_urls=view_urls,
-                    subdirs=subdirs,
-                    api_path=api_path,
-                ),
-                name=api_path + "_index",
-            )
-        )
-
-    return urlpatterns
-
-
-urlpatterns = import_api_methods()
diff --git a/xos/api/service/__init__.py b/xos/api/service/__init__.py
deleted file mode 100644
index b0fb0b2..0000000
--- a/xos/api/service/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/xos/api/tenant/__init__.py b/xos/api/tenant/__init__.py
deleted file mode 100644
index b0fb0b2..0000000
--- a/xos/api/tenant/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/xos/api/utility/__init__.py b/xos/api/utility/__init__.py
deleted file mode 100644
index b0fb0b2..0000000
--- a/xos/api/utility/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/xos/api/utility/toscaapi.py b/xos/api/utility/toscaapi.py
deleted file mode 100644
index 7e66103..0000000
--- a/xos/api/utility/toscaapi.py
+++ /dev/null
@@ -1,56 +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.
-
-import os
-import sys
-import traceback
-
-# The Tosca engine expects to be run from /opt/xos/tosca/ or equivalent. It
-# needs some sys.path fixing up.
-import inspect
-
-currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
-toscadir = os.path.join(currentdir, "../../tosca")
-
-
-class ToscaViewSet(XOSViewSet):
-    base_name = "tosca"
-    method_name = "tosca"
-    method_kind = "viewset"
-
-    @classmethod
-    def get_urlpatterns(self, api_path="^"):
-        patterns = []
-
-        patterns.append(self.list_url("run/$", {"post": "post_run"}, "tosca_run"))
-
-        return patterns
-
-    def post_run(self, request):
-
-        recipe = request.data.get("recipe", None)
-
-        sys_path_save = sys.path
-        try:
-            sys.path.append(toscadir)
-            from tosca.engine import XOSTosca
-
-            xt = XOSTosca(recipe, parent_dir=toscadir, log_to_console=False)
-            xt.execute(request.user)
-        except BaseException:
-            return Response({"error_text": traceback.format_exc()}, status=500)
-        finally:
-            sys.path = sys_path_save
-
-        return Response({"log_msgs": xt.log_msgs})
diff --git a/xos/api/xosapi_helpers.py b/xos/api/xosapi_helpers.py
deleted file mode 100644
index b01d637..0000000
--- a/xos/api/xosapi_helpers.py
+++ /dev/null
@@ -1,258 +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 rest_framework import serializers, viewsets
-from rest_framework.response import Response
-from django.conf.urls import url
-from xos.exceptions import XOSPermissionDenied
-from django.core.urlresolvers import get_script_prefix, resolve, Resolver404
-
-# rest_framework 3.x
-ReadOnlyField = serializers.ReadOnlyField
-
-ICON_URLS = {
-    "success": "/static/admin/img/icon_success.gif",
-    "clock": "/static/admin/img/icon_clock.gif",
-    "error": "/static/admin/img/icon_error.gif",
-}
-
-
-class PlusObjectMixin:
-    def getBackendIcon(self):
-        (icon, tooltip) = self.get_backend_icon()
-        icon_url = ICON_URLS.get(icon, "unknown")
-        return icon_url
-
-    def getBackendHtml(self):
-        (icon, tooltip) = self.get_backend_icon()
-        icon_url = ICON_URLS.get(icon, "unknown")
-
-        if tooltip:
-            return '<span title="%s"><img src="%s"></span>' % (tooltip, icon_url)
-        else:
-            return '<img src="%s">' % icon_url
-
-
-""" PlusSerializerMixin
-
-    Implements Serializer fields that are common to all OpenCloud objects. For
-    example, stuff related to backend fields.
-"""
-
-
-class PlusModelSerializer(serializers.ModelSerializer):
-    backendIcon = serializers.SerializerMethodField("getBackendIcon")
-    backendHtml = serializers.SerializerMethodField("getBackendHtml")
-
-    # This will cause a descendant class to pull in the methods defined
-    # above. See rest_framework/serializers.py: _get_declared_fields().
-    base_fields = {"backendIcon": backendIcon, "backendHtml": backendHtml}
-    # Rest_framework 3.0 uses _declared_fields instead of base_fields
-    _declared_fields = {"backendIcon": backendIcon, "backendHtml": backendHtml}
-
-    def getBackendIcon(self, obj):
-        return obj.getBackendIcon()
-
-    def getBackendHtml(self, obj):
-        return obj.getBackendHtml()
-
-    def create(self, validated_data):
-        property_fields = getattr(self, "property_fields", [])
-        create_fields = {}
-        for k in validated_data:
-            if k not in property_fields:
-                create_fields[k] = validated_data[k]
-        instance = self.Meta.model(**create_fields)
-
-        if (
-            instance
-            and hasattr(instance, "can_update")
-            and self.context.get("request", None)
-        ):
-            user = self.context["request"].user
-            if user.__class__.__name__ == "AnonymousUser":
-                raise XOSPermissionDenied()
-
-        for k in validated_data:
-            if k in property_fields:
-                setattr(instance, k, validated_data[k])
-
-        instance.caller = self.context["request"].user
-        instance.save()
-        return instance
-
-    def update(self, instance, validated_data):
-        nested_fields = getattr(self, "nested_fields", [])
-        for k in validated_data.keys():
-            v = validated_data[k]
-            if k in nested_fields:
-                d = getattr(instance, k)
-                d.update(v)
-                setattr(instance, k, d)
-            else:
-                setattr(instance, k, v)
-        instance.caller = self.context["request"].user
-        instance.save()
-        return instance
-
-
-class XOSViewSet(viewsets.ModelViewSet):
-    api_path = ""
-    read_only = False
-
-    @classmethod
-    def get_api_method_path(self):
-        if self.method_name:
-            return self.api_path + self.method_name + "/"
-        else:
-            return self.api_path
-
-    @classmethod
-    def detail_url(self, pattern, viewdict, name):
-        return url(
-            self.get_api_method_path() + r"(?P<pk>[a-zA-Z0-9\-_]+)/" + pattern,
-            self.as_view(viewdict),
-            name=self.base_name + "_" + name,
-        )
-
-    @classmethod
-    def list_url(self, pattern, viewdict, name):
-        return url(
-            self.get_api_method_path() + pattern,
-            self.as_view(viewdict),
-            name=self.base_name + "_" + name,
-        )
-
-    @classmethod
-    def get_urlpatterns(self, api_path="^"):
-        self.api_path = api_path
-
-        patterns = []
-
-        if self.read_only:
-            patterns.append(
-                url(
-                    self.get_api_method_path() + "$",
-                    self.as_view({"get": "list"}),
-                    name=self.base_name + "_list",
-                )
-            )
-            patterns.append(
-                url(
-                    self.get_api_method_path() + r"(?P<pk>[a-zA-Z0-9\-_]+)/$",
-                    self.as_view({"get": "retrieve"}),
-                    name=self.base_name + "_detail",
-                )
-            )
-        else:
-            patterns.append(
-                url(
-                    self.get_api_method_path() + "$",
-                    self.as_view({"get": "list", "post": "create"}),
-                    name=self.base_name + "_list",
-                )
-            )
-            patterns.append(
-                url(
-                    self.get_api_method_path() + r"(?P<pk>[a-zA-Z0-9\-_]+)/$",
-                    self.as_view(
-                        {
-                            "get": "retrieve",
-                            "put": "update",
-                            "post": "update",
-                            "delete": "destroy",
-                            "patch": "partial_update",
-                        }
-                    ),
-                    name=self.base_name + "_detail",
-                )
-            )
-
-        return patterns
-
-    def get_serializer_class(self):
-        if (
-            hasattr(self, "custom_serializers")
-            and hasattr(self, "action")
-            and (self.action in self.custom_serializers)
-        ):
-            return self.custom_serializers[self.action]
-        else:
-            return super(XOSViewSet, self).get_serializer_class()
-
-    def get_object(self):
-        obj = super(XOSViewSet, self).get_object()
-
-        if (
-            self.action == "update"
-            or self.action == "destroy"
-            or self.action.startswith("set_")
-        ):
-            if obj and hasattr(obj, "can_update"):
-                user = self.request.user
-                if user.__class__.__name__ == "AnonymousUser":
-                    raise XOSPermissionDenied()
-
-        return obj
-
-
-class XOSIndexViewSet(viewsets.ViewSet):
-    view_urls = []
-    subdirs = []
-    api_path = None
-
-    def __init__(self, view_urls, subdirs, api_path):
-        self.view_urls = view_urls
-        self.subdirs = subdirs
-        self.api_path = api_path
-        super(XOSIndexViewSet, self).__init__()
-
-    def list(self, request):
-        endpoints = {}
-
-        # If it is the root, add core
-        if self.api_path == "api":
-            endpoints["core"] = (
-                "http://"
-                + request.get_host()
-                + get_script_prefix()
-                + self.api_path
-                + "/core"
-            )
-
-        for view_url in self.view_urls:
-            method_name = view_url[1].split("/")[-1]
-            method_url = (
-                "http://"
-                + request.get_host()
-                + get_script_prefix()
-                + self.api_path
-                + "/"
-                + method_name
-            )
-            endpoints[method_name] = method_url
-
-        for subdir in self.subdirs:
-            method_name = subdir
-            method_url = get_script_prefix() + self.api_path + "/" + subdir + "/"
-            # Check to make sure that an endpoint exists at this method_url. This
-            # prunes out subdirs that don't have any methods (like examples/)
-            try:
-                resolve(method_url)
-            except Resolver404:
-                continue
-            method_url = "http://" + request.get_host() + method_url
-            endpoints[method_name] = method_url
-
-        return Response(endpoints)
diff --git a/xos/core/serializers.py b/xos/core/serializers.py
deleted file mode 100644
index b5143f2d..0000000
--- a/xos/core/serializers.py
+++ /dev/null
@@ -1,300 +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.forms import widgets
-from rest_framework import serializers
-from core.models import *
-
-
-class DeploymentSerializer(serializers.HyperlinkedModelSerializer):
-
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    sites = serializers.HyperlinkedRelatedField(view_name="site-detail")
-
-    class Meta:
-        model = Deployment
-        fields = ("id", "url", "name", "sites")
-
-
-class ImageSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-
-    class Meta:
-        model = Image
-        fields = ("id", "url", "image_id", "name", "disk_format", "container_format")
-
-
-class NodeSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-
-    class Meta:
-        model = Node
-        fields = ("id", "url", "name")
-
-
-class ProjectSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-
-    class Meta:
-        model = Project
-        fields = ("id", "url", "name")
-
-
-class ReservationSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-
-    class Meta:
-        model = Reservation
-        fields = ("id", "url", "startTime", "slice", "duration", "endTime")
-
-
-class RoleSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-
-    class Meta:
-        model = Role
-        fields = ("id", "url", "role", "role_type")
-
-
-class ServiceClassSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-
-    class Meta:
-        model = ServiceClass
-        fields = (
-            "id",
-            "url",
-            "name",
-            "description",
-            "commitment",
-            "membershipFee",
-            "membershipFeeMonths",
-            "upgradeRequiresApproval",
-            "upgradeFrom",
-        )
-
-
-class ServiceResourceSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    serviceClass = serializers.HyperlinkedRelatedField(view_name="serviceclass-detail")
-
-    class Meta:
-        model = ServiceResource
-        fields = (
-            "id",
-            "url",
-            "name",
-            "serviceClass",
-            "maxUnitsDeployment",
-            "maxUnitsNode",
-            "maxDuration",
-            "bucketInRate",
-            "bucketMaxSize",
-            "cost",
-            "calendarReservable",
-        )
-
-
-class SliceSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    site = serializers.HyperlinkedRelatedField(view_name="site-detail")
-    instances = serializers.HyperlinkedRelatedField(view_name="instance-detail")
-
-    class Meta:
-        model = Slice
-        fields = (
-            "id",
-            "url",
-            "tenant_id",
-            "enabled",
-            "name",
-            "url",
-            "omf_friendly",
-            "description",
-            "slice_url",
-            "network_id",
-            "router_id",
-            "subnet_id",
-            "imagePreference",
-            "network",
-            "mountDataSets",
-            "site",
-            "instances",
-            "updated",
-            "created",
-        )
-
-
-class SlicePrivilegeSerializer(serializers.HyperlinkedModelSerializer):
-    id = serializers.Field()
-    slice = serializers.HyperlinkedRelatedField(view_name="slice-detail")
-    user = serializers.HyperlinkedRelatedField(view_name="user-detail")
-    role = serializers.HyperlinkedRelatedField(view_name="role-detail")
-
-    class Meta:
-        model = SlicePrivilege
-        fields = ("id", "url", "user", "slice", "role")
-
-
-class SiteSerializer(serializers.HyperlinkedModelSerializer):
-
-    # Experimenting with whether to use ids, hyperlinks, or nested includes
-    # slices = serializers.PrimaryKeyRelatedField(many=True, read_only=True)
-    # slices = serializers.RelatedField(many=True, read_only=True)
-    # slices = SliceSerializer(many=True)
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    slices = serializers.HyperlinkedRelatedField(
-        many=True, read_only=True, view_name="slice-detail"
-    )
-
-    class Meta:
-        model = Site
-        fields = (
-            "id",
-            "url",
-            "name",
-            "slices",
-            "site_url",
-            "enabled",
-            "longitude",
-            "latitude",
-            "login_base",
-            "tenant_id",
-            "is_public",
-            "abbreviated_name",
-            "updated",
-            "created",
-        )
-
-
-class SitePrivilegeSerializer(serializers.HyperlinkedModelSerializer):
-    id = serializers.Field()
-    site = serializers.HyperlinkedRelatedField(view_name="site-detail")
-    user = serializers.HyperlinkedRelatedField(view_name="user-detail")
-    role = serializers.HyperlinkedRelatedField(view_name="role-detail")
-
-    class Meta:
-        model = SitePrivilege
-        fields = ("id", "url", "user", "site", "role")
-
-
-class InstanceSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    image = serializers.HyperlinkedRelatedField(view_name="image-detail")
-    slice = serializers.HyperlinkedRelatedField(view_name="slice-detail")
-    deploymentNetwork = serializers.HyperlinkedRelatedField(
-        view_name="deployment-detail"
-    )
-    node = serializers.HyperlinkedRelatedField(view_name="node-detail")
-
-    # slice = serializers.PrimaryKeyRelatedField(read_only=True)
-
-    class Meta:
-        model = Instance
-        fields = (
-            "id",
-            "url",
-            "instance_id",
-            "name",
-            "instance_name",
-            "ip",
-            "image",
-            "slice",
-            "deploymentNetwork",
-            "node",
-        )
-
-
-class UserSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    site = serializers.HyperlinkedRelatedField(view_name="site-detail")
-    slice_privileges = serializers.HyperlinkedRelatedField(
-        view_name="sliceprivilege-detail"
-    )
-    site_privileges = serializers.HyperlinkedRelatedField(
-        view_name="siteprivilege-detail"
-    )
-
-    class Meta:
-        model = User
-        fields = (
-            "id",
-            "url",
-            "kuser_id",
-            "firstname",
-            "lastname",
-            "email",
-            "password",
-            "phone",
-            "public_key",
-            "user_url",
-            "is_admin",
-            "slice_privileges",
-            "site_privileges",
-        )
-
-
-class TagSerializer(serializers.HyperlinkedModelSerializer):
-    # HyperlinkedModelSerializer doesn't include the id by default
-    id = serializers.Field()
-    project = serializers.HyperlinkedRelatedField(view_name="project-detail")
-    # content_type = serializers.PrimaryKeyRelatedField(read_only=True)
-    content_type = serializers.RelatedField(source="content_type")
-    content_object = serializers.RelatedField(source="content_object")
-
-    class Meta:
-        model = Tag
-        fields = (
-            "id",
-            "url",
-            "project",
-            "value",
-            "content_type",
-            "object_id",
-            "content_object",
-            "name",
-        )
-
-
-serializerLookUp = {
-    Deployment: DeploymentSerializer,
-    Image: ImageSerializer,
-    Node: NodeSerializer,
-    Project: ProjectSerializer,
-    Reservation: ReservationSerializer,
-    Role: RoleSerializer,
-    ServiceClass: ServiceClassSerializer,
-    ServiceResource: ServiceResourceSerializer,
-    Site: SiteSerializer,
-    SitePrivilege: SitePrivilegeSerializer,
-    Slice: SliceSerializer,
-    SlicePrivilege: SlicePrivilegeSerializer,
-    Instance: InstanceSerializer,
-    Tag: TagSerializer,
-    User: UserSerializer,
-    None: None,
-}
diff --git a/xos/coreapi/orm.py b/xos/coreapi/orm.py
deleted file mode 100644
index 5fae722..0000000
--- a/xos/coreapi/orm.py
+++ /dev/null
@@ -1,244 +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 google.protobuf import symbol_database as _symbol_database
-from google.protobuf.empty_pb2 import Empty
-
-"""
-Django-like ORM layer for gRPC
-
-Usage:
-    api = ORMStub(stub)
-
-    api.Slices.all() ... list all slices
-
-    someSlice = api.Slices.get(id=1) ... get slice #1
-
-    someSlice.site ... automatically resolves site_id into a site object
-    someSlice.instances ... automatically resolves instances_ids into instance objects
-    someSlice.save() ... saves the slice object
-"""
-
-"""
-import grpc_client, orm
-c=grpc_client.SecureClient("xos-core.cord.lab", username="padmin@vicci.org", password="letmein")
-u=c.xos_orm.User.objects.get(id=1)
-"""
-
-
-_sym_db = _symbol_database.Default()
-
-
-class ORMWrapper(object):
-    """ Wraps a protobuf object to provide ORM features """
-
-    def __init__(self, wrapped_class, stub, is_new=False):
-        super(ORMWrapper, self).__setattr__("_wrapped_class", wrapped_class)
-        super(ORMWrapper, self).__setattr__("stub", stub)
-        super(ORMWrapper, self).__setattr__("cache", {})
-        super(ORMWrapper, self).__setattr__("synchronizer_step", None)
-        super(ORMWrapper, self).__setattr__("dependent", None)
-        super(ORMWrapper, self).__setattr__("reverse_cache", {})
-        super(ORMWrapper, self).__setattr__("is_new", is_new)
-        fkmap = self.gen_fkmap()
-        super(ORMWrapper, self).__setattr__("_fkmap", fkmap)
-        reverse_fkmap = self.gen_reverse_fkmap()
-        super(ORMWrapper, self).__setattr__("_reverse_fkmap", reverse_fkmap)
-
-    def gen_fkmap(self):
-        fkmap = {}
-
-        for (name, field) in self._wrapped_class.DESCRIPTOR.fields_by_name.items():
-            if name.endswith("_id"):
-                foreignKey = field.GetOptions().Extensions._FindExtensionByName(
-                    "xos.foreignKey"
-                )
-                fk = field.GetOptions().Extensions[foreignKey]
-                if fk:
-                    fkmap[name[:-3]] = {
-                        "src_fieldName": name,
-                        "modelName": fk.modelName,
-                    }
-
-        return fkmap
-
-    def gen_reverse_fkmap(self):
-        reverse_fkmap = {}
-
-        for (name, field) in self._wrapped_class.DESCRIPTOR.fields_by_name.items():
-            if name.endswith("_ids"):
-                reverseForeignKey = field.GetOptions().Extensions._FindExtensionByName(
-                    "xos.reverseForeignKey"
-                )
-                fk = field.GetOptions().Extensions[reverseForeignKey]
-                if fk:
-                    reverse_fkmap[name[:-4]] = {
-                        "src_fieldName": name,
-                        "modelName": fk.modelName,
-                    }
-
-        return reverse_fkmap
-
-    def fk_resolve(self, name):
-        if name in self.cache:
-            return ORMWrapper(self.cache[name], self.stub)
-
-        fk_entry = self._fkmap[name]
-        id = self.stub.make_ID(id=getattr(self, fk_entry["src_fieldName"]))
-        dest_model = self.stub.invoke("Get%s" % fk_entry["modelName"], id)
-
-        self.cache[name] = dest_model
-
-        return ORMWrapper(dest_model, self.stub)
-
-    def reverse_fk_resolve(self, name):
-        if name not in self.reverse_cache:
-            fk_entry = self._reverse_fkmap[name]
-            self.cache[name] = ORMLocalObjectManager(
-                self.stub,
-                fk_entry["modelName"],
-                getattr(self, fk_entry["src_fieldName"]),
-            )
-
-        return self.cache[name]
-
-    def __getattr__(self, name, *args, **kwargs):
-        # note: getattr is only called for attributes that do not exist in
-        #       self.__dict__
-
-        if name in self._fkmap.keys():
-            return self.fk_resolve(name)
-
-        if name in self._reverse_fkmap.keys():
-            return self.reverse_fk_resolve(name)
-
-        return getattr(self._wrapped_class, name, *args, **kwargs)
-
-    def __setattr__(self, name, value):
-        if name in self.__dict__:
-            super(ORMWrapper, self).__setattr__(name, value)
-        else:
-            setattr(self._wrapped_class, name, value)
-
-    def __repr__(self):
-        return self._wrapped_class.__repr__()
-
-    def save(self):
-        if self.is_new:
-            new_class = self.stub.invoke(
-                "Create%s" % self._wrapped_class.__class__.__name__, self._wrapped_class
-            )
-            self._wrapped_class = new_class
-            self.is_new = False
-        else:
-            self.stub.invoke(
-                "Update%s" % self._wrapped_class.__class__.__name__, self._wrapped_class
-            )
-
-    def delete(self):
-        id = self.stub.make_ID(id=self._wrapped_class.id)
-        self.stub.invoke("Delete%s" % self._wrapped_class.__class__.__name__, id)
-
-
-class ORMLocalObjectManager(object):
-    """ Manages a local list of objects """
-
-    def __init__(self, stub, modelName, idList):
-        self._stub = stub
-        self._modelName = modelName
-        self._idList = idList
-        self._cache = None
-
-    def resolve_queryset(self):
-        if self._cache is not None:
-            return self._cache
-
-        models = []
-        for id in self._idList:
-            models.append(
-                self._stub.invoke("Get%s" % self._modelName, self._stub.make_ID(id=id))
-            )
-
-        self._cache = models
-
-        return models
-
-    def all(self):
-        models = self.resolve_queryset()
-        return [ORMWrapper(x, self._stub) for x in models]
-
-
-class ORMObjectManager(object):
-    """ Manages a remote list of objects """
-
-    def __init__(self, stub, modelName, packageName):
-        self._stub = stub
-        self._modelName = modelName
-        self._packageName = packageName
-
-    def wrap_single(self, obj):
-        return ORMWrapper(obj, self._stub)
-
-    def wrap_list(self, obj):
-        result = []
-        for item in obj.items:
-            result.append(ORMWrapper(item, self._stub))
-        return result
-
-    def all(self):
-        return self.wrap_list(self._stub.invoke("List%s" % self._modelName, Empty()))
-
-    def get(self, id):
-        return self.wrap_single(
-            self._stub.invoke("Get%s" % self._modelName, self._stub.make_ID(id=id))
-        )
-
-    def new(self, **kwargs):
-        full_model_name = "%s.%s" % (self._packageName, self._modelName)
-        cls = _sym_db._classes[full_model_name]
-        return ORMWrapper(cls(), self._stub, is_new=True)
-
-
-class ORMModelClass(object):
-    def __init__(self, stub, model_name, package_name):
-        self.objects = ORMObjectManager(stub, model_name, package_name)
-
-
-class ORMStub(object):
-    def __init__(self, stub, package_name):
-        self.grpc_stub = stub
-
-        for name in dir(stub):
-            if name.startswith("Get"):
-                model_name = name[3:]
-                setattr(self, model_name, ORMModelClass(self, model_name, package_name))
-
-    def invoke(self, name, request):
-        method = getattr(self.grpc_stub, name)
-        return method(request)
-
-    def make_ID(self, id):
-        return _sym_db._classes["xos.ID"](id=id)
-
-
-# def wrap_get(*args, **kwargs):
-#    stub=kwargs.pop("stub")
-#    getmethod=kwargs.pop("getmethod")
-#    result = getmethod(*args, **kwargs)
-#    return ORMWrapper(result)
-#
-# def wrap_stub(stub):
-#    for name in dir(stub):
-#        if name.startswith("Get"):
-#            setattr(stub, name, functools.partial(wrap_get, stub=stub, getmethod=getattr(stub,name)))
diff --git a/xos/synchronizers/new_base/deleter.py b/xos/synchronizers/new_base/deleter.py
deleted file mode 100644
index 894164a..0000000
--- a/xos/synchronizers/new_base/deleter.py
+++ /dev/null
@@ -1,30 +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 this appear not to be used, can we delete it?
-
-
-class Deleter:
-    model = None  # Must be overridden
-
-    def __init__(self, *args, **kwargs):
-        pass
-
-    def call(self, pk, model_dict):
-        # Fetch object from XOS db and delete it
-        pass
-
-    def __call__(self, *args, **kwargs):
-        return self.call(*args, **kwargs)
diff --git a/xos/tests/permissiontest.py b/xos/tests/permissiontest.py
deleted file mode 100644
index 110171d..0000000
--- a/xos/tests/permissiontest.py
+++ /dev/null
@@ -1,224 +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.
-
-
-import unittest
-from core.models import *
-
-
-class TestPermission(unittest.TestCase):
-    def setUp(self):
-        self.test_objects = []
-        # deployment
-        self.deployment = Deployment(name="TestDeployment")
-        self.deployment.save()
-        self.test_objects.append(self.deployment)
-        # site
-        self.site = Site(name="TestSite")
-        self.site.save()
-        self.test_objects.append(self.site)
-        # site deployment
-        self.site_deployment = SiteDeployment(
-            site=self.site, deployment=self.deployment
-        )
-        self.site_deployment.save()
-        self.test_objects.append(self.site_deployment)
-        # node
-        self.node = Node(name="TestNode", site_deployment=self.site_deployment)
-        self.node.save()
-        self.test_objects.append(self.node)
-        # slice
-        self.slice = Slice(name="TestSlice", site=self.site)
-        self.slice.save()
-        self.test_objects.appen(slice.slice)
-        # admin user
-        self.user_admin = User(
-            email="user_admin@test.com",
-            first_name="Test",
-            last_name="Test",
-            is_admin=True,
-        )
-        self.user_admin.site = self.site
-        self.user_admin.save()
-        self.test_objects.append(self.user_admin)
-        # read only user
-        self.user_read_only = User(
-            email="user_read_only@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_read_only.site = self.site
-        self.user_read_only.save()
-        self.test_objects.append(self.user_read_only)
-        # default user
-        self.user_default = User(
-            email="user_default@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_default.site = self.site
-        self.user_default.save()
-        self.test_objects.append(self.user_default)
-
-        # deployment admin
-        self.user_deployment_admin = User(
-            email="user_deployment_admin@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_deployment_admin.site = self.site
-        self.user_deployment_admin.save()
-        self.test_objects.append(self.user_deployment_admin)
-        deployment_privilege = DeploymentPrivilege(
-            user=self.user_deployment_admin, deployment=self.deployment, role="admin"
-        )
-        deployment_privilege.save()
-        self.test_objects.append(deployment_privilege)
-        # site admin
-        self.user_site_admin = User(
-            email="user_site_admin@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_site_admin = self.site
-        self.user_site_admin.save()
-        self.test_objects.append(self.user_site_admin)
-        site_admin_privilege = SitePrivilege(
-            user=self.user_site_admin, site=self.site, role="admin"
-        )
-        site_admin_privilege.save()
-        self.test_objects.append(site_admin_privilege)
-        # site pi
-        self.user_site_pi = User(
-            email="user_site_pi@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_site_pi = self.site
-        self.user_site_pi.save()
-        self.test_objects.append(self.user_site_pi)
-        site_pi_privilege = SitePrivilege(
-            user=self.user_site_pi, site=self.site, role="pi"
-        )
-        site_pi_privilege.save()
-        self.test_objects.append(site_pi_privilege)
-        # site tech
-        self.user_site_tech = User(
-            email="user_site_tech@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_site_tech = self.site
-        self.user_site_tech.save()
-        self.test_objects.append(self.user_site_tech)
-        site_tech_privilege = SitePrivilege(
-            user=self.user_site_tech, site=self.site, role="tech"
-        )
-        site_tech_privilege.save()
-        self.test_objects.append(site_tech_privilege)
-        # slice admin
-        self.user_slice_admin = User(
-            email="user_slice_admin@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_slice_admin = self.site
-        self.user_slice_admin.save()
-        self.test_objects.append(self.user_slice_admin)
-        slice_admin_privilege = SlicePrivilege(
-            user=self.user_slice_admin, slice=self.slice, role="admin"
-        )
-        slice_admin_privilege.save()
-        self.test_objects.append(slice_admin_privilege)
-        # slice access
-        self.user_slice_access = User(
-            email="user_slice_access@test.com", first_name="Test", last_name="Test"
-        )
-        self.user_slice_access = self.site
-        self.user_slice_access.save()
-        self.test_objects.append(self.user_slice_access)
-        slice_access_privilege = SlicePrivilege(
-            user=self.user_slice_access, slice=self.slice, role="access"
-        )
-        slice_access_privilege.save()
-        self.test_objects.append(slice_access_privilege)
-
-    def test_deployment(self):
-        for user in [self.user_admin, self.user_deployment_admin]:
-            self.assertEqual(self.deployment.save(), None)
-        for user in [
-            self.user_read_only,
-            self.user_default,
-            self.user_site_admin,
-            self.user_site_pi,
-            self.user_site_tech,
-            self.user_slice_admin,
-            self.user_slice_access,
-        ]:
-            self.assertRaises(PermissionDenied, self.deployment.save_by_user(user))
-
-    def test_site(self):
-        for user in [self.user_admin, self.user_site_admin, self.user_site_pi]:
-            self.assertEqual(self.site.save_by_user(user), None)
-        for user in [
-            self.user_read_only,
-            self.user_default,
-            self.user_deployment_admin,
-            self.user_site_tech,
-            self.user_slice_admin,
-            self.user_slice_access,
-        ]:
-            self.assertRaises(PermissionDenied, self.site.save_by_user(user))
-
-    def test_node(self):
-        for user in [self.user_admin, self.user_site_admin, self.user_site_tech]:
-            self.assertEqual(self.node.save_by_user(user), None)
-        for user in [
-            self.user_read_only,
-            self.user_default,
-            self.user_deployment_admin,
-            self.user_site_pi,
-            self.user_slice_admin,
-            self.user_slice_access,
-        ]:
-            self.assertRaises(PermissionDenied, self.node.save_by_user(user))
-
-    def test_slice(self):
-        for user in [
-            self.user_admin,
-            self.user_site_admin,
-            self.user_site_pi,
-            self.user_slice_admin,
-        ]:
-            self.assertEqual(self.slice.save_by_user(user), None)
-        for user in [
-            self.user_read_only,
-            self.user_default,
-            self.user_deployment_admin,
-            self.user_site_tech,
-            self.user_slice_access,
-        ]:
-            self.assertRaises(PermissionDenied, self.slice.save_by_user(user))
-
-    def test_user(self):
-        for user in [
-            self.user_admin,
-            self.user_site_admin,
-            self.user_deployment_admin,
-            self.user_site_pi,
-            self.user_default,
-        ]:
-            self.assertEqual(self.user_default.save_by_user(user), None)
-        for user in [
-            self.user_read_only,
-            self.user_deployment_admin,
-            self.user_site_tech,
-            self.user_slice_admin,
-            self.user_slice_access,
-        ]:
-            self.assertRaises(PermissionDenied, self.user_default.save_by_user(user))
-
-    def tearDown(self):
-        for obj in self.test_objects:
-            obj.delete()
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/xos/tests/rest_useraccesstest.py b/xos/tests/rest_useraccesstest.py
deleted file mode 100644
index c83648a..0000000
--- a/xos/tests/rest_useraccesstest.py
+++ /dev/null
@@ -1,298 +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.
-
-
-""" useraccesstest.py
-
-    This is a basic REST API permission test. Call it with a username and a
-    password, and it will try to read and update some user and slice object,
-    and report if something is broken.
-
-    This is not an exhaustive test.
-"""
-
-
-from __future__ import print_function
-import inspect
-import json
-import os
-import requests
-import sys
-import time
-from urllib import urlencode
-
-from operator import itemgetter, attrgetter
-
-if len(sys.argv) != 6:
-    print(
-        "syntax: usertest <hostname> <username> <password> <admin_username> <admin_password>"
-    )
-    sys.exit(-1)
-
-hostname = sys.argv[1]
-username = sys.argv[2]
-password = sys.argv[3]
-
-opencloud_auth = (username, password)
-admin_auth = (sys.argv[4], sys.argv[5])
-
-REST_API = "http://%s:8000/xos/" % hostname
-USERS_API = REST_API + "users/"
-SLICES_API = REST_API + "slices/"
-SITES_API = REST_API + "sites/"
-SITEPRIV_API = REST_API + "siteprivileges/"
-SLICEPRIV_API = REST_API + "slice_privileges/"
-SITEROLE_API = REST_API + "site_roles/"
-SLICEROLE_API = REST_API + "slice_roles/"
-
-TEST_USER_EMAIL = (
-    "test" + str(time.time()) + "@test.com"
-)  # in case observer not running, objects won't be purged, so use unique email
-
-
-def fail_unless(x, msg):
-    if not x:
-        (
-            frame,
-            filename,
-            line_number,
-            function_name,
-            lines,
-            index,
-        ) = inspect.getouterframes(inspect.currentframe())[1]
-        print("FAIL (%s:%d)" % (function_name, line_number), msg)
-
-
-print("downloading objects using admin")
-r = requests.get(USERS_API + "?no_hyperlinks=1", auth=admin_auth)
-fail_unless(r.status_code == 200, "failed to get users")
-allUsers = r.json()
-r = requests.get(SLICES_API + "?no_hyperlinks=1", auth=admin_auth)
-fail_unless(r.status_code == 200, "failed to get slices")
-allSlices = r.json()
-r = requests.get(SITES_API + "?no_hyperlinks=1", auth=admin_auth)
-allSites = r.json()
-r = requests.get(SITEPRIV_API + "?no_hyperlinks=1", auth=admin_auth)
-allSitePriv = r.json()
-r = requests.get(SLICEPRIV_API + "?no_hyperlinks=1", auth=admin_auth)
-allSlicePriv = r.json()
-r = requests.get(SITEROLE_API + "?no_hyperlinks=1", auth=admin_auth)
-allSiteRole = r.json()
-r = requests.get(SLICEROLE_API + "?no_hyperlinks=1", auth=admin_auth)
-allSliceRole = r.json()
-
-
-def should_see_user(myself, otherUser):
-    if myself["is_admin"]:
-        return True
-    if myself["id"] == otherUser["id"]:
-        return True
-    for sitePriv in allSitePriv:
-        if (sitePriv["user"] == myself["id"]) and (
-            sitePriv["site"] == otherUser["site"]
-        ):
-            for role in allSiteRole:
-                if role["role"] == "pi" and role["id"] == sitePriv["role"]:
-                    return True
-    return False
-
-
-def should_see_slice(myself, slice):
-    if myself["is_admin"]:
-        return True
-    for sitePriv in allSitePriv:
-        if (sitePriv["user"] == myself["id"]) and (sitePriv["site"] == slice["site"]):
-            for role in allSiteRole:
-                if role["role"] == "pi" and role["id"] == sitePriv["role"]:
-                    return True
-    for slicePriv in allSlicePriv:
-        if (slicePriv["user"] == myself["id"]) and (sitePriv["slice"] == slice["id"]):
-            for role in allSliceRole:
-                if role["role"] == "pi" and role["id"] == slicePriv["role"]:
-                    return True
-    return False
-
-
-def flip_phone(user):
-    if user["phone"] == "123":
-        user["phone"] = "456"
-    else:
-        user["phone"] = "123"
-
-
-def flip_desc(slice):
-    if slice["description"] == "some_description":
-        slice["description"] = "some_other_description"
-    else:
-        slice["description"] = "some_description"
-
-
-def delete_user_if_exists(email):
-    r = requests.get(USERS_API + "?email=%s" % email, auth=admin_auth)
-    if r.status_code == 200:
-        user = r.json()
-        if len(user) > 0:
-            user = user[0]
-            r = requests.delete(USERS_API + str(user["id"]) + "/", auth=admin_auth)
-            fail_unless(r.status_code == 200, "failed to delete the test user")
-
-
-print(
-    "  loaded user:%d slice:%d, site:%d, site_priv:%d slice_priv:%d"
-    % (
-        len(allUsers),
-        len(allSlices),
-        len(allSites),
-        len(allSitePriv),
-        len(allSlicePriv),
-    )
-)
-
-# get our own user record
-
-r = requests.get(
-    USERS_API + "?" + urlencode({"email": username, "no_hyperlinks": "1"}),
-    auth=opencloud_auth,
-)
-fail_unless(r.status_code == 200, "failed to get user %s" % username)
-myself = r.json()
-fail_unless(len(myself) == 1, "wrong number of results when getting user %s" % username)
-myself = myself[0]
-
-# check to see that we see the users we should be able to
-
-r = requests.get(USERS_API, auth=opencloud_auth)
-myUsers = r.json()
-for user in myUsers:
-    fail_unless(
-        should_see_user(myself, user),
-        "saw user %s but we shouldn't have" % user["email"],
-    )
-myUsersIds = [r["id"] for r in myUsers]
-for user in allUsers:
-    if should_see_user(myself, user):
-        fail_unless(
-            user["id"] in myUsersIds,
-            "should have seen user %s but didnt" % user["email"],
-        )
-
-# toggle the phone number on the users we should be able to
-
-"""
-for user in allUsers:
-    user = requests.get(USERS_API + str(user["id"]) + "/", auth=admin_auth).json()
-    flip_phone(user)
-    r = requests.put(USERS_API + str(user["id"]) +"/", data=user, auth=opencloud_auth)
-    if should_see_user(myself, user):
-        fail_unless(r.status_code==200, "failed to change phone number on %s" % user["email"])
-    else:
-        # XXX: this is failing, but for the wrong reason
-        fail_unless(r.status_code!=200, "was able to change phone number on %s but shouldn't have" % user["email"])
-
-# try changing is_staff. We should be able to do it if we're an admin, but not
-# otherwise.
-
-for user in allUsers:
-    user = requests.get(USERS_API + str(user["id"]) + "/", auth=admin_auth).json()
-    user["is_staff"] = not user["is_staff"]
-    r = requests.put(USERS_API + str(user["id"]) +"/", data=user, auth=opencloud_auth)
-    if myself["is_admin"]:
-        fail_unless(r.status_code==200, "failed to change is_staff on %s" % user["email"])
-    else:
-        # XXX: this is failing, but for the wrong reason
-        fail_unless(r.status_code!=200, "was able to change is_staff on %s but shouldn't have" % user["email"])
-
-    # put it back to false, in case we successfully changed it...
-    user["is_staff"] = False
-    r = requests.put(USERS_API + str(user["id"]) +"/", data=user, auth=opencloud_auth)
-"""
-
-# delete the TEST_USER_EMAIL if it exists
-delete_user_if_exists(TEST_USER_EMAIL)
-
-# XXX - enacted and policed should not be required
-
-newUser = {
-    "firstname": "test",
-    "lastname": "1234",
-    "email": TEST_USER_EMAIL,
-    "password": "letmein",
-    "site": allSites[0]["id"],
-    "enacted": "2015-01-01T00:00",
-    "policed": "2015-01-01T00:00",
-}
-r = requests.post(USERS_API + "?no_hyperlinks=1", data=newUser, auth=opencloud_auth)
-if myself["is_admin"]:
-    fail_unless(r.status_code == 200, "failed to create %s" % TEST_USER_EMAIL)
-else:
-    fail_unless(
-        r.status_code != 200,
-        "created %s but we shouldn't have been able to" % TEST_USER_EMAIL,
-    )
-
-delete_user_if_exists(TEST_USER_EMAIL)
-
-# now create it as admin
-r = requests.post(USERS_API + "?no_hyperlinks=1", data=newUser, auth=admin_auth)
-if r.status_code != 201:
-    print(r.text)
-fail_unless(r.status_code == 201, "failed to create %s as admin" % TEST_USER_EMAIL)
-
-r = requests.get(
-    USERS_API + "?" + urlencode({"email": TEST_USER_EMAIL}), auth=admin_auth
-)
-fail_unless(r.status_code == 200, "failed to get user %s" % TEST_USER_EMAIL)
-user = r.json()[0]
-r = requests.delete(USERS_API + str(user["id"]) + "/", auth=opencloud_auth)
-if myself["is_admin"]:
-    fail_unless(r.status_code == 200, "failed to delete %s" % TEST_USER_EMAIL)
-else:
-    fail_unless(
-        r.status_code != 200,
-        "deleted %s but we shouldn't have been able to" % TEST_USER_EMAIL,
-    )
-
-# slice tests
-
-r = requests.get(SLICES_API, auth=opencloud_auth)
-mySlices = r.json()
-
-for slice in mySlices:
-    fail_unless(
-        should_see_slice(myself, slice),
-        "saw slice %s but we shouldn't have" % slice["name"],
-    )
-mySlicesIds = [r["id"] for r in mySlices]
-for slice in allSlices:
-    if should_see_slice(myself, slice):
-        fail_unless(
-            slice["id"] in mySliceIds,
-            "should have seen slice %s but didnt" % slice["name"],
-        )
-
-for slice in allSlices:
-    slice = requests.get(SLICES_API + str(slice["id"]) + "/", auth=admin_auth).json()
-    flip_desc(slice)
-    r = requests.put(
-        SLICES_API + str(slice["id"]) + "/", data=slice, auth=opencloud_auth
-    )
-    if should_see_slice(myself, slice):
-        fail_unless(r.status_code == 200, "failed to change desc on %s" % slice["name"])
-    else:
-        fail_unless(
-            r.status_code != 200,
-            "was able to change desc on %s but shouldn't have" % slice["name"],
-        )
-
-print("Done.")
diff --git a/xos/tests/rest_usertest.py b/xos/tests/rest_usertest.py
deleted file mode 100644
index 894111b..0000000
--- a/xos/tests/rest_usertest.py
+++ /dev/null
@@ -1,99 +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.
-
-
-"""
-     UserTest - tests whether a user is able to fetch his own user record,
-                and modify fields.
-
-                All users should be able to set their phone number.
-                Only admins should be able to set their is_admin bit
-"""
-
-from __future__ import print_function
-import json
-import os
-import requests
-import sys
-from urllib import urlencode
-
-from operator import itemgetter, attrgetter
-
-if len(sys.argv) != 6:
-    print(
-        "syntax: usertest <hostname> <username> <password> <admin_username> <admin_password>"
-    )
-    sys.exit(-1)
-
-hostname = sys.argv[1]
-username = sys.argv[2]
-password = sys.argv[3]
-
-opencloud_auth = (username, password)
-admin_auth = (sys.argv[4], sys.argv[5])
-
-REST_API = "http://%s:8000/xos/" % hostname
-USERS_API = REST_API + "users/"
-
-print("fetching user record for %s:" % username)
-r = requests.get(USERS_API + "?" + urlencode({"email": username}), auth=opencloud_auth)
-for user in r.json():
-    print("  ", user["email"])
-
-myself = r.json()[0]
-
-if myself["phone"] == "123":
-    myself["phone"] = "456"
-else:
-    myself["phone"] = "123"
-
-r = requests.put(USERS_API + str(myself["id"]) + "/", data=myself, auth=opencloud_auth)
-if r.status_code == 200:
-    print("I updated my phone to", myself["phone"])
-else:
-    print("I failed to update my phone")
-
-if myself["is_admin"]:
-    myself["is_admin"] = False
-else:
-    myself["is_admin"] = True
-
-r = requests.put(USERS_API + str(myself["id"]) + "/", data=myself, auth=opencloud_auth)
-if r.status_code == 200:
-    print("I updated my is_admin to", myself["is_admin"])
-else:
-    print("I failed to update my is_admin")
-
-r = requests.get(USERS_API + "?email=jhh@cs.arizona.edu", auth=opencloud_auth)
-if len(r.json()) > 0:
-    print("I was able to read jhh@cs.arizona.edu")
-else:
-    print("I was not able to read jhh@cs.arizona.edu")
-
-# get john's record using admin, so we can try to update it
-r = requests.get(USERS_API + "?email=jhh@cs.arizona.edu", auth=admin_auth)
-if len(r.json()) > 0:
-    print("Admin was able to read jhh@cs.arizona.edu")
-    jhh = r.json()[0]
-else:
-    print("Admin was not able to read jhh@cs.arizona.edu")
-    jhh = None
-
-if jhh:
-    # try to update john's user record
-    r = requests.put(USERS_API + str(jhh["id"]) + "/", data=jhh, auth=opencloud_auth)
-    if r.status_code == 200:
-        print("I was able to update user", str(jhh["id"]))
-    else:
-        print("I was not able to update user", str(jhh["id"]))
diff --git a/xos/xos/admin_customize/README.md b/xos/xos/admin_customize/README.md
deleted file mode 100644
index ecc4520..0000000
--- a/xos/xos/admin_customize/README.md
+++ /dev/null
@@ -1 +0,0 @@
-admin_customize contains django UI elements (such as templatetags) that are common to all django apps within XOS.
diff --git a/xos/xos/admin_customize/__init__.py b/xos/xos/admin_customize/__init__.py
deleted file mode 100644
index b0fb0b2..0000000
--- a/xos/xos/admin_customize/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/xos/xos/admin_customize/templatetags/__init__.py b/xos/xos/admin_customize/templatetags/__init__.py
deleted file mode 100644
index b0fb0b2..0000000
--- a/xos/xos/admin_customize/templatetags/__init__.py
+++ /dev/null
@@ -1,13 +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.
diff --git a/xos/xos/admin_customize/templatetags/admin_modify.py b/xos/xos/admin_customize/templatetags/admin_modify.py
deleted file mode 100644
index f685cc6..0000000
--- a/xos/xos/admin_customize/templatetags/admin_modify.py
+++ /dev/null
@@ -1,55 +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.admin.templatetags.admin_modify import *
-from django.contrib.admin.templatetags.admin_modify import (
-    submit_row as original_submit_row,
-)
-from django.conf import settings
-import random
-
-
-@register.inclusion_tag("admin/submit_line.html", takes_context=True)
-def submit_row(context):
-    ctx = original_submit_row(context)
-    ctx.update(
-        {
-            "show_save": context.get("show_save", ctx["show_save"]),
-            "show_save_and_add_another": context.get(
-                "show_save_and_add_another", ctx["show_save_and_add_another"]
-            ),
-            "show_save_and_continue": context.get(
-                "show_save_and_continue", ctx["show_save_and_continue"]
-            ),
-            "custom_delete_url": context.get("custom_delete_url", None),
-        }
-    )
-    return ctx
-
-
-@register.simple_tag
-def random_str(a):
-    a = [
-        "You are now signed out. Thank you and have a great day",
-        "Thanks for spending some quality time with the Web site today.",
-        "Thanks for using "
-        + settings.XOS_BRANDING_NAME
-        + " to manage your network today.",
-        "You have successfully logged out, Thanks for spending some quality time",
-        "The "
-        + settings.XOS_BRANDING_NAME
-        + " team is glad that you used our product to get your work done.",
-    ]
-    return a[random.randint(0, 4)]
diff --git a/xos/xos/apibase.py b/xos/xos/apibase.py
deleted file mode 100644
index c5344e4..0000000
--- a/xos/xos/apibase.py
+++ /dev/null
@@ -1,120 +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 rest_framework.response import Response
-from rest_framework import serializers
-from rest_framework import generics
-from rest_framework import status
-from rest_framework.exceptions import APIException
-from rest_framework.exceptions import PermissionDenied as RestFrameworkPermissionDenied
-from django.core.exceptions import PermissionDenied as DjangoPermissionDenied
-from django.core.exceptions import ValidationError as DjangoValidationError
-from xos.exceptions import *
-
-
-class XOSRetrieveUpdateDestroyAPIView(generics.RetrieveUpdateDestroyAPIView):
-
-    # To handle fine-grained field permissions, we have to check can_update
-    # the object has been updated but before it has been saved.
-
-    def update(self, request, *args, **kwargs):
-        partial = kwargs.pop("partial", False)
-        self.object = self.get_object()
-
-        if self.object is None:
-            raise XOSProgrammingError("Use the List API for creating objects")
-
-        serializer = self.get_serializer(
-            self.object, data=request.data, partial=partial
-        )
-
-        if not serializer.is_valid():
-            raise XOSValidationError("Invalid serializer", fields=serializer._errors)
-
-        # Do the XOS perm check
-
-        assert serializer.instance is not None
-        obj = serializer.instance
-        for attr, value in serializer.validated_data.items():
-            setattr(obj, attr, value)
-        obj.caller = request.user
-
-        self.perform_update(serializer)
-
-        return Response(serializer.data, status=status.HTTP_200_OK)
-
-    def destroy(self, request, *args, **kwargs):
-        obj = self.get_object()
-        obj.caller = request.user
-        self.perform_destroy(obj)
-        return Response(status=status.HTTP_204_NO_CONTENT)
-
-    def handle_exception(self, exc):
-        # REST API drops the string attached to Django's PermissionDenied
-        # exception, and replaces it with a generic "Permission Denied"
-        if isinstance(exc, DjangoPermissionDenied):
-            response = Response(
-                {
-                    "detail": {
-                        "error": "PermissionDenied",
-                        "specific_error": str(exc),
-                        "fields": {},
-                    }
-                },
-                status=status.HTTP_403_FORBIDDEN,
-            )
-            response.exception = True
-            return response
-        else:
-            return super(XOSRetrieveUpdateDestroyAPIView, self).handle_exception(exc)
-
-
-class XOSListCreateAPIView(generics.ListCreateAPIView):
-    def create(self, request, *args, **kwargs):
-        serializer = self.get_serializer(data=request.data)
-
-        # In rest_framework 3.x: we can pass raise_exception=True instead of
-        # raising the exception ourselves
-        if not serializer.is_valid():
-            raise XOSValidationError("Invalid serializer", fields=serializer._errors)
-
-        # now do XOS can_update permission checking
-        obj = serializer.Meta.model(**serializer.validated_data)
-        obj.caller = request.user
-        self.perform_create(serializer)
-
-        headers = self.get_success_headers(serializer.data)
-        return Response(
-            serializer.data, status=status.HTTP_201_CREATED, headers=headers
-        )
-
-    def handle_exception(self, exc):
-        # REST API drops the string attached to Django's PermissionDenied
-        # exception, and replaces it with a generic "Permission Denied"
-        if isinstance(exc, DjangoPermissionDenied):
-            response = Response(
-                {
-                    "detail": {
-                        "error": "PermissionDenied",
-                        "specific_error": str(exc),
-                        "fields": {},
-                    }
-                },
-                status=status.HTTP_403_FORBIDDEN,
-            )
-            response.exception = True
-            return response
-        else:
-            return super(XOSListCreateAPIView, self).handle_exception(exc)
diff --git a/xos/xos/xml_util.py b/xos/xos/xml_util.py
deleted file mode 100644
index d1c90a9..0000000
--- a/xos/xos/xml_util.py
+++ /dev/null
@@ -1,366 +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.
-
-
-#!/usr/bin/env python
-from types import StringTypes
-from lxml import etree
-from StringIO import StringIO
-
-# helper functions to help build xpaths
-
-
-class XpathFilter:
-    @staticmethod
-    def filter_value(key, value):
-        xpath = ""
-        if isinstance(value, str):
-            if "*" in value:
-                value = value.replace("*", "")
-                xpath = 'contains(%s, "%s")' % (key, value)
-            else:
-                xpath = '%s="%s"' % (key, value)
-        return xpath
-
-    @staticmethod
-    def xpath(filter={}):
-        xpath = ""
-        if filter:
-            filter_list = []
-            for (key, value) in filter.items():
-                if key == "text":
-                    key = "text()"
-                else:
-                    key = "@" + key
-                if isinstance(value, str):
-                    filter_list.append(XpathFilter.filter_value(key, value))
-                elif isinstance(value, list):
-                    stmt = " or ".join(
-                        [XpathFilter.filter_value(key, str(val)) for val in value]
-                    )
-                    filter_list.append(stmt)
-            if filter_list:
-                xpath = " and ".join(filter_list)
-                xpath = "[" + xpath + "]"
-        return xpath
-
-
-# a wrapper class around lxml.etree._Element
-# the reason why we need this one is because of the limitations
-# we've found in xpath to address documents with multiple namespaces defined
-# in a nutshell, we deal with xml documents that have
-# a default namespace defined (xmlns="http://default.com/") and specific prefixes defined
-# (xmlns:foo="http://foo.com")
-# according to the documentation instead of writing
-# element.xpath ( "//node/foo:subnode" )
-# we'd then need to write xpaths like
-# element.xpath ( "//{http://default.com/}node/{http://foo.com}subnode" )
-# which is a real pain..
-# So just so we can keep some reasonable programming style we need to manage the
-# namespace map that goes with the _Element (its internal .nsmap being unmutable)
-class XmlElement:
-    def __init__(self, element, namespaces):
-        self.element = element
-        self.namespaces = namespaces
-
-    # redefine as few methods as possible
-    def xpath(self, xpath, namespaces=None):
-        if not namespaces:
-            namespaces = self.namespaces
-        elems = self.element.xpath(xpath, namespaces=namespaces)
-        return [XmlElement(elem, namespaces) for elem in elems]
-
-    def add_element(self, tagname, **kwds):
-        element = etree.SubElement(self.element, tagname, **kwds)
-        return XmlElement(element, self.namespaces)
-
-    def append(self, elem):
-        if isinstance(elem, XmlElement):
-            self.element.append(elem.element)
-        else:
-            self.element.append(elem)
-
-    def getparent(self):
-        return XmlElement(self.element.getparent(), self.namespaces)
-
-    def get_instance(self, instance_class=None, fields=[]):
-        """
-        Returns an instance (dict) of this xml element. The instance
-        holds a reference to this xml element.
-        """
-        if not instance_class:
-            instance_class = Object
-        if not fields and hasattr(instance_class, "fields"):
-            fields = instance_class.fields
-
-        if not fields:
-            instance = instance_class(self.attrib, self)
-        else:
-            instance = instance_class({}, self)
-            for field in fields:
-                if field in self.attrib:
-                    instance[field] = self.attrib[field]
-        return instance
-
-    def add_instance(self, name, instance, fields=[]):
-        """
-        Adds the specifed instance(s) as a child element of this xml
-        element.
-        """
-        if not fields and hasattr(instance, "keys"):
-            fields = instance.keys()
-        elem = self.add_element(name)
-        for field in fields:
-            if field in instance and instance[field]:
-                elem.set(field, unicode(instance[field]))
-        return elem
-
-    def remove_elements(self, name):
-        """
-        Removes all occurences of an element from the tree. Start at
-        specified root_node if specified, otherwise start at tree's root.
-        """
-
-        if not name.startswith("//"):
-            name = "//" + name
-        elements = self.element.xpath("%s " % name, namespaces=self.namespaces)
-        for element in elements:
-            parent = element.getparent()
-            parent.remove(element)
-
-    def delete(self):
-        parent = self.getparent()
-        parent.remove(self)
-
-    def remove(self, element):
-        if isinstance(element, XmlElement):
-            self.element.remove(element.element)
-        else:
-            self.element.remove(element)
-
-    def set_text(self, text):
-        self.element.text = text
-
-    # Element does not have unset ?!?
-    def unset(self, key):
-        del self.element.attrib[key]
-
-    def toxml(self):
-        return etree.tostring(self.element, encoding="UTF-8", pretty_print=True)
-
-    def __str__(self):
-        return self.toxml()
-
-    # are redirected on self.element
-    def __getattr__(self, name):
-        if not hasattr(self.element, name):
-            raise AttributeError(name)
-        return getattr(self.element, name)
-
-
-class Xml:
-    def __init__(self, xml=None, namespaces=None):
-        self.root = None
-        self.namespaces = namespaces
-        self.default_namespace = None
-        self.schema = None
-        if isinstance(xml, basestring):
-            self.parse_xml(xml)
-        if isinstance(xml, XmlElement):
-            self.root = xml
-            self.namespaces = xml.namespaces
-        elif isinstance(xml, etree._ElementTree) or isinstance(xml, etree._Element):
-            self.parse_xml(etree.tostring(xml))
-
-    def parse_xml(self, xml):
-        """
-        parse rspec into etree
-        """
-        parser = etree.XMLParser(remove_blank_text=True)
-        try:
-            tree = etree.parse(xml, parser)
-        except IOError:
-            # 'rspec' file doesnt exist. 'rspec' is proably an xml string
-            try:
-                tree = etree.parse(StringIO(xml), parser)
-            except Exception as e:
-                raise Exception(str(e))
-        root = tree.getroot()
-        self.namespaces = dict(root.nsmap)
-        # set namespaces map
-        if "default" not in self.namespaces and None in self.namespaces:
-            # If the 'None' exist, then it's pointing to the default namespace. This makes
-            # it hard for us to write xpath queries for the default naemspace because lxml
-            # wont understand a None prefix. We will just associate the default namespeace
-            # with a key named 'default'.
-            self.namespaces["default"] = self.namespaces.pop(None)
-
-        else:
-            self.namespaces["default"] = "default"
-
-        self.root = XmlElement(root, self.namespaces)
-        # set schema
-        for key in self.root.attrib.keys():
-            if key.endswith("schemaLocation"):
-                # schemaLocation should be at the end of the list.
-                # Use list comprehension to filter out empty strings
-                schema_parts = [x for x in self.root.attrib[key].split(" ") if x]
-                self.schema = schema_parts[1]
-                namespace, schema = schema_parts[0], schema_parts[1]
-                break
-
-    def parse_dict(self, d, root_tag_name="xml", element=None):
-        if element is None:
-            if self.root is None:
-                self.parse_xml("<%s/>" % root_tag_name)
-            element = self.root.element
-
-        if "text" in d:
-            text = d.pop("text")
-            element.text = text
-
-        # handle repeating fields
-        for (key, value) in d.items():
-            if isinstance(value, list):
-                value = d.pop(key)
-                for val in value:
-                    if isinstance(val, dict):
-                        child_element = etree.SubElement(element, key)
-                        self.parse_dict(val, key, child_element)
-                    elif isinstance(val, basestring):
-                        child_element = etree.SubElement(element, key).text = val
-
-            elif isinstance(value, int):
-                d[key] = unicode(d[key])
-            elif value is None:
-                d.pop(key)
-
-        # element.attrib.update will explode if DateTimes are in the
-        # dcitionary.
-        d = d.copy()
-        # looks like iteritems won't stand side-effects
-        for k in d.keys():
-            if not isinstance(d[k], StringTypes):
-                del d[k]
-
-        element.attrib.update(d)
-
-    def validate(self, schema):
-        """
-        Validate against rng schema
-        """
-        relaxng_doc = etree.parse(schema)
-        relaxng = etree.RelaxNG(relaxng_doc)
-        if not relaxng(self.root):
-            error = relaxng.error_log.last_error
-            message = "%s (line %s)" % (error.message, error.line)
-            raise Exception(message)
-        return True
-
-    def xpath(self, xpath, namespaces=None):
-        if not namespaces:
-            namespaces = self.namespaces
-        return self.root.xpath(xpath, namespaces=namespaces)
-
-    def set(self, key, value):
-        return self.root.set(key, value)
-
-    def remove_attribute(self, name, element=None):
-        if not element:
-            element = self.root
-        element.remove_attribute(name)
-
-    def add_element(self, *args, **kwds):
-        """
-        Wrapper around etree.SubElement(). Adds an element to
-        specified parent node. Adds element to root node is parent is
-        not specified.
-        """
-        return self.root.add_element(*args, **kwds)
-
-    def remove_elements(self, name, element=None):
-        """
-        Removes all occurences of an element from the tree. Start at
-        specified root_node if specified, otherwise start at tree's root.
-        """
-        if not element:
-            element = self.root
-
-        element.remove_elements(name)
-
-    def add_instance(self, *args, **kwds):
-        return self.root.add_instance(*args, **kwds)
-
-    def get_instance(self, *args, **kwds):
-        return self.root.get_instnace(*args, **kwds)
-
-    def get_element_attributes(self, elem=None, depth=0):
-        if elem is None:
-            elem = self.root
-        if not hasattr(elem, "attrib"):
-            # this is probably not an element node with attribute. could be just and an
-            # attribute, return it
-            return elem
-        attrs = dict(elem.attrib)
-        attrs["text"] = str(elem.text).strip()
-        attrs["parent"] = elem.getparent()
-        if isinstance(depth, int) and depth > 0:
-            for child_elem in list(elem):
-                key = str(child_elem.tag)
-                if key not in attrs:
-                    attrs[key] = [self.get_element_attributes(child_elem, depth - 1)]
-                else:
-                    attrs[key].append(
-                        self.get_element_attributes(child_elem, depth - 1)
-                    )
-        else:
-            attrs["child_nodes"] = list(elem)
-        return attrs
-
-    def append(self, elem):
-        return self.root.append(elem)
-
-    def iterchildren(self):
-        return self.root.iterchildren()
-
-    def merge(self, in_xml):
-        pass
-
-    def __str__(self):
-        return self.toxml()
-
-    def toxml(self):
-        return etree.tostring(self.root.element, encoding="UTF-8", pretty_print=True)
-
-    # XXX smbaker, for record.load_from_string
-    def todict(self, elem=None):
-        if elem is None:
-            elem = self.root
-        d = {}
-        d.update(elem.attrib)
-        d["text"] = elem.text
-        for child in elem.iterchildren():
-            if child.tag not in d:
-                d[child.tag] = []
-            d[child.tag].append(self.todict(child))
-
-        if len(d) == 1 and ("text" in d):
-            d = d["text"]
-
-        return d
-
-    def save(self, filename):
-        f = open(filename, "w")
-        f.write(self.toxml())
-        f.close()
