import fabric


def configure(vcloud_config):
    _update_vm()


def _get_distro():
    """ detect current distro """
    return fabric.api.run(
        'python -c "import platform; print platform.dist()[0]"')


def _update_vm():
    """ install some packeges for future deployments creation """
    distro = _get_distro()
    if 'Ubuntu' in distro:
        # update system to last version
        fabric.api.run("sudo docker exec -i -t cfy apt-get "
                       "update -q -y 2>&1")
        fabric.api.run("sudo docker exec -i -t cfy apt-get "
                       "dist-upgrade -q -y 2>&1")
        # install:
        fabric.api.run("sudo docker exec -i -t cfy apt-get "
                       "install gcc python-dev libxml2-dev libxslt-dev "
                       "zlib1g-dev -q -y 2>&1")

@@ -55,158 +55,18 @@
 ate_
-vm()%0A%0A%0Adef _get_distro():%0A    %22%22%22 detect current distro %22%22%22%0A    return fabric.api.run(%0A        'python -c %22import platform; print platform.dist()%5B0%5D%22'
+container(
 )%0A%0A%0A
@@ -81,10 +81,17 @@
 ate_
-vm
+container
 ():%0A
@@ -160,66 +160,8 @@
 %22%22%22%0A
-    distro = _get_distro()%0A    if 'Ubuntu' in distro:%0A    
     
@@ -192,28 +192,24 @@
 version%0A    
-  
-  
 fabric.api.r
@@ -268,20 +268,16 @@
         
-    
 %22update 
@@ -289,28 +289,24 @@
  2%3E&1%22)%0A    
-  
-  
 fabric.api.r
@@ -365,20 +365,16 @@
         
-    
 %22dist-up
@@ -396,20 +396,16 @@
 1%22)%0A    
- 
-   
 # instal
@@ -407,20 +407,16 @@
 nstall:%0A
-    
     fabr
@@ -483,20 +483,16 @@
         
-    
 %22install
@@ -533,20 +533,16 @@
 t-dev %22%0A
-    
         

drop check for host linux version