Esempio n. 1
0
def list_all_modules(input_dict, environment_dict):
    """
  <Purpose>
    Lists all installed modules and their status.

  <Arguments>
    input_dict:  The commanddict representing the user's input.
    environment_dict:  The dictionary representing the current seash 
                       environment.

  <Side Effects>
    A list of all enabled modules and all installed modules will be printed to 
    stdout.

  <Exceptions>
    None

  <Returns>
    None
  """
    print "Enabled Modules:"
    print ", ".join(seash_modules.get_enabled_modules())
    print
    print "Installed Modules:"

    # Now print the URLs...
    # Output format:
    # modulename - URL not available  # URL is set to None
    # modulename - https://seattle.poly.edu/seashplugins/modulename/ # URL is set
    for module in seash_modules.module_data:
        print module, '-',
        if seash_modules.module_data[module]['url'] is None:
            print "Install URL not available"
        else:
            print seash_modules.module_data[module]['url']
    print
Esempio n. 2
0
def list_all_modules(input_dict, environment_dict):
  """
  <Purpose>
    Lists all installed modules and their status.

  <Arguments>
    input_dict:  The commanddict representing the user's input.
    environment_dict:  The dictionary representing the current seash 
                       environment.

  <Side Effects>
    A list of all enabled modules and all installed modules will be printed to 
    stdout.

  <Exceptions>
    None

  <Returns>
    None
  """
  print "Enabled Modules:"
  print ", ".join(seash_modules.get_enabled_modules())
  print
  print "Installed Modules:"

  # Now print the URLs...
  # Output format:
  # modulename - URL not available  # URL is set to None
  # modulename - https://seattle.poly.edu/seashplugins/modulename/ # URL is set
  for module in seash_modules.module_data:
    print module, '-',
    if seash_modules.module_data[module]['url'] is None:
      print "Install URL not available"
    else:
      print seash_modules.module_data[module]['url']
  print
Esempio n. 3
0
the unit tests.  This is essential so that the first few unit tests don't fail 
because the node manager isn't ready yet.

Also disables all modules so that individual module tests can assume a clean
module system before running.
"""

# Needed so that the built-in type function is restored to the python
# abc library
import seash_dictionary

# Disable all modules.
# We pass in an empty dict because we only care that the .disabled file gets
# created
import seash_modules
for module in seash_modules.get_enabled_modules():
    # The modules module must always be enabled.  Otherwise, we have no way of
    # enabling/disabling modules through the command loop.
    if module == 'modules':
        continue
    seash_modules.disable({}, module)

from repyportability import *
add_dy_support(locals())

dy_import_module_symbols('rsa.r2py')
dy_import_module_symbols('advertise.r2py')

for guestnum in xrange(4):
    guestkey = rsa_file_to_publickey('guest' + str(guestnum) + '.publickey')
    while not advertise_lookup(guestkey, graceperiod=1):
the unit tests.  This is essential so that the first few unit tests don't fail 
because the node manager isn't ready yet.

Also disables all modules so that individual module tests can assume a clean
module system before running.
"""

# Needed so that the built-in type function is restored to the python
# abc library
import seash_dictionary

# Disable all modules.
# We pass in an empty dict because we only care that the .disabled file gets 
# created
import seash_modules
for module in seash_modules.get_enabled_modules():
  # The modules module must always be enabled.  Otherwise, we have no way of
  # enabling/disabling modules through the command loop.
  if module == 'modules':
    continue
  seash_modules.disable({}, module)

from repyportability import *
add_dy_support(locals())

dy_import_module_symbols('rsa.repy')
dy_import_module_symbols('advertise.repy')

for guestnum in xrange(4):
  guestkey = rsa_file_to_publickey('guest'+str(guestnum)+'.publickey')
  while not advertise_lookup(guestkey, graceperiod=1):