data-preservation-programs / spade

A Fil-Network Storage-Proposal Management Service
Other
7 stars 1 forks source link

Tenant Service - Broker<->Tenant Communication API #54

Closed jcace closed 5 months ago

jcace commented 8 months ago

Description:

Depends on https://github.com/data-preservation-programs/spade/issues/60 for the provider_tenant_state_info

Sample payload

[
  {
    tenant_id: 123,
    storage_contract_cid: "bafk1234",
        tenant_settings: {
            "deal_length_days": 180 // TODO: add to /settings API
        },
        tenant_addresses: [
            { "address_robust": "f4x", "address_is_signing": true },
            { "address_robust": "f3x", "address_is_signing": false },
        ],
    candidate_sps: [
      {
        sp_id: 2345,
        provider_tenant_state: "eligible" | "pending" | "active" | "suspended" | "disabled",
          provider_tenant_state_info: "failed retrieval tests", // TODO: add to schema
                attribute_values: {
          "country": "usa", // ints in the API, but strings here for clarity
          "city": "ny"
        },
        provider_metadata: {
          sp_max_bytes_in_flight: 1024000, // min. precision (1 GiB)
        },
      },
    ],
    collections: [
      {
                collection_id: 1,
        piece_source: {
          method: "http", // todo: define a schema per method-module
          uri: "https://cars.com/cids.csv", // different per-method
          authentication: { // different per-method 
            username: "user",
            password: "pass",
          },
        },
        replication_attribute_constraints: {
          "country": 8, // max 8 per country (ints in API, but strings here for clarity)
          "city": 3,
        },
      },
    ],
  },
];

ETA: YYY-MM-DD Maintainer:

### Milestones
- [ ] design data flow
- [ ] Tenant

Known dependencies:

View this starmap at:

jcace commented 7 months ago

Started to document here: https://www.notion.so/ecosystem-wg/Tenant-Services-Broker-Communication-5cc2dcad1cd04ecd893b671cee5ef663?pvs=4