convert all roles, dashboardviews, flavors, and networktemplates from Fixtures to Tosca
diff --git a/xos/configurations/common/fixtures.yaml b/xos/configurations/common/fixtures.yaml
index 6419211..6d9c0e8 100644
--- a/xos/configurations/common/fixtures.yaml
+++ b/xos/configurations/common/fixtures.yaml
@@ -7,6 +7,11 @@
topology_template:
node_templates:
+
+# -----------------------------------------------------------------------------
+# Network Parameter Types
+# -----------------------------------------------------------------------------
+
s_tag:
type: tosca.nodes.NetworkParameterType
@@ -24,3 +29,97 @@
neutron_port_name:
type: tosca.nodes.NetworkParameterType
+
+# ----------------------------------------------------------------------------
+# Roles
+# ----------------------------------------------------------------------------
+
+ siterole#admin:
+ type: tosca.nodes.SiteRole
+
+ siterole#pi:
+ type: tosca.nodes.SiteRole
+
+ siterole#tech:
+ type: tosca.nodes.SiteRole
+
+ tenantrole#admin:
+ type: tosca.nodes.TenantRole
+
+ tenantrole#access:
+ type: tosca.nodes.TenantRole
+
+ deploymentrole#admin:
+ type: tosca.nodes.DeploymentRole
+
+ slicerole#admin:
+ type: tosca.nodes.SliceRole
+
+ slicerole#access:
+ type: tosca.nodes.SliceRole
+
+# -----------------------------------------------------------------------------
+# Flavors
+# -----------------------------------------------------------------------------
+
+ m1.small:
+ type: tosca.nodes.Flavor
+
+ m1.medium:
+ type: tosca.nodes.Flavor
+
+ m1.large:
+ type: tosca.nodes.Flavor
+
+# -----------------------------------------------------------------------------
+# Dashboard Views
+# -----------------------------------------------------------------------------
+
+ xsh:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:xsh
+
+ Customize:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:customize
+
+ Tenant:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:xosTenant
+
+ Developer:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:xosDeveloper_datatables
+
+# -----------------------------------------------------------------------------
+# Network Templates
+# -----------------------------------------------------------------------------
+
+ Private:
+ type: tosca.nodes.NetworkTemplate
+ properties:
+ visibility: private
+ translation: none
+
+ Public shared IPv4:
+ type: tosca.nodes.NetworkTemplate
+ properties:
+ visibility: private
+ translation: NAT
+ shared_network_name: nat-net
+
+ Public dedicated IPv4:
+ type: tosca.nodes.NetworkTemplate
+ properties:
+ visibility: public
+ translation: none
+ shared_network_name: ext-net
+
+
+
+
+
diff --git a/xos/configurations/cord-pod/Makefile b/xos/configurations/cord-pod/Makefile
index f1111b4..3745f93 100644
--- a/xos/configurations/cord-pod/Makefile
+++ b/xos/configurations/cord-pod/Makefile
@@ -2,6 +2,7 @@
xos: nodes.yaml images.yaml
sudo docker-compose up -d
../common/wait_for_xos_port.sh 80
+ sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/setup.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
@@ -12,7 +13,6 @@
cord: virtualbng_json
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/mgmt-net.yaml
- sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/cord-vtn-vsg.yaml
exampleservice:
diff --git a/xos/configurations/frontend/Makefile b/xos/configurations/frontend/Makefile
index 27b0044..09c714b 100644
--- a/xos/configurations/frontend/Makefile
+++ b/xos/configurations/frontend/Makefile
@@ -4,6 +4,7 @@
sudo make -f ../common/Makefile.prereqs
sudo docker-compose up -d
bash ../common/wait_for_xos.sh
+ sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/sample.yaml
@@ -29,7 +30,6 @@
sudo docker exec frontend_xos_1 touch /opt/xos/xos/settings.py
mock-cord:
- sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/mocks/cord.yaml
sudo docker exec frontend_xos_1 cp /opt/xos/configurations/cord/xos_cord_config /opt/xos/xos_configuration/
sudo docker exec frontend_xos_1 touch /opt/xos/xos/settings.py
diff --git a/xos/configurations/test-standalone/Makefile b/xos/configurations/test-standalone/Makefile
index 50f2cc5..79ab0eb 100644
--- a/xos/configurations/test-standalone/Makefile
+++ b/xos/configurations/test-standalone/Makefile
@@ -33,9 +33,8 @@
sudo docker exec teststandalone_xos_db_1 psql -U postgres -d xos -c "SELECT truncate_tables('postgres');"
sudo docker exec teststandalone_xos_db_1 psql -U postgres -d xos -c "SELECT setval('core_tenant_id_seq', 1)"
sudo docker-compose run xos python /opt/xos/manage.py --noobserver --nomodelpolicy loaddata /opt/xos/core/fixtures/core_initial_data.json
+ sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/sample.yaml
- sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
-
test: restore-initial-db-status
diff --git a/xos/core/fixtures/core_initial_data.json b/xos/core/fixtures/core_initial_data.json
index db5bd10..01ff999 100644
--- a/xos/core/fixtures/core_initial_data.json
+++ b/xos/core/fixtures/core_initial_data.json
@@ -1,159 +1,6 @@
[
{
"fields": {
- "updated": "2015-02-17T22:06:38.620Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.620Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "admin",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.siterole",
- "pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.670Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.669Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "pi",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.siterole",
- "pk": 2
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.731Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.730Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "tech",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.siterole",
- "pk": 3
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.620Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.620Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "admin",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.tenantrole",
- "pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.620Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.620Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "access",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.tenantrole",
- "pk": 2
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.894Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.894Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "admin",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.deploymentrole",
- "pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.953Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.953Z",
- "deleted": false,
- "deployments": [],
- "enabled": true,
- "name": "xsh",
- "backend_register": "{}",
- "url": "template:xsh",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.dashboardview",
- "pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:39.011Z",
- "policed": null,
- "created": "2015-02-17T22:06:39.011Z",
- "deleted": false,
- "deployments": [],
- "enabled": true,
- "name": "Customize",
- "backend_register": "{}",
- "url": "template:customize",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.dashboardview",
- "pk": 2
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:39.244Z",
- "policed": null,
- "created": "2015-02-17T22:06:39.069Z",
- "deleted": false,
- "deployments": [
- ],
- "enabled": true,
- "name": "Tenant",
- "backend_register": "{}",
- "url": "template:xosTenant",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.dashboardview",
- "pk": 3
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:39.302Z",
- "policed": null,
- "created": "2015-02-17T22:06:39.302Z",
- "deleted": false,
- "deployments": [],
- "enabled": true,
- "name": "Developer",
- "backend_register": "{}",
- "url": "template:xosDeveloper_datatables",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.dashboardview",
- "pk": 4
-},
-{
- "fields": {
"updated": "2015-02-17T22:06:39.361Z",
"membershipFee": 0,
"policed": null,
@@ -171,159 +18,5 @@
},
"model": "core.serviceclass",
"pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.236Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.095Z",
- "deleted": false,
- "deployments": [
- ],
- "description": null,
- "name": "m1.small",
- "backend_register": "{}",
- "default": false,
- "flavor": "m1.small",
- "backend_status": "0 - Provisioning in progress",
- "order": 0,
- "enacted": null
- },
- "model": "core.flavor",
- "pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.394Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.287Z",
- "deleted": false,
- "deployments": [
- ],
- "description": null,
- "name": "m1.medium",
- "backend_register": "{}",
- "default": false,
- "flavor": "m1.medium",
- "backend_status": "0 - Provisioning in progress",
- "order": 0,
- "enacted": null
- },
- "model": "core.flavor",
- "pk": 2
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.561Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.445Z",
- "deleted": false,
- "deployments": [
- ],
- "description": null,
- "name": "m1.large",
- "backend_register": "{}",
- "default": false,
- "flavor": "m1.large",
- "backend_status": "0 - Provisioning in progress",
- "order": 0,
- "enacted": null
- },
- "model": "core.flavor",
- "pk": 3
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.778Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.778Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "admin",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.slicerole",
- "pk": 1
-},
-{
- "fields": {
- "updated": "2015-02-17T22:06:38.836Z",
- "policed": null,
- "created": "2015-02-17T22:06:38.836Z",
- "deleted": false,
- "backend_register": "{}",
- "role": "access",
- "backend_status": "0 - Provisioning in progress",
- "enacted": null
- },
- "model": "core.slicerole",
- "pk": 2
-},
-{
- "fields": {
- "shared_network_id": null,
- "updated": "2015-02-17T22:06:39.419Z",
- "policed": null,
- "created": "2015-02-17T22:06:39.419Z",
- "deleted": false,
- "description": "A private virtual network",
- "visibility": "private",
- "name": "Private",
- "backend_register": "{}",
- "topology_kind": "bigswitch",
- "guaranteed_bandwidth": 0,
- "translation": "none",
- "backend_status": "0 - Provisioning in progress",
- "shared_network_name": null,
- "controller_kind": null,
- "enacted": null
- },
- "model": "core.networktemplate",
- "pk": 1
-},
-{
- "fields": {
- "shared_network_id": null,
- "updated": "2015-02-17T22:06:39.477Z",
- "policed": null,
- "created": "2015-02-17T22:06:39.477Z",
- "deleted": false,
- "description": "Connect a instance to the public network",
- "visibility": "private",
- "name": "Public shared IPv4",
- "backend_register": "{}",
- "topology_kind": "bigswitch",
- "guaranteed_bandwidth": 0,
- "translation": "NAT",
- "backend_status": "0 - Provisioning in progress",
- "shared_network_name": "nat-net",
- "controller_kind": null,
- "enacted": null
- },
- "model": "core.networktemplate",
- "pk": 2
-},
-{
- "fields": {
- "shared_network_id": null,
- "updated": "2015-02-17T22:06:39.536Z",
- "policed": null,
- "created": "2015-02-17T22:06:39.536Z",
- "deleted": false,
- "description": "Connect a instance to the public network",
- "visibility": "public",
- "name": "Public dedicated IPv4",
- "backend_register": "{}",
- "topology_kind": "bigswitch",
- "guaranteed_bandwidth": 0,
- "translation": "none",
- "backend_status": "0 - Provisioning in progress",
- "shared_network_name": "ext-net",
- "controller_kind": null,
- "enacted": null
- },
- "model": "core.networktemplate",
- "pk": 3
}
]