Skip to content

Commit

Permalink
Merge "Bug #1366210 Installs storage webui pkgs in all nodes defined …
Browse files Browse the repository at this point in the history
…in webui role"
  • Loading branch information
Zuul authored and Gerrit Code Review committed Sep 23, 2014
2 parents 2e09edd + 36109e3 commit cac9d75
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion fabfile/tasks/storage/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,35 @@ def install_storage_master_node(*args):
"""Installs storage pkgs in one or list of nodes. USAGE:fab install_openstack_storage_node:user@1.1.1.1,user@2.2.2.2"""
for host_string in args:
with settings(host_string=host_string):
pkg = ['contrail-storage','contrail-web-storage']
pkg = ['contrail-storage']
if detect_ostype() == 'Ubuntu':
apt_install(pkg)
else:
yum_install(pkg)

@task
@EXECUTE_TASK
@roles('webui')
def install_storage_webui():
"""Installs storage webui pkgs in all nodes defined in webui role."""
if env.roledefs['webui']:
execute("install_storage_webui_node", env.host_string)


@task
def install_storage_webui_node(*args):
"""Installs storage pkgs in one or list of nodes. USAGE:fab install_storage_webui:user@1.1.1.1,user@2.2.2.2"""
for host_string in args:
with settings(host_string=host_string):
pkg = ['contrail-web-storage']
if detect_ostype() == 'Ubuntu':
apt_install(pkg)
else:
yum_install(pkg)




@task
@EXECUTE_TASK
@roles('storage-compute')
Expand Down Expand Up @@ -91,3 +114,4 @@ def install_storage():
execute(create_storage_repo)
execute(install_storage_master)
execute(install_storage_compute)
execute(install_storage_webui)

0 comments on commit cac9d75

Please sign in to comment.