Added fake service page
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..40b878d
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+node_modules/
\ No newline at end of file
diff --git a/views/ngXosViews/diagnostic/src/css/diagnostic.css b/views/ngXosViews/diagnostic/src/css/diagnostic.css
index 2fe3993..503c2de 100644
--- a/views/ngXosViews/diagnostic/src/css/diagnostic.css
+++ b/views/ngXosViews/diagnostic/src/css/diagnostic.css
@@ -1,6 +1,6 @@
/* CONTAINER */
#xosDiagnostic, [ui-view] {
- height: 700px;
+ height: 100%;
}
diagnostic-container .half-height {
diff --git a/xos/configurations/frontend/docker-compose.yml b/xos/configurations/frontend/docker-compose.yml
index 9c4680a..2ad8f7a 100644
--- a/xos/configurations/frontend/docker-compose.yml
+++ b/xos/configurations/frontend/docker-compose.yml
@@ -26,3 +26,4 @@
- ../../configurations:/opt/xos/configurations
- ../../xos:/opt/xos/xos
- ../../core/views:/opt/xos/core/views
+ - ../../services:/opt/xos/services
diff --git a/xos/configurations/frontend/mocks/mcord.yaml b/xos/configurations/frontend/mocks/mcord.yaml
index c738a49..475ba37 100644
--- a/xos/configurations/frontend/mocks/mcord.yaml
+++ b/xos/configurations/frontend/mocks/mcord.yaml
@@ -13,45 +13,45 @@
vBBU:
type: tosca.nodes.Service
properties:
- view_url: /static/mCordServices/vBBU.html
+ view_url: /mcord/?service=vBBU
kind: RAN
# EPC
vMME:
type: tosca.nodes.Service
properties:
- view_url: /static/mCordServices/vMME.html
+ view_url: /mcord/?service=vMME
kind: EPC
vSGW:
type: tosca.nodes.Service
properties:
- view_url: /static/mCordServices/vSGW.html
+ view_url: /mcord/?service=vSGW
kind: EPC
vPGW:
type: tosca.nodes.Service
properties:
- view_url: /static/mCordServices/vPGW.html
+ view_url: /mcord/?service=vPGW
kind: EPC
# EDGE
Cache:
type: tosca.nodes.Service
properties:
- view_url: /static/mCordServices/cache.html
+ view_url: /mcord/?service=Cache
kind: EDGE
Firewall:
type: tosca.nodes.Service
properties:
- view_url: /static/mCordServices/firewall.html
+ view_url: /mcord/?service=Firewall
kind: EDGE
Video Optimization:
type: tosca.nodes.Service
properties:
- view_url: /mcord/video
+ view_url: /mcord/?service=Video%20Optimization
kind: EDGE
# Images
diff --git a/xos/services/ceilometer/migrations/0001_initial.py b/xos/services/ceilometer/migrations/0001_initial.py
new file mode 100644
index 0000000..6a3dd15
--- /dev/null
+++ b/xos/services/ceilometer/migrations/0001_initial.py
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='CeilometerService',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'Ceilometer Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='MonitoringChannel',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.tenantwithcontainer',),
+ ),
+ migrations.CreateModel(
+ name='SFlowService',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'sFlow Collection Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='SFlowTenant',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.tenant',),
+ ),
+ ]
diff --git a/xos/services/ceilometer/migrations/__init__.py b/xos/services/ceilometer/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xos/services/ceilometer/migrations/__init__.py
diff --git a/xos/services/cord/migrations/0001_initial.py b/xos/services/cord/migrations/0001_initial.py
new file mode 100644
index 0000000..3651371
--- /dev/null
+++ b/xos/services/cord/migrations/0001_initial.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='CordSubscriberRoot',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.subscriber',),
+ ),
+ migrations.CreateModel(
+ name='VBNGService',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'vBNG Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='VBNGTenant',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.tenant',),
+ ),
+ migrations.CreateModel(
+ name='VOLTService',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'vOLT Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='VOLTTenant',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.tenant',),
+ ),
+ migrations.CreateModel(
+ name='VSGService',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'vSG Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='VSGTenant',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.tenantwithcontainer',),
+ ),
+ ]
diff --git a/xos/services/cord/migrations/__init__.py b/xos/services/cord/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xos/services/cord/migrations/__init__.py
diff --git a/xos/services/helloworldservice_complete/migrations/0001_initial.py b/xos/services/helloworldservice_complete/migrations/0001_initial.py
new file mode 100644
index 0000000..00279f1
--- /dev/null
+++ b/xos/services/helloworldservice_complete/migrations/0001_initial.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='HelloWorldServiceComplete',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'Hello World Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ migrations.CreateModel(
+ name='HelloWorldTenantComplete',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'Hello World Tenant',
+ 'proxy': True,
+ },
+ bases=('core.tenantwithcontainer',),
+ ),
+ ]
diff --git a/xos/services/helloworldservice_complete/migrations/__init__.py b/xos/services/helloworldservice_complete/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xos/services/helloworldservice_complete/migrations/__init__.py
diff --git a/xos/services/hpc/migrations/0001_initial.py b/xos/services/hpc/migrations/0001_initial.py
index e1bdd01..38f032c 100644
--- a/xos/services/hpc/migrations/0001_initial.py
+++ b/xos/services/hpc/migrations/0001_initial.py
@@ -2,6 +2,7 @@
from __future__ import unicode_literals
from django.db import models, migrations
+import core.models.plcorebase
import django.utils.timezone
from django.conf import settings
@@ -18,13 +19,23 @@
name='AccessMap',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+ ('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
+ ('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
+ ('enacted', models.DateTimeField(default=None, null=True, blank=True)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
+ ('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('name', models.CharField(help_text=b'Name of the Access Map', max_length=64)),
('description', models.TextField(max_length=130, null=True, blank=True)),
('map', models.FileField(help_text=b'specifies which client requests are allowed', upload_to=b'maps/')),
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='CDNPrefix',
@@ -33,8 +44,13 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('cdn_prefix_id', models.IntegerField(null=True, blank=True)),
('prefix', models.CharField(help_text=b'Registered Prefix for Domain', max_length=200)),
('description', models.TextField(help_text=b'Description of Content Provider', max_length=254, null=True, blank=True)),
@@ -42,7 +58,7 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='ContentProvider',
@@ -51,8 +67,13 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('content_provider_id', models.IntegerField(null=True, blank=True)),
('name', models.CharField(max_length=254)),
('enabled', models.BooleanField(default=True)),
@@ -60,17 +81,46 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
+ ),
+ migrations.CreateModel(
+ name='HpcHealthCheck',
+ fields=[
+ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+ ('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
+ ('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
+ ('enacted', models.DateTimeField(default=None, null=True, blank=True)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
+ ('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
+ ('kind', models.CharField(default=b'dns', max_length=30, choices=[(b'dns', b'DNS'), (b'http', b'HTTP'), (b'nameserver', b'Name Server')])),
+ ('resource_name', core.models.plcorebase.StrippedCharField(max_length=1024)),
+ ('result_contains', core.models.plcorebase.StrippedCharField(max_length=1024, null=True, blank=True)),
+ ('result_min_size', models.IntegerField(null=True, blank=True)),
+ ('result_max_size', models.IntegerField(null=True, blank=True)),
+ ],
+ options={
+ },
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='HpcService',
fields=[
('service_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='core.Service')),
+ ('cmi_hostname', core.models.plcorebase.StrippedCharField(max_length=254, null=True, blank=True)),
+ ('hpc_port80', models.BooleanField(default=True, help_text=b'Enable port 80 for HPC')),
+ ('watcher_hpc_network', core.models.plcorebase.StrippedCharField(help_text=b'Network for hpc_watcher to contact hpc instance', max_length=254, null=True, blank=True)),
+ ('watcher_dnsdemux_network', core.models.plcorebase.StrippedCharField(help_text=b'Network for hpc_watcher to contact dnsdemux instance', max_length=254, null=True, blank=True)),
+ ('watcher_dnsredir_network', core.models.plcorebase.StrippedCharField(help_text=b'Network for hpc_watcher to contact dnsredir instance', max_length=254, null=True, blank=True)),
],
options={
'verbose_name': 'HPC Service',
},
- bases=('core.service', models.Model),
+ bases=('core.service',),
),
migrations.CreateModel(
name='OriginServer',
@@ -79,10 +129,15 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('origin_server_id', models.IntegerField(null=True, blank=True)),
- ('url', models.URLField()),
+ ('url', models.CharField(max_length=1024)),
('authenticated', models.BooleanField(default=False, help_text=b'Status for this Site')),
('enabled', models.BooleanField(default=True, help_text=b'Status for this Site')),
('protocol', models.CharField(default=b'HTTP', max_length=12, choices=[(b'http', b'HTTP'), (b'rtmp', b'RTMP'), (b'rtp', b'RTP'), (b'shout', b'SHOUTcast')])),
@@ -92,7 +147,7 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='ServiceProvider',
@@ -101,30 +156,55 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('service_provider_id', models.IntegerField(null=True, blank=True)),
('name', models.CharField(help_text=b'Service Provider Name', max_length=254)),
('description', models.TextField(help_text=b'Description of Service Provider', max_length=254, null=True, blank=True)),
('enabled', models.BooleanField(default=True)),
+ ('hpcService', models.ForeignKey(to='hpc.HpcService')),
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='SiteMap',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+ ('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
+ ('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
+ ('enacted', models.DateTimeField(default=None, null=True, blank=True)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
+ ('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('name', models.CharField(help_text=b'Name of the Site Map', max_length=64)),
('description', models.TextField(max_length=130, null=True, blank=True)),
('map', models.FileField(help_text=b'specifies how to map requests to hpc instances', upload_to=b'maps/')),
+ ('map_id', models.IntegerField(null=True, blank=True)),
+ ('cdnPrefix', models.ForeignKey(blank=True, to='hpc.CDNPrefix', null=True)),
('contentProvider', models.ForeignKey(blank=True, to='hpc.ContentProvider', null=True)),
+ ('hpcService', models.ForeignKey(blank=True, to='hpc.HpcService', null=True)),
('serviceProvider', models.ForeignKey(blank=True, to='hpc.ServiceProvider', null=True)),
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
+ ),
+ migrations.AddField(
+ model_name='hpchealthcheck',
+ name='hpcService',
+ field=models.ForeignKey(blank=True, to='hpc.HpcService', null=True),
+ preserve_default=True,
),
migrations.AddField(
model_name='contentprovider',
diff --git a/xos/services/mcord/view.py b/xos/services/mcord/view.py
old mode 100755
new mode 100644
index c2963be..2da4a24
--- a/xos/services/mcord/view.py
+++ b/xos/services/mcord/view.py
@@ -2,6 +2,7 @@
from django.views.generic import TemplateView, View
from django import template
from core.models import *
+from services.helloworld.models import *
import json
import os
import time
@@ -20,38 +21,87 @@
head_template = self.head_template
tail_template = self.tail_template
- try:
- hello_name = request.GET['hello_name']
- world_name = request.GET['world_name']
- instance_id_str = request.GET['instance_id']
- instance_id = int(instance_id_str)
+ title = request.GET.get('service', '')
+ url = "/mcord/?service=%s" % (title)
- i = Instance.objects.get(pk=instance_id)
- i.pk=None
- i.userData=None
- i.instance_id=None
- i.instance_name=None
- i.enacted=None
- i.save()
- h = Hello(name=hello_name,instance_backref=i)
- h.save()
- w = World(hello=h,name=world_name)
- w.save()
+ form = """
+ <h2 class="content-title">Change %s Service</h2>
+ <div id="content-main">
+ <form class="form-horizontal">
+ <div class="tab-content tab-content-main">
+ <div class="suit-include suit-tab suit-tab-administration hide">
+ <div class="left-nav">
+ <ul>
+ <li><a href="/admin/ceilometer/monitoringchannel/">Monitoring Channels</a></li>
+ </ul>
+ </div>
+ </div>
+ <fieldset class="module aligned suit-tab suit-tab-general show">
+ <div class="panel fieldset-body">
+ <div class="form-group field-backend_status_text ">
+ <label class="control-label col-xs-12 col-sm-2"><label>Backend status text:</label></label>
+ <div class="form-column col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <p><img src="/static/admin/img/icon_clock.gif"> Pending sync, last_status = 0 - Provisioning in progress</p>
+ </div>
+ </div>
+ <div class="form-group field-name ">
+ <label class="control-label col-xs-12 col-sm-2"><label class="required" for="id_name">Name:</label></label>
+ <div class="form-column widget-AdminTextInputWidget col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <input class="vTextField form-control" id="id_name" maxlength="30" name="name" type="text" value="%s">
+ <div class="help-block">Service Name</div>
+ </div>
+ </div>
+ <div class="form-group field-enabled ">
+ <label class="control-label col-xs-12 col-sm-2"><label class="vCheckboxLabel" for="id_enabled">Enabled</label></label>
+ <div class="form-column widget-CheckboxInput col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <input checked="checked" id="id_enabled" name="enabled" type="checkbox">
+ </div>
+ </div>
+ <div class="form-group field-versionNumber ">
+ <label class="control-label col-xs-12 col-sm-2"><label class="required" for="id_versionNumber">VersionNumber:</label></label>
+ <div class="form-column widget-AdminTextInputWidget col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <input class="vTextField form-control" id="id_versionNumber" maxlength="30" name="versionNumber" type="text">
+ <div class="help-block">Version of Service Definition</div>
+ </div>
+ </div>
+ <div class="form-group field-description ">
+ <label class="control-label col-xs-12 col-sm-2"><label for="id_description">Description:</label></label>
+ <div class="form-column widget-AdminTextareaWidget col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <textarea class="vLargeTextField form-control" cols="40" id="id_description" maxlength="254" name="description" rows="10"></textarea>
+ <div class="help-block">Description of Service</div>
+ </div>
+ </div>
+ <div class="form-group field-view_url ">
+ <label class="control-label col-xs-12 col-sm-2"><label for="id_view_url">View url:</label></label>
+ <div class="form-column widget-AdminTextInputWidget col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <input class="vTextField form-control" id="id_view_url" maxlength="1024" name="view_url" type="text" value="%s">
+ </div>
+ </div>
+ <div class="form-group field-icon_url ">
+ <label class="control-label col-xs-12 col-sm-2"><label for="id_icon_url">Icon url:</label></label>
+ <div class="form-column widget-AdminTextInputWidget col-xs-12 col-sm-8 col-md-6 col-lg-4">
+ <input class="vTextField form-control" id="id_icon_url" maxlength="1024" name="icon_url" type="text">
+ </div>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ </form>
+ <div class="form-buttons clearfix">
+ <button type="submit" class="btn btn-high btn-success" name="_save">Save</button>
+ <button type="submit" name="_continue" class=" btn btn-high btn-info">Save and continue editing</button>
+ <button type="submit" name="_addanother" class="btn btn-info">Save and add another</button>
+ <a href="delete/" class="text-error deletelink">Delete</a>
+ </div>
+ </div>
+ """ % (title, title, url)
- t = template.Template(head_template + 'Done. New instance id: %r'%i.pk + self.tail_template)
- except KeyError:
- html = """<form>
- Hello string: <input type="text" name="hello_name" placeholder="Planet"><br>
- World string: <input type="text" name="world_name" placeholder="Earth"><br>
- Id of instance to copy: <input type="text" name="instance_id" placeholder="3"><br>
- <input type="submit" value="Submit">
- </form>"""
-
- t = template.Template(head_template + html + self.tail_template)
+ t = template.Template(head_template + form + tail_template)
response_kwargs = {}
response_kwargs.setdefault('content_type', self.content_type)
return self.response_class(
- request = request,
- template = t,
- **response_kwargs)
+ request=request,
+ template=t,
+ **response_kwargs
+ )
diff --git a/xos/services/onos/migrations/0001_initial.py b/xos/services/onos/migrations/0001_initial.py
new file mode 100644
index 0000000..1df9da7
--- /dev/null
+++ b/xos/services/onos/migrations/0001_initial.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='ONOSApp',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('core.tenant',),
+ ),
+ migrations.CreateModel(
+ name='ONOSService',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'ONOS Service',
+ 'proxy': True,
+ },
+ bases=('core.service',),
+ ),
+ ]
diff --git a/xos/services/onos/migrations/__init__.py b/xos/services/onos/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xos/services/onos/migrations/__init__.py
diff --git a/xos/services/requestrouter/migrations/0001_initial.py b/xos/services/requestrouter/migrations/0001_initial.py
index a398283..bdaec7b 100644
--- a/xos/services/requestrouter/migrations/0001_initial.py
+++ b/xos/services/requestrouter/migrations/0001_initial.py
@@ -3,6 +3,7 @@
from django.db import models, migrations
import django.utils.timezone
+import core.models.plcorebase
class Migration(migrations.Migration):
@@ -34,8 +35,13 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('name', models.SlugField(help_text=b'name of this service map', unique=True)),
('prefix', models.CharField(help_text=b'FQDN of the region of URI space managed by RR on behalf of this service', max_length=256)),
('siteMap', models.FileField(help_text=b'maps client requests to service instances', upload_to=b'maps/', blank=True)),
@@ -45,6 +51,6 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
]
diff --git a/xos/services/syndicate_storage/migrations/0001_initial.py b/xos/services/syndicate_storage/migrations/0001_initial.py
index f0065ce..6dd67e8 100644
--- a/xos/services/syndicate_storage/migrations/0001_initial.py
+++ b/xos/services/syndicate_storage/migrations/0001_initial.py
@@ -2,9 +2,10 @@
from __future__ import unicode_literals
from django.db import models, migrations
-import services.syndicate_storage.models
-import django.utils.timezone
+import core.models.plcorebase
from django.conf import settings
+import django.utils.timezone
+import services.syndicate_storage.models
class Migration(migrations.Migration):
@@ -33,15 +34,20 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('principal_id', models.TextField(unique=True)),
('public_key_pem', models.TextField()),
('sealed_private_key', models.TextField()),
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='SyndicateService',
@@ -61,8 +67,13 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('name', models.CharField(help_text=b'Human-readable, searchable name of the Volume', max_length=64)),
('description', models.TextField(help_text=b'Human-readable description of what this Volume is used for.', max_length=130, null=True, blank=True)),
('blocksize', models.PositiveIntegerField(help_text=b'Number of bytes per block.')),
@@ -75,7 +86,7 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='VolumeAccessRight',
@@ -84,8 +95,13 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('cap_read_data', models.BooleanField(default=True, help_text=b'VM can read Volume data')),
('cap_write_data', models.BooleanField(default=True, help_text=b'VM can write Volume data')),
('cap_host_data', models.BooleanField(default=True, help_text=b'VM can host Volume data')),
@@ -94,7 +110,7 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.CreateModel(
name='VolumeSlice',
@@ -103,8 +119,13 @@
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)),
('enacted', models.DateTimeField(default=None, null=True, blank=True)),
- ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)),
+ ('policed', models.DateTimeField(default=None, null=True, blank=True)),
+ ('backend_register', models.CharField(default=b'{}', max_length=140, null=True)),
+ ('backend_status', models.CharField(default=b'0 - Provisioning in progress', max_length=1024)),
('deleted', models.BooleanField(default=False)),
+ ('write_protect', models.BooleanField(default=False)),
+ ('lazy_blocked', models.BooleanField(default=False)),
+ ('no_sync', models.BooleanField(default=False)),
('cap_read_data', models.BooleanField(default=True, help_text=b'VM can read Volume data')),
('cap_write_data', models.BooleanField(default=True, help_text=b'VM can write Volume data')),
('cap_host_data', models.BooleanField(default=True, help_text=b'VM can host Volume data')),
@@ -116,7 +137,7 @@
],
options={
},
- bases=(models.Model,),
+ bases=(models.Model, core.models.plcorebase.PlModelMixIn),
),
migrations.AddField(
model_name='volume',
diff --git a/xos/xos/urls.py b/xos/xos/urls.py
index 65af931..5a56bcb 100644
--- a/xos/xos/urls.py
+++ b/xos/xos/urls.py
@@ -11,7 +11,7 @@
from core.views.legacyapi import LegacyXMLRPC
from core.views.serviceGraph import ServiceGridView, ServiceGraphView
from services.helloworld.view import *
-from services.helloworld.view import *
+from services.mcord.view import *
# from core.views.analytics import AnalyticsAjaxView
from core.models import *
from rest_framework import generics
@@ -59,7 +59,7 @@
url(r'^observer', 'core.views.observer.Observer', name='observer'),
url(r'^helloworld', HelloWorldView.as_view(), name='helloWorld'),
- # url(r'^mcord', MCordView.as_view(), name='mcord'),
+ url(r'^mcord', MCordView.as_view(), name='mcord'),
url(r'^serviceGrid', serviceClass(), name='serviceGrid'),
url(r'^serviceGraph.png', ServiceGraphView.as_view(), name='serviceGraph'),