本文整理汇总了Python中interface.services.sa.iobservatory_management_service.ObservatoryManagementServiceClient.get_platform_component_site_extension方法的典型用法代码示例。如果您正苦于以下问题:Python ObservatoryManagementServiceClient.get_platform_component_site_extension方法的具体用法?Python ObservatoryManagementServiceClient.get_platform_component_site_extension怎么用?Python ObservatoryManagementServiceClient.get_platform_component_site_extension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类interface.services.sa.iobservatory_management_service.ObservatoryManagementServiceClient
的用法示例。
在下文中一共展示了ObservatoryManagementServiceClient.get_platform_component_site_extension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestObservatoryManagementServiceIntegration
# 需要导入模块: from interface.services.sa.iobservatory_management_service import ObservatoryManagementServiceClient [as 别名]
# 或者: from interface.services.sa.iobservatory_management_service.ObservatoryManagementServiceClient import get_platform_component_site_extension [as 别名]
#.........这里部分代码省略.........
pas_id = self.RR2.create(any_old(RT.PlatformSite, dict(alt_resource_type="PlatformAssemblySite")))
pcs_id = self.RR2.create(any_old(RT.PlatformSite, dict(alt_resource_type="PlatformComponentSite")))
ins_id = self.RR2.create(any_old(RT.InstrumentSite))
obs_obj = self.RR2.read(obs_id)
pss_obj = self.RR2.read(pss_id)
pas_obj = self.RR2.read(pas_id)
pcs_obj = self.RR2.read(pcs_id)
ins_obj = self.RR2.read(ins_id)
self.RR2.create_association(obs_id, PRED.hasSite, pss_id)
self.RR2.create_association(pss_id, PRED.hasSite, pas_id)
self.RR2.create_association(pas_id, PRED.hasSite, pcs_id)
self.RR2.create_association(pcs_id, PRED.hasSite, ins_id)
extended_obs = self.OMS.get_observatory_site_extension(obs_id, user_id=12345)
self.assertEqual([pss_obj], extended_obs.computed.platform_station_sites.value)
self.assertEqual(ComputedValueAvailability.PROVIDED, extended_obs.computed.platform_station_sites.status)
self.assertEqual([pas_obj], extended_obs.computed.platform_assembly_sites.value)
self.assertEqual(ComputedValueAvailability.PROVIDED, extended_obs.computed.platform_assembly_sites.status)
self.assertEqual([pcs_obj], extended_obs.computed.platform_component_sites.value)
self.assertEqual(ComputedValueAvailability.PROVIDED, extended_obs.computed.platform_component_sites.status)
self.assertEqual([ins_obj], extended_obs.computed.instrument_sites.value)
extended_pss = self.OMS.get_observatory_site_extension(obs_id, user_id=12345)
self.assertEqual([pas_obj], extended_pss.computed.platform_assembly_sites.value)
self.assertEqual([pcs_obj], extended_pss.computed.platform_component_sites.value)
self.assertEqual([ins_obj], extended_pss.computed.instrument_sites.value)
extended_pas = self.OMS.get_observatory_site_extension(pas_id, user_id=12345)
self.assertEqual([pcs_obj], extended_pas.computed.platform_component_sites.value)
self.assertEqual([ins_obj], extended_pas.computed.instrument_sites.value)
extended_pcs = self.OMS.get_platform_component_site_extension(pcs_id, user_id=12345)
self.assertEqual([ins_obj], extended_pcs.computed.instrument_sites.value)
#@unittest.skip("in development...")
@attr('EXT')
@attr('EXT1')
def test_observatory_org_extended(self):
stuff = self._make_associations()
parsed_pdict_id = self.dataset_management.read_parameter_dictionary_by_name('ctd_parsed_param_dict',
id_only=True)
parsed_stream_def_id = self.pubsubcli.create_stream_definition(name='parsed',
parameter_dictionary_id=parsed_pdict_id)
tdom, sdom = time_series_domain()
sdom = sdom.dump()
tdom = tdom.dump()
dp_obj = IonObject(RT.DataProduct,
name='the parsed data',
description='ctd stream test',
temporal_domain = tdom,
spatial_domain = sdom)
data_product_id1 = self.dpclient.create_data_product(data_product=dp_obj,
stream_definition_id=parsed_stream_def_id)
self.damsclient.assign_data_product(input_resource_id=stuff.instrument_device_id,
data_product_id=data_product_id1)
#Create a user to be used as regular member