yasithdev opened a new pull request, #167:
URL: https://github.com/apache/airavata-portals/pull/167

   ## Summary
   Migrate `StorageResourceViewSet` reads from the Thrift client to the gRPC 
**storage** facade, continuing the Track D nested read-family repoint. Reuses 
the existing serializer via a recursive protobuf→Thrift-attribute adapter, so 
the portal's REST contract is unchanged.
   
   - `get_instance` and the `all_names` action now call 
`request.airavata.storage.get_storage_resource` / 
`get_all_storage_resource_names`.
   - Write actions stay on Thrift pending D3.
   - New `storage_resource` adapter recursively adapts the nested 
`dataMovementInterfaces` (`DataMovementInterface`) via a shared 
`_data_movement_interface` adapter the **compute-resources family will reuse**.
   - **Name-divergent enum map:** `DataMovementProtocol` needs an *explicit* 
proto-member-name → Thrift-value map rather than the by-name `_thrift_enum` 
helper — the names diverge (proto prefixes the colliding member as 
`DATA_MOVEMENT_PROTOCOL_LOCAL` vs Thrift `LOCAL`) and proto carries a 
`GRID_FTP` member Thrift never had. A new `_thrift_enum_mapped` helper does the 
explicit-map bridge and returns `None` for unmapped/UNKNOWN members (the nested 
fields are nullable). The serializer renders `dataMovementProtocol` as a raw 
integer, so the map emits the Thrift integer the frontend expects.
   - Top-level creation/update times keep their int 
(`UTCPosixTimestampDateTimeField` is not nullable); nested timestamps map the 
proto-zero sentinel to `None`.
   
   ## Test plan
   - `manage.py check` clean.
   - `all_names` and `get_instance` round-trip the **real dev storage 
resource** live (200, ISO timestamps, correct fields).
   - Offline serializer render exercises the full `DataMovementProtocol` map 
(LOCAL/SCP/SFTP/UNICORE bridged to the right Thrift ints, GRID_FTP → `None`) 
and nested timestamp null handling.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to