• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python NGSI_v2.NGSI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tools.NGSI_v2.NGSI的典型用法代码示例。如果您正苦于以下问题:Python NGSI类的具体用法?Python NGSI怎么用?Python NGSI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: verify_that_attribute_types_are_returned_in_response

def verify_that_attribute_types_are_returned_in_response(context, types):
    """
    verify that entity types are returned in response
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying that entities types are returned from a request...")
    ngsi = NGSI()
    ngsi.verify_entity_types(types, context.resp)
    __logger__.info("...Verified that entities types are returned from a request...")
开发者ID:PascaleBorscia,项目名称:fiware-orion,代码行数:9,代码来源:get_steps.py


示例2: verify_error_message

def verify_error_message(context):
    """
    verify error response
    :param context: parameters to evaluate. It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying error message ...")
    ngsi = NGSI()
    ngsi.verify_error_response(context, context.resp)
    __logger__.info("...Verified that error message is the expected")
开发者ID:fiwareulpgcmirror-org,项目名称:context.Orion,代码行数:9,代码来源:general_steps.py


示例3: verify_admin_error

def verify_admin_error(context, error):
    """
    verify admin error message
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    :param error: error message expected
    """
    __logger__.debug("Verifying the admin error message: %s..." % error)
    ngsi = NGSI()
    ngsi.verify_admin_error(context, error)
    __logger__.info("...Verified that the admin error message is the expected")
开发者ID:Fiware,项目名称:context.Orion,代码行数:10,代码来源:general_steps.py


示例4: verify_that_the_attribute_is_deleted_into_mongo

def verify_that_the_attribute_is_deleted_into_mongo(context):
    """
    verify that the attribute is deleted into mongo
    """
    __logger__.debug("Verifying if the atribute is deleted...")
    mongo = Mongo(host=props_mongo["MONGO_HOST"], port=props_mongo["MONGO_PORT"], user=props_mongo["MONGO_USER"],
                  password=props_mongo["MONGO_PASS"])
    ngsi = NGSI()
    ngsi.verify_attribute_is_deleted(mongo, context.cb.get_entity_context(), context.cb.get_headers())
    __logger__.info("...verified that the attribute is deleted")
开发者ID:digitalilusion,项目名称:fiware-orion,代码行数:10,代码来源:delete_steps.py


示例5: verify_get_all_entities

def verify_get_all_entities(context):
    """
    verify get all entities
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying all entities are returned in get request...")
    queries_parameters = context.cb.get_entities_parameters()
    ngsi = NGSI()
    ngsi.verify_get_all_entities(queries_parameters, context.entities_accumulate, context.resp)
    __logger__.info("...Verified all entities are returned in get request...")
开发者ID:digitalilusion,项目名称:fiware-orion,代码行数:10,代码来源:get_steps.py


示例6: verify_that_entities_are_not_sorted_by_attributes

def verify_that_entities_are_not_sorted_by_attributes(context):
    """
    verify that entities are not sorted by attributes
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying that entities are  not sorted by attributes...")
    queries_parameters = context.cb.get_entities_parameters()
    ngsi = NGSI()
    ngsi.verify_that_entities_are_sorted_by_some_attributes(queries_parameters, context.entities_accumulate, context.resp, False)
    __logger__.debug("Verified that entities are not sorted by attributes...")
开发者ID:Fiware,项目名称:context.Orion,代码行数:10,代码来源:get_steps.py


示例7: verify_error_message

def verify_error_message(context):
    """
    verify error response
    :param context: parameters to evaluate
    """
    global cb, resp
    __logger__.debug("Verifying error message ...")
    ngsi = NGSI()
    ngsi.verify_error_response(context, resp)
    __logger__.info("...Verified that error message is the expected")
开发者ID:JJ,项目名称:fiware-orion,代码行数:10,代码来源:requests.py


示例8: verify_that_the_attribute_value_by_id_is_returned

def verify_that_the_attribute_value_by_id_is_returned(context):
    """
    verify that the attribute value by ID is returned
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying an attribute value by ID returned from a request...")
    entities_context = context.cb.get_entity_context()
    ngsi = NGSI()
    ngsi.verify_an_attribute_value_by_id(entities_context, context.resp)
    __logger__.info("...Verified the attribute value by ID returned from a request...")
开发者ID:PascaleBorscia,项目名称:fiware-orion,代码行数:10,代码来源:get_steps.py


示例9: verify_get_all_entities

def verify_get_all_entities(context):
    """
    verify get all entities
    """
    global cb, resp
    __logger__.debug("Verifying all entities are returned in get request...")
    queries_parameters = cb.get_entities_parameters()
    entities_context = cb.get_entity_context()
    ngsi = NGSI()
    ngsi.verify_get_all_entities(queries_parameters, entities_context, resp)
    __logger__.info("...Verified all entities are returned in get request...")
开发者ID:JJ,项目名称:fiware-orion,代码行数:11,代码来源:requests.py


示例10: verify_that_the_attribute_by_ID_is_returned

def verify_that_the_attribute_by_ID_is_returned(context):
    """
    verify that the attribute by ID is returned
    """
    global cb, resp
    __logger__.debug("Verifying an attribute by ID returned from a request...")
    entities_context = cb.get_entity_context()
    attribute_name_to_request = cb.get_attribute_name_to_request()
    ngsi = NGSI()
    ngsi.verify_an_attribute_by_id(entities_context, resp, attribute_name_to_request)
    __logger__.info("...Verified an attribute by ID returned from a request...")
开发者ID:JJ,项目名称:fiware-orion,代码行数:11,代码来源:requests.py


示例11: verify_that_an_entity_is_updated_in_mongo

def verify_that_an_entity_is_updated_in_mongo(context):
    """
    verify that an entity is updated in mongo
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug(" >> verifying that an entity is updating in mongo")
    mongo = Mongo(host=props_mongo["MONGO_HOST"], port=props_mongo["MONGO_PORT"], user=props_mongo["MONGO_USER"],
              password=props_mongo["MONGO_PASS"])
    ngsi = NGSI()
    ngsi.verify_entity_updated_in_mongo(mongo, context.cb.get_entity_context(), context.cb.get_headers())
    __logger__.info(" >> verified that an entity is updated in mongo")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:11,代码来源:create_update_replace_steps.py


示例12: verify_if_the_log_level_is_the_expected

def verify_if_the_log_level_is_the_expected(context, level):
    """
    verify if the log level is the expected

    :param level: log level expected
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying if the log level \"%s\" is the expected in response..." % level)
    ngsi = NGSI()
    ngsi.verify_log_level(context, level)
    __logger__.info("...Verified log level in response")
开发者ID:Fiware,项目名称:context.Orion,代码行数:11,代码来源:general_steps.py


示例13: verify_an_attribute_by_id_in_raw_mode_from_http_response

def verify_an_attribute_by_id_in_raw_mode_from_http_response(context, field_type):
    """
    verify an attribute by ID in raw mode with type in attribute value from http response
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    :param field_type: field type to verify (bool | int | float | list | dict | str | NoneType)
    """
    __logger__.debug("Verifying an attribute by ID returned in raw mode from http response...")
    entities_context = context.cb.get_entity_context()
    attribute_name_to_request = context.cb.get_attribute_name_to_request()
    ngsi = NGSI()
    ngsi.verify_an_attribute_by_id_in_raw_mode_http_response(entities_context, context.resp, attribute_name_to_request, field_type)
    __logger__.info("...Verified an attribute by ID returned in raw mode from http response...")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:12,代码来源:get_steps.py


示例14: verify_that_the_entity_by_id_is_returned

def verify_that_the_entity_by_id_is_returned(context):
    """
    verify that the entity by ID is returned
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying an entity by ID returned from a request...")
    queries_parameters = context.cb.get_entities_parameters()
    entities_context = context.cb.get_entity_context()
    entity_id_to_request = context.cb.get_entity_id_to_request()
    ngsi = NGSI()
    ngsi.verify_an_entity_by_id(queries_parameters, entities_context, context.resp, entity_id_to_request)
    __logger__.info("...Verified an entity by ID returned from a request...")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:12,代码来源:get_steps.py


示例15: verify_http_response_in_raw_mode_witn_type

def verify_http_response_in_raw_mode_witn_type(context, field_type):
    """
    verify http response in raw mode and type in attribute value from http response
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    :param field_type: field type (bool | int | float | list | dict | str | NoneType)
    """
    global cb, resp
    __logger__.debug("Verifying http response in raw mode from http response...")
    entities_context = context.cb.get_entity_context()
    ngsi = NGSI()
    ngsi.verify_entity_raw_mode_http_response(entities_context, context.resp, field_type)
    __logger__.info("...Verified http response in raw mode from http response...")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:12,代码来源:get_steps.py


示例16: verify_that_the_subscription_is_stored_in_mongo

def verify_that_the_subscription_is_stored_in_mongo(context):
    """
    verify that the subscription is stored in mongo
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    props_mongo = properties_class.read_properties()[MONGO_ENV]  # mongo properties dict
    __logger__.debug(" >> verifying that subscription is stored in mongo")
    mongo = Mongo(host=props_mongo["MONGO_HOST"], port=props_mongo["MONGO_PORT"], user=props_mongo["MONGO_USER"],
                  password=props_mongo["MONGO_PASS"])
    ngsi = NGSI()
    ngsi.verify_subscription_stored_in_mongo(mongo, context.cb.get_subscription_context(), context.cb.get_headers(), context.resp)
    __logger__.info(" >> verified that subscription is stored in mongo")
开发者ID:LeonanCarvalho,项目名称:fiware-orion,代码行数:12,代码来源:create_update_steps.py


示例17: verify_headers_in_response

def verify_headers_in_response(context):
    """
    verify headers in response
    Ex:
      | parameter      | value      |
      | x-total-counts | <entities> |
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying headers in response...")
    ngsi = NGSI()
    ngsi.verify_headers_response(context)
    __logger__.info("...Verified headers in response")
开发者ID:PascaleBorscia,项目名称:fiware-orion,代码行数:12,代码来源:general_steps.py


示例18: verify_that_the_entity_by_ID_is_returned

def verify_that_the_entity_by_ID_is_returned(context):
    """
    verify that the entity by ID is returned
    """
    global cb, resp
    __logger__.debug("Verifying an entity by ID returned from a request...")
    queries_parameters = cb.get_entities_parameters()
    entities_context = cb.get_entity_context()
    entity_id_to_request = cb.get_entity_id_to_request()
    ngsi = NGSI()
    ngsi.verify_an_entity_by_id(queries_parameters, entities_context, resp, entity_id_to_request)
    __logger__.info("...Verified an entity by ID returned from a request...")
开发者ID:JJ,项目名称:fiware-orion,代码行数:12,代码来源:requests.py


示例19: verify_headers_in_response

def verify_headers_in_response(context):
    """
    verify headers in response
    Ex:
          | parameter          | value                |
          | Fiware-Total-Count | 5                    |
          | Location           | /v2/subscriptions/.* |
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying headers in response...")
    ngsi = NGSI()
    ngsi.verify_headers_response(context)
    __logger__.info("...Verified headers in response")
开发者ID:Fiware,项目名称:context.Orion,代码行数:13,代码来源:general_steps.py


示例20: entities_are_not_stored_in_mongo

def entities_are_not_stored_in_mongo(context):
    """
    verify that entities are not stored in mongo
    """
    global cb
    properties_class = Properties()
    props_mongo = properties_class.read_properties()["mongo_env"]  # mongo properties dict
    __logger__.debug(" >> verifying entities are not stored in mongo")
    m = Mongo(host=props_mongo["MONGO_HOST"], port=props_mongo["MONGO_PORT"], user=props_mongo["MONGO_USER"],
              password=props_mongo["MONGO_PASS"])
    ngsi = NGSI()
    ngsi.verify_entities_stored_in_mongo(m, cb.get_entity_context(), cb.get_headers(), False)
    __logger__.info(" >> verified entities are not stored in mongo")
开发者ID:JJ,项目名称:fiware-orion,代码行数:13,代码来源:requests.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python ROOT_utils.set_root_defaults函数代码示例发布时间:2022-05-27
下一篇:
Python tools.Tools类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap