當前位置: 首頁>>代碼示例>>Python>>正文


Python service.RedisAppStatus類代碼示例

本文整理匯總了Python中trove.guestagent.datastore.redis.service.RedisAppStatus的典型用法代碼示例。如果您正苦於以下問題:Python RedisAppStatus類的具體用法?Python RedisAppStatus怎麽用?Python RedisAppStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了RedisAppStatus類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: prepare

 def prepare(self, context, packages, databases, memory_mb, users,
             device_path=None, mount_point=None, backup_info=None,
             config_contents=None, root_password=None, overrides=None):
     """
     This is called when the trove instance first comes online.
     It is the first rpc message passed from the task manager.
     prepare handles all the base configuration of the redis instance.
     """
     try:
         app = RedisApp(RedisAppStatus.get())
         RedisAppStatus.get().begin_install()
         if device_path:
             device = volume.VolumeDevice(device_path)
             # unmount if device is already mounted
             device.unmount_device(device_path)
             device.format()
             device.mount(mount_point)
             operating_system.update_owner('redis', 'redis', mount_point)
             LOG.debug('Mounted the volume.')
         app.install_if_needed(packages)
         LOG.info(_('Securing redis now.'))
         app.write_config(config_contents)
         app.restart()
         LOG.info(_('"prepare" redis call has finished.'))
     except Exception as e:
         LOG.error(e)
         app.status.set_status(rd_instance.ServiceStatuses.FAILED)
         raise RuntimeError("prepare call has failed.")
開發者ID:bodenr,項目名稱:trove,代碼行數:28,代碼來源:manager.py

示例2: update_status

 def update_status(self, context):
     """
     Updates the redis trove instance. It is decorated with
     perodic task so it is automatically called every 3 ticks.
     """
     LOG.debug("Update status called.")
     RedisAppStatus.get().update()
開發者ID:AlexeyDeyneko,項目名稱:trove,代碼行數:7,代碼來源:manager.py

示例3: prepare

 def prepare(
     self,
     context,
     packages,
     databases,
     memory_mb,
     users,
     device_path=None,
     mount_point=None,
     backup_info=None,
     config_contents=None,
     root_password=None,
 ):
     """
     This is called when the trove instance first comes online.
     It is the first rpc message passed from the task manager.
     prepare handles all the base configuration of the redis instance.
     """
     app = RedisApp(RedisAppStatus.get())
     RedisAppStatus.get().begin_install()
     if device_path:
         device = volume.VolumeDevice(device_path)
         device.format()
         device.mount(system.REDIS_BASE_DIR)
         LOG.debug(_("Mounted the volume."))
     app.install_if_needed(packages)
     LOG.info(_("Securing redis now."))
     app.write_config(config_contents)
     app.complete_install_or_restart()
     LOG.info(_('"prepare" redis call has finished.'))
開發者ID:NeCTAR-RC,項目名稱:trove,代碼行數:30,代碼來源:manager.py

示例4: reset_configuration

 def reset_configuration(self, context, configuration):
     """
     Resets to the default configuration,
     currently this does nothing.
     """
     app = RedisApp(RedisAppStatus.get())
     app.reset_configuration(configuration)
開發者ID:bodenr,項目名稱:trove,代碼行數:7,代碼來源:manager.py

示例5: start_db_with_conf_changes

 def start_db_with_conf_changes(self, context, config_contents):
     """
     Start this redis instance with new conf changes.
     """
     LOG.debug("Start DB with conf changes called.")
     app = RedisApp(RedisAppStatus.get())
     app.start_db_with_conf_changes(config_contents)
開發者ID:AlexeyDeyneko,項目名稱:trove,代碼行數:7,代碼來源:manager.py

示例6: stop_db

 def stop_db(self, context, do_not_start_on_reboot=False):
     """
     Stop this redis instance.
     This method is called when the guest agent
     gets a stop message from the taskmanager.
     """
     app = RedisApp(RedisAppStatus.get())
     app.stop_db(do_not_start_on_reboot=do_not_start_on_reboot)
開發者ID:bodenr,項目名稱:trove,代碼行數:8,代碼來源:manager.py

示例7: restart

 def restart(self, context):
     """
     Restart this redis instance.
     This method is called when the guest agent
     gets a restart message from the taskmanager.
     """
     app = RedisApp(RedisAppStatus.get())
     app.restart()
開發者ID:bodenr,項目名稱:trove,代碼行數:8,代碼來源:manager.py

示例8: start_db_with_conf_changes

 def start_db_with_conf_changes(self, context, config_contents):
     """
     Start this redis instance with new conf changes.
     """
     app = RedisApp(RedisAppStatus.get())
     app.start_db_with_conf_changes(config_contents)
開發者ID:bodenr,項目名稱:trove,代碼行數:6,代碼來源:manager.py


注:本文中的trove.guestagent.datastore.redis.service.RedisAppStatus類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。