Skip to content

Commit

Permalink
generalize calling rockon installers. rockstor#697
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Jul 4, 2015
1 parent df7bd5a commit feea8b3
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/rockstor/storageadmin/views/rockon_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,7 @@ def install(rid):
try:
rockon = RockOn.objects.get(id=rid)
pull_images(rockon)
if (rockon.name == 'Plex'):
plex_install(rockon)
elif (rockon.name == 'OpenVPN'):
ovpn_install(rockon)
elif (rockon.name == 'Transmission'):
transmission_install(rockon)
elif (rockon.name == 'BTSync'):
btsync_install(rockon)
elif (rockon.name == 'Syncthing'):
syncthing_install(rockon)
elif (rockon.name == 'OwnCloud'):
owncloud_install(rockon)
globals()['%s_install' % rockon.name.lower()](rockon)
except Exception, e:
logger.debug('exception while installing the rockon')
logger.exception(e)
Expand Down Expand Up @@ -225,7 +214,7 @@ def vol_ops(container):
ops_list.extend(['-v', '%s:%s' % (share_mnt, v.dest_dir)])
return ops_list

def ovpn_install(rockon):
def openvpn_install(rockon):
#volume container
vol_co = DContainer.objects.get(rockon=rockon, launch_order=1)
volc_cmd = [DOCKER, 'run', '--name', vol_co.name,]
Expand Down

0 comments on commit feea8b3

Please sign in to comment.