Skip to content

Commit

Permalink
connect the stream def to the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
MauriceManning committed Oct 4, 2012
1 parent b2b890e commit 9d3123c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ion/processes/bootstrap/ion_loader.py
Expand Up @@ -743,7 +743,7 @@ def _load_DataProduct(self, row):
res_obj.temporal_domain = tdom.dump()

svc_client = self._get_service_client("data_product_management")
res_id = svc_client.create_data_product(data_product=res_obj, stream_definition_id='', parameter_dictionary = parameter_dictionary)
res_id = svc_client.create_data_product(data_product=res_obj, stream_definition_id=self.resource_ids[strdef], parameter_dictionary = parameter_dictionary)
self._register_id(row[self.COL_ID], res_id)
if not DEBUG:
svc_client.activate_data_product_persistence(res_id)
Expand Down
3 changes: 3 additions & 0 deletions ion/services/sa/instrument/instrument_management_service.py
Expand Up @@ -300,7 +300,10 @@ def validate_instrument_agent_instance(self, instrument_agent_instance_obj):
PRED.hasStreamDefinition,
RT.StreamDefinition,
True)
if not stream_def_ids:
raise NotFound("No Stream Definition attached to the stream for this Data Product. Stream id: %s " + str(stream_def_ids))
stream_def_obj = self.clients.pubsub_management.read_stream_definition(stream_def_ids[0])

log.debug("start_instrument_agent_instance: stream_def_ids: %s ", str(stream_def_obj) )
stream_tag = stream_def_obj.name
model_param_dict = get_param_dict(streams_dict[stream_tag])
Expand Down

0 comments on commit 9d3123c

Please sign in to comment.