add no-start for services; bidirectional VTN WIP

Change-Id: I8b3c1d89e64c86698aa3515bcd0a61825c208829
diff --git a/xos/core/admin.py b/xos/core/admin.py
index 8910d9c..a4de231 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1061,7 +1061,7 @@
 class ServiceControllerAdmin(XOSBaseAdmin):
     list_display = ("backend_status_icon", "name",)
     list_display_links = ('backend_status_icon', 'name',)
-    fieldList = ["backend_status_text", "name", "xos", "base_url", "synchronizer_run", "synchronizer_config"]
+    fieldList = ["backend_status_text", "name", "xos", "base_url", "synchronizer_run", "synchronizer_config", "no_start"]
     fieldsets = [
         (None, {'fields': fieldList, 'classes': ['suit-tab suit-tab-general']})]
     inlines = [ServiceControllerResourceInline]
diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index 8ff9348..df91e8c 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -73,6 +73,8 @@
     synchronizer_run = StrippedCharField(max_length=1024, help_text="synchronizer run command", null=True, blank=True)
     synchronizer_config = StrippedCharField(max_length=1024, help_text="synchronizer config file", null=True, blank=True)
 
+    no_start = models.BooleanField(help_text="Do not start the XOS UI inside of the UI docker container", default=False)
+
     def __unicode__(self): return u'%s' % (self.name)
 
     def save(self, *args, **kwargs):
@@ -309,6 +311,7 @@
             if tenant.provider_service:
                 for net in tenant.provider_service.get_vtn_nets():
                     if not net in provider_nets:
+                        net["bidirectional"] = tenant.connect_method!="private-unidirectional"
                         provider_nets.append(net)
         return provider_nets
 
@@ -458,7 +461,9 @@
     """
 
     CONNECTIVITY_CHOICES = (('public', 'Public'),
-                            ('private', 'Private'), ('na', 'Not Applicable'))
+                            ('private', 'Private'),
+                            ('private-unidirectional', 'Private Unidirectional'),
+                            ('na', 'Not Applicable'))
 
     # when subclassing a service, redefine KIND to describe the new service
     KIND = "generic"
diff --git a/xos/synchronizers/onboarding/xosbuilder.py b/xos/synchronizers/onboarding/xosbuilder.py
index c87efc3..fb71a28 100644
--- a/xos/synchronizers/onboarding/xosbuilder.py
+++ b/xos/synchronizers/onboarding/xosbuilder.py
@@ -357,6 +357,9 @@
                                      "extra_hosts": extra_hosts,
                                      "volumes": volume_list}
 
+                     if c.no_start:
+                         containers["xos_synchronizer_%s" % c.name]["command"] = "sleep 864000"
+
          vars = { "containers": containers }
 
          template_loader = jinja2.FileSystemLoader( "/opt/xos/synchronizers/onboarding/templates/" )