本文整理汇总了Python中enarksh.DataLayer.DataLayer.enk_reader_host_load_host方法的典型用法代码示例。如果您正苦于以下问题:Python DataLayer.enk_reader_host_load_host方法的具体用法?Python DataLayer.enk_reader_host_load_host怎么用?Python DataLayer.enk_reader_host_load_host使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类enarksh.DataLayer.DataLayer
的用法示例。
在下文中一共展示了DataLayer.enk_reader_host_load_host方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _store_self
# 需要导入模块: from enarksh.DataLayer import DataLayer [as 别名]
# 或者: from enarksh.DataLayer.DataLayer import enk_reader_host_load_host [as 别名]
def _store_self(self, uri_id):
"""
Stores the definition of this host into the database.
:param int uri_id: The ID of the URI of this node.
"""
details = DataLayer.enk_reader_host_load_host(self._hostname)
self._hst_id = details['hst_id']
示例2: load_db
# 需要导入模块: from enarksh.DataLayer import DataLayer [as 别名]
# 或者: from enarksh.DataLayer.DataLayer import enk_reader_host_load_host [as 别名]
def load_db(self, hostname):
"""
Loads the definition of this host from the database.
:param str hostname: The name of the host that must be loaded.
"""
self._hostname = hostname
host = DataLayer.enk_reader_host_load_host(hostname)
self._hst_id = host['hst_id']
resources_data = DataLayer.enk_back_get_host_resources()
for resource_data in resources_data:
resource = create_resource(resource_data['rtp_id'], resource_data['rsc_id'], None)
self._resources[resource.name] = resource