当前位置: 首页>>代码示例>>Python>>正文


Python Application.get方法代码示例

本文整理汇总了Python中application.Application.get方法的典型用法代码示例。如果您正苦于以下问题:Python Application.get方法的具体用法?Python Application.get怎么用?Python Application.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在application.Application的用法示例。


在下文中一共展示了Application.get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
    def __init__(my, app_node_name):
        my.app_node_name = app_node_name

        my.data = {}

        from application import Application
        my.app = Application.get()

        my.init()
开发者ID:0-T-0,项目名称:TACTIC,代码行数:11,代码来源:node_data.py

示例2: __init__

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
    def __init__(self, app_node_name):
        self.app_node_name = app_node_name

        self.data = {}

        from application import Application
        self.app = Application.get()

        self.init()
开发者ID:Southpaw-TACTIC,项目名称:TACTIC,代码行数:11,代码来源:node_data.py

示例3: __init__

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
    def __init__(my):
        my.xml = None
        my.doc = None
        my.root = None

        from tactic_client_lib import TacticServerStub
        my.server = TacticServerStub.get()

        # TODO: pull this out of here!!!
        my.util = TacticNodeUtil()
        my.app = Application.get()
开发者ID:2gDigitalPost,项目名称:tactic_src,代码行数:13,代码来源:session.py

示例4: __init__

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
    def __init__(self):
        self.xml = None
        self.doc = None
        self.root = None

        from tactic_client_lib import TacticServerStub
        self.server = TacticServerStub.get()

        # TODO: pull this out of here!!!
        self.util = TacticNodeUtil()
        self.app = Application.get()
开发者ID:Southpaw-TACTIC,项目名称:TACTIC,代码行数:13,代码来源:session.py

示例5: MidonetApi

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
class MidonetApi(object):

    def __init__(self, base_uri, username, password, project_id=None):
        self.base_uri = base_uri
        self.project_id = project_id
        self.app = None
        self.auth = auth_lib.Auth(base_uri + '/login', username, password,
                                  project_id)

    def get_routers(self, query):
        self._ensure_application()
        return self.app.get_routers(query)

    def get_bridges(self, query):
        self._ensure_application()
        return self.app.get_bridges(query)

    def get_port_groups(self, query):
        self._ensure_application()
        return self.app.get_port_groups(query)

    def get_chains(self, query):
        self._ensure_application()
        return self.app.get_chains(query)

    def get_chain(self, id_):
        self._ensure_application()
        return self.app.get_chain(id_)

    def get_tunnel_zones(self, query=None):
        self._ensure_application()
        return self.app.get_tunnel_zones(query)

    def get_hosts(self, query=None):
        self._ensure_application()
        return self.app.get_hosts(query)

    def get_host(self, id_):
        self._ensure_application()
        return self.app.get_host(id_)

    def get_ad_route(self, id_):
        self._ensure_application()
        return self.app.get_ad_route(id_)

    def get_bgp(self, id_):
        self._ensure_application()
        return self.app.get_bgp(id_)

    def get_bridge(self, id_):
        self._ensure_application()
        return self.app.get_bridge(id_)

    def get_port_group(self, id_):
        self._ensure_application()
        return self.app.get_port_group(id_)

    def get_port(self, id_):
        self._ensure_application()
        return self.app.get_port(id_)

    def get_route(self, id_):
        self._ensure_application()
        return self.app.get_route(id_)

    def get_router(self, id_):
        self._ensure_application()
        return self.app.get_router(id_)

    def get_rule(self, id_):
        self._ensure_application()
        return self.app.get_rule(id_)

    def add_router(self):
        self._ensure_application()
        return self.app.add_router()

    def add_bridge(self):
        self._ensure_application()
        return self.app.add_bridge()

    def add_port_group(self):
        self._ensure_application()
        return self.app.add_port_group()

    def add_chain(self):
        self._ensure_application()
        return self.app.add_chain()

    def add_gre_tunnel_zone(self):
        self._ensure_application()
        return self.app.add_gre_tunnel_zone()

    def add_capwap_tunnel_zone(self):
        self._ensure_application()
        return self.app.add_capwap_tunnel_zone()

    def _ensure_application(self):
        if (self.app == None):
            self.app = Application(None, {'uri': self.base_uri}, self.auth)
#.........这里部分代码省略.........
开发者ID:ryu25ish,项目名称:python-midonetclient,代码行数:103,代码来源:api.py

示例6: __init__

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
 def __init__(self):
     # TODO: pull this out of here!!!
     self.util = TacticNodeUtil()
     self.app = Application.get()
开发者ID:Southpaw-TACTIC,项目名称:TACTIC,代码行数:6,代码来源:introspect.py

示例7: __init__

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
 def __init__(my):
     # TODO: pull this out of here!!!
     my.util = TacticNodeUtil()
     my.app = Application.get()
开发者ID:0-T-0,项目名称:TACTIC,代码行数:6,代码来源:introspect.py

示例8: app_inspect

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
def app_inspect(name, namespace):
    app = Application(name, namespace=namespace)
    services = app.get()
    util.print_app_output(services)
开发者ID:jianghaishanyue,项目名称:alauda-CLI,代码行数:6,代码来源:commands.py

示例9: MidonetApi

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import get [as 别名]
class MidonetApi(object):

    def __init__(self, midonet_uri='http://localhost:8080/midonet-api/',
                 web_resource=None, logger=None):

        self.midonet_uri = midonet_uri
        self.web_resource = web_resource
        self.app = None

    def get_routers(self, query):
        self._ensure_application()
        return self.app.get_routers(query)

    def get_bridges(self, query):
        self._ensure_application()
        return self.app.get_bridges(query)

    def get_port_groups(self, query):
        self._ensure_application()
        return self.app.get_port_groups(query)

    def get_chains(self, query):
        self._ensure_application()
        return self.app.get_chains(query)

    def get_chain(self, tenant_id, id_):
        self._ensure_application()
        return self.app.get_chain(tenant_id, id_)

    def get_tunnel_zones(self, query={}):
        self._ensure_application()
        return self.app.get_tunnel_zones(query)

    def get_hosts(self, query={}):
        self._ensure_application()
        return self.app.get_hosts(query)

    def get_host(self, id_):
        self._ensure_application()
        return self.app.get_host(id_)

    def get_ad_route(self, id_):
        self._ensure_application()
        return self.app.get_ad_route(id_)

    def get_bgp(self, id_):
        self._ensure_application()
        return self.app.get_bgp(id_)

    def get_bridge(self, id_):
        self._ensure_application()
        return self.app.get_bridge(id_)

    def get_chain(self, id_):
        self._ensure_application()
        return self.app.get_chain(id_)

    def get_host(self, id_):
        self._ensure_application()
        return self.app.get_host(id_)

    def get_port_group(self, id_):
        self._ensure_application()
        return self.app.get_port_group(id_)

    def get_port(self, id_):
        self._ensure_application()
        return self.app.get_port(id_)

    def get_route(self, id_):
        self._ensure_application()
        return self.app.get_route(id_)

    def get_router(self, id_):
        self._ensure_application()
        return self.app.get_router(id_)

    def get_rule(self, id_):
        self._ensure_application()
        return self.app.get_rule(id_)

    def add_router(self):
        self._ensure_application()
        return self.app.add_router()

    def add_bridge(self):
        self._ensure_application()
        return self.app.add_bridge()

    def add_port_group(self):
        self._ensure_application()
        return self.app.add_port_group()

    def add_chain(self):
        self._ensure_application()
        return self.app.add_chain()

    def add_gre_tunnel_zone(self):
        self._ensure_application()
        return self.app.add_gre_tunnel_zone()
#.........这里部分代码省略.........
开发者ID:adjohn,项目名称:python-midonetclient,代码行数:103,代码来源:api.py


注:本文中的application.Application.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。