migration script for field names in network object
diff --git a/planetstack/core/fixtures/initial_data.json b/planetstack/core/fixtures/initial_data.json
index a6cef77..6f0a976 100644
--- a/planetstack/core/fixtures/initial_data.json
+++ b/planetstack/core/fixtures/initial_data.json
@@ -2928,10 +2928,10 @@
"created": "2013-12-09T14:15:16.899Z",
"deleted": false,
"description": "Connect a sliver to the public network using dedicated public IPv4 address",
- "sharedNetworkName": "ext-net",
- "guaranteedBandwidth": 0,
+ "shared_network_name": "ext-net",
+ "guaranteed_bandwidth": 0,
"visibility": "public",
- "sharedNetworkId": "",
+ "shared_network_id": "",
"translation": "none",
"backend_status": "Provisioning in progress",
"enacted": "2014-05-21T15:36:30Z"
@@ -2946,10 +2946,10 @@
"created": "2013-12-09T14:17:29.551Z",
"deleted": false,
"description": "Connect a sliver to the public network via NAT",
- "sharedNetworkName": "nat-net",
- "guaranteedBandwidth": 0,
+ "shared_network_name": "nat-net",
+ "guaranteed_bandwidth": 0,
"visibility": "private",
- "sharedNetworkId": "",
+ "shared_network_id": "",
"translation": "NAT",
"backend_status": "Provisioning in progress",
"enacted": "2014-05-21T15:36:03Z"
@@ -2964,10 +2964,10 @@
"created": "2013-12-09T14:18:02.336Z",
"deleted": false,
"description": "A private virtual network",
- "sharedNetworkName": "",
- "guaranteedBandwidth": 0,
+ "shared_network_name": "",
+ "guaranteed_bandwidth": 0,
"visibility": "private",
- "sharedNetworkId": "",
+ "shared_network_id": "",
"translation": "none",
"backend_status": "Provisioning in progress",
"enacted": "2014-05-21T15:35:54Z"
diff --git a/planetstack/core/migrations/0003_network_field_case.py b/planetstack/core/migrations/0003_network_field_case.py
new file mode 100644
index 0000000..d063363
--- /dev/null
+++ b/planetstack/core/migrations/0003_network_field_case.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import timezones.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0002_network_field_case'),
+ ]
+
+ operations = [
+ migrations.RenameField(
+ model_name='network',
+ old_name='controllerParameters',
+ new_name='controller_parameters',
+ ),
+ migrations.RenameField(
+ model_name='network',
+ old_name='controllerUrl',
+ new_name='controller_url',
+ ),
+ migrations.RenameField(
+ model_name='network',
+ old_name='guaranteedBandwidth',
+ new_name='guaranteed_bandwidth',
+ ),
+ migrations.RenameField(
+ model_name='network',
+ old_name='permitAllSlices',
+ new_name='permit_all_slices',
+ ),
+ migrations.RenameField(
+ model_name='network',
+ old_name='permittedSlices',
+ new_name='permitted_slices',
+ ),
+ migrations.RenameField(
+ model_name='network',
+ old_name='topologyParameters',
+ new_name='topology_parameters',
+ ),
+ ]