[SEBA-475] Generated migrations with xos-migrate
Change-Id: Iebc661f22416d264f5602c566b0c04458879170b
diff --git a/Dockerfile.synchronizer b/Dockerfile.synchronizer
index 9ebe76f..b52884a 100644
--- a/Dockerfile.synchronizer
+++ b/Dockerfile.synchronizer
@@ -14,7 +14,7 @@
# xosproject/openstack-synchronizer
-FROM xosproject/xos-synchronizer-base:2.1.38
+FROM xosproject/xos-synchronizer-base:2.1.54
COPY xos/synchronizer /opt/xos/synchronizers/openstack
COPY VERSION /opt/xos/synchronizers/openstack/
diff --git a/VERSION b/VERSION
index 0664a8f..237bbfe 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.6
+1.1.7-dev
diff --git a/xos/synchronizer/Makefile b/xos/synchronizer/Makefile
deleted file mode 100644
index b784fd8..0000000
--- a/xos/synchronizer/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-synchronizer:
- sudo docker build --rm -f Dockerfile.synchronizer -t xosproject/openstack-synchronizer .
-
-up:
- docker-compose -p openstack up -d
diff --git a/xos/synchronizer/config.yaml b/xos/synchronizer/config.yaml
index ac3a5f7..ec417d1 100644
--- a/xos/synchronizer/config.yaml
+++ b/xos/synchronizer/config.yaml
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-name: openstack-synchronizer
+name: openstack
dependency_graph: "/opt/xos/synchronizers/openstack/model-deps"
steps_dir: "/opt/xos/synchronizers/openstack/steps"
pull_steps_dir: "/opt/xos/synchronizers/openstack/pull_steps"
diff --git a/xos/synchronizer/docker-compose.yml b/xos/synchronizer/docker-compose.yml
deleted file mode 100644
index 85b82e6..0000000
--- a/xos/synchronizer/docker-compose.yml
+++ /dev/null
@@ -1,37 +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.
-
-
-version: '2'
-
-networks:
- xos:
- external: true
-
-services:
- synchronizer:
- image: xosproject/openstack-synchronizer
- networks:
- - xos
- #command: bash -c "sleep 86400"
- volumes:
- - /opt/cord/build/platform-install/credentials/xosadmin@opencord.org:/opt/xos/services/openstack/credentials/xosadmin@opencord.org
- external_links:
- - rcordbs_xos_redis_1:redis
- logging:
- driver: "json-file"
- options:
- max-size: "1000k"
- max-file: "5"
diff --git a/xos/synchronizer/migrations/0001_initial.py b/xos/synchronizer/migrations/0001_initial.py
new file mode 100644
index 0000000..7c3a964
--- /dev/null
+++ b/xos/synchronizer/migrations/0001_initial.py
@@ -0,0 +1,60 @@
+# 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.
+
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.11 on 2019-02-21 16:28
+from __future__ import unicode_literals
+
+import core.models.xosbase_header
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ('core', '0002_initial_data'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='OpenStackService',
+ fields=[
+ ('service_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Service_decl')),
+ ('auth_url', core.models.xosbase_header.StrippedCharField(blank=True, help_text=b'Auth url for the OpenStack controller', max_length=200, null=True)),
+ ('admin_user', core.models.xosbase_header.StrippedCharField(blank=True, help_text=b'Username of an admin user at this OpenStack', max_length=200, null=True)),
+ ('admin_password', core.models.xosbase_header.StrippedCharField(blank=True, help_text=b'Password of theadmin user at this OpenStack', max_length=200, null=True)),
+ ('admin_tenant', core.models.xosbase_header.StrippedCharField(blank=True, help_text=b'Name of the tenant the admin user belongs to', max_length=200, null=True)),
+ ],
+ options={
+ 'verbose_name': 'OpenStack Service',
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='OpenStackServiceInstance',
+ fields=[
+ ('computeserviceinstance_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.ComputeServiceInstance_decl')),
+ ('admin_password', core.models.xosbase_header.StrippedCharField(blank=True, help_text=b'Admin password for instance', max_length=200, null=True)),
+ ('flavor', models.ForeignKey(blank=True, help_text=b'Flavor of this instance', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='openstackinstance', to='core.Flavor')),
+ ('node', models.ForeignKey(blank=True, help_text=b'Node on which to deploy this instance', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='openstackinstances', to='core.Node')),
+ ],
+ options={
+ 'verbose_name': 'OpenStack Service Instance',
+ },
+ bases=('core.computeserviceinstance',),
+ ),
+ ]
diff --git a/xos/synchronizer/migrations/__init__.py b/xos/synchronizer/migrations/__init__.py
new file mode 100644
index 0000000..b0fb0b2
--- /dev/null
+++ b/xos/synchronizer/migrations/__init__.py
@@ -0,0 +1,13 @@
+# 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.