commotionc.CommotionCore Class Reference

Public Member Functions

def __init__
 
def log
 
def getInterface
 
def readProfile
 
def readProfiles
 
def updateProfile
 
def startOlsrd
 
def stopOlsrd
 
def fallbackConnect
 

Public Attributes

 olsrdconf
 
 profiledir
 
 logname
 

Member Function Documentation

def commotionc.CommotionCore.readProfiles (   self)
get all the available mesh profiles and return as a dict

References commotion_client.GUI.system_tray.TrayIcon.log, commotion_client.utils.thread.GenericThread.log, commotion_client.utils.single_application.SingleApplication.log, commotion_client.GUI.welcome_page.ViewPort.log, commotion_client.GUI.menu_bar.MenuBar.log, commotion_client.GUI.crash_report.CrashReport.log, commotionc.CommotionCore.log(), commotion_client.extensions.config_editor.main.ViewPort.log, commotion_client.GUI.main_window.MainWindow.log, commotion_client.GUI.toolbar_builder.ToolBar.log, commotion_client.utils.validate.ClientConfig.log, commotion_client.GUI.toolbar.ToolBar.log, commotion_client.GUI.extension_toolbar.ExtensionToolBar.log, commotion_client.utils.extension_manager.ExtensionManager.log, commotion_client.commotion_client.HoldStateDuringRestart.log, commotion_client.GUI.extension_toolbar.MenuItem.log, commotion_client.GUI.crash_report.ReportGatherer.log, commotion_client.commotion_client.CommotionClientApplication.log, commotion_client.utils.validate.Networking.log, commotion_client.utils.extension_manager.ConfigManager.log, commotionc.CommotionCore.profiledir, and commotionc.CommotionCore.readProfile().

98 
99  def readProfiles(self):
100  '''get all the available mesh profiles and return as a dict'''
101  profiles = dict()
102  self.log('Reading profiles:')
103  for f in glob.glob(self.profiledir + '*.profile'):
104  profname = os.path.split(re.sub('\.profile$', '', f))[1]
105  self.log('reading profile: "' + f + '"')
106  profile = self.readProfile(profname)
107  self.log('adding "' + f + '" as profile "' + profile['ssid'] + '"')
108  profiles[profile['ssid']] = profile
109  return profiles
110 
def readProfiles
Definition: commotionc.py:98
def readProfile
Definition: commotionc.py:67
profiledir
Definition: commotionc.py:23
def log
Definition: commotionc.py:38
def commotionc.CommotionCore.startOlsrd (   self,
  interface,
  conf 
)
start the olsrd daemon

References commotion_client.GUI.system_tray.TrayIcon.log, commotion_client.utils.thread.GenericThread.log, commotion_client.utils.single_application.SingleApplication.log, commotion_client.GUI.welcome_page.ViewPort.log, commotion_client.GUI.menu_bar.MenuBar.log, commotion_client.GUI.crash_report.CrashReport.log, commotionc.CommotionCore.log(), commotion_client.extensions.config_editor.main.ViewPort.log, commotion_client.GUI.main_window.MainWindow.log, commotion_client.GUI.toolbar_builder.ToolBar.log, commotion_client.GUI.extension_toolbar.ExtensionToolBar.log, commotion_client.GUI.toolbar.ToolBar.log, commotion_client.utils.validate.ClientConfig.log, commotion_client.utils.extension_manager.ExtensionManager.log, commotion_client.commotion_client.HoldStateDuringRestart.log, commotion_client.GUI.extension_toolbar.MenuItem.log, commotion_client.GUI.crash_report.ReportGatherer.log, commotion_client.commotion_client.CommotionClientApplication.log, commotion_client.utils.validate.Networking.log, and commotion_client.utils.extension_manager.ConfigManager.log.

Referenced by commotionc.CommotionCore.stopOlsrd().

133  def startOlsrd(self, interface, conf):
134  '''start the olsrd daemon'''
135  self.log('start olsrd: ')
136  cmd = ['/usr/sbin/olsrd', '-i', interface, '-f', conf]
137  self.log(" ".join([x for x in cmd]))
138  p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE,
139  stderr=subprocess.PIPE)
140  out, err = p.communicate()
141  if out:
142  self.log('stdout: ' + out)
143  if err:
144  self.log('stderr: ' + err)
145 
def startOlsrd
Definition: commotionc.py:132
def log
Definition: commotionc.py:38
def commotionc.CommotionCore.stopOlsrd (   self)
stop the olsrd daemon

References commotionc.CommotionCore._create_wpasupplicant_conf(), commotionc.CommotionCore.getInterface(), commotion_client.GUI.system_tray.TrayIcon.log, commotion_client.utils.thread.GenericThread.log, commotion_client.utils.single_application.SingleApplication.log, commotion_client.GUI.welcome_page.ViewPort.log, commotion_client.GUI.menu_bar.MenuBar.log, commotionc.CommotionCore.log(), commotion_client.GUI.crash_report.CrashReport.log, commotion_client.extensions.config_editor.main.ViewPort.log, commotion_client.GUI.main_window.MainWindow.log, commotion_client.GUI.toolbar_builder.ToolBar.log, commotion_client.GUI.toolbar.ToolBar.log, commotion_client.utils.validate.ClientConfig.log, commotion_client.GUI.extension_toolbar.ExtensionToolBar.log, commotion_client.utils.extension_manager.ExtensionManager.log, commotion_client.commotion_client.HoldStateDuringRestart.log, commotion_client.GUI.extension_toolbar.MenuItem.log, commotion_client.GUI.crash_report.ReportGatherer.log, commotion_client.commotion_client.CommotionClientApplication.log, commotion_client.utils.validate.Networking.log, commotion_client.utils.extension_manager.ConfigManager.log, commotionc.CommotionCore.readProfile(), and commotionc.CommotionCore.startOlsrd().

147  def stopOlsrd(self):
148  '''stop the olsrd daemon'''
149  self.log('stop olsrd')
150  cmd = ['/usr/bin/killall', '-v', 'olsrd']
151  self.log(" ".join([x for x in cmd]))
152  p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE,
153  stderr=subprocess.PIPE)
154  out, err = p.communicate()
155  if out:
156  self.log('stdout: ' + out)
157  if err:
158  self.log('stderr: ' + err)
159 
def stopOlsrd
Definition: commotionc.py:146
def log
Definition: commotionc.py:38

The documentation for this class was generated from the following file: