zowe / zss

Zowe System Services Server for enabling low-level microservices
Eclipse Public License 2.0
13 stars 45 forks source link

space info metadata #582

Closed 1000TurquoisePogs closed 1 year ago

1000TurquoisePogs commented 1 year ago

Proposed changes

Updates the /datasetMetadata api for space, prime, and secnd fields for telling size information about each dataset.

Getting the space for "prime" correct has been challenging. DSCB extent info on how many tracks/cylinders are occupied can be way different from what something like ispf reports, depending on several factors such as unit type. So, this api currently sometimes uses the cyl/track info found, and sometimes instead relies upon a combination of other size-related fields found in the DSCB. This compromise passes most of my testing, with remaining areas of improvement when size type=block or blocksize is small.

Type of change

Please delete options that are not relevant.

PR Checklist

Please delete options that are not relevant.

Testing

You can test this in the zowe editor, point it at any datasets you want. I left some warnings in the code in case datasets i didn't find in my own environment were discovered, so that logic can be tuned to accomodate them.

Bug: datasets that are block-sized dont have proper reporting of primary/secondary unit, not sure how the math works here yet.