add volume support back to containers
diff --git a/xos/core/admin.py b/xos/core/admin.py
index aaa72cb..ce7759c 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1282,13 +1282,14 @@
class InstanceAdmin(XOSBaseAdmin):
form = InstanceForm
fieldsets = [
- ('Instance Details', {'fields': ['backend_status_text', 'slice', 'deployment', 'isolation', 'flavor', 'image', 'node', 'all_ips_string', 'instance_id', 'instance_name', 'ssh_command'], 'classes': ['suit-tab suit-tab-general'], })
+ ('Instance Details', {'fields': ['backend_status_text', 'slice', 'deployment', 'isolation', 'flavor', 'image', 'node', 'all_ips_string', 'instance_id', 'instance_name', 'ssh_command', ], 'classes': ['suit-tab suit-tab-general'], }),
+ ('Container Settings', {'fields': ['volumes'], 'classes': ['suit-tab suit-tab-container'], }),
]
readonly_fields = ('backend_status_text', 'ssh_command', 'all_ips_string')
list_display = ['backend_status_icon', 'all_ips_string', 'instance_id', 'instance_name', 'isolation', 'slice', 'flavor', 'image', 'node', 'deployment']
list_display_links = ('backend_status_icon', 'all_ips_string', 'instance_id', )
- suit_form_tabs =(('general', 'Instance Details'), ('ports', 'Ports'))
+ suit_form_tabs =(('general', 'Instance Details'), ('ports', 'Ports'), ('container', 'Container Settings'))
inlines = [TagInline, InstancePortInline]
diff --git a/xos/core/models/instance.py b/xos/core/models/instance.py
index af1f965..927c8e3 100644
--- a/xos/core/models/instance.py
+++ b/xos/core/models/instance.py
@@ -100,6 +100,7 @@
tags = generic.GenericRelation(Tag)
userData = models.TextField(blank=True, null=True, help_text="user_data passed to instance during creation")
isolation = models.CharField(null=False, blank=False, max_length=30, choices=ISOLATION_CHOICES, default="vm")
+ volumes = models.TextField(null=True, blank=True, help_text="Comma-separated list of directories to expose to parent context")
def __unicode__(self):
if self.name and Slice.objects.filter(id=self.slice_id) and (self.name != self.slice.name):
diff --git a/xos/openstack_observer/steps/sync_container.py b/xos/openstack_observer/steps/sync_container.py
index fef08d2..26e03e5 100644
--- a/xos/openstack_observer/steps/sync_container.py
+++ b/xos/openstack_observer/steps/sync_container.py
@@ -78,7 +78,7 @@
fields["docker_image"] = o.image.name
fields["username"] = "root"
fields["ports"] = self.get_ports(o)
- fields["volumes"] = [] # XXX [x.strip() for x in o.volumes.split(",")]
+ fields["volumes"] = [x.strip() for x in o.volumes.split(",")]
return fields
def sync_fields(self, o, fields):