globus / globus/globus-sdk-python

Python equivalent of `globus gcp create mapped`

Offen
#1,337 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
75
Forks
48
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
9

Beschreibung

`globus gcp create mapped` creates a new collection for use with GCP *but without needing GCP to be already running*. There is seemingly no way to do this in `globus_sdk==4.1.0` that I have found.

If I look at how the CLI does it, it apparently [calls some deprecated API](https://github.com/globus/globus-cli/blob/e7d2804882a8f828385873023609994572d91624/src/globus_cli/commands/gcp/create/mapped.py#L59-L80C40).

***

There is a similar method called `TransferClient.create_shared_endpoint` available, but this seems to require a "host_endpoint", which isn't what I want:

```python
result = globus_sdk.TransferClient(
app=app
).create_shared_endpoint(data=dict(
display_name="XXX",
)
)
```
```json
{
"code": "BadRequest",
"message": "invalid host_endpoint, cannot be empty string, null, or missing",
"request_id": "XXXXXXXX",
"resource": "/shared_endpoint"
}
```

***

If I try to bypass the abstractions and hit the API directly, it still doesn't work for me:
```python
result = globus_sdk.TransferClient(
app=app
).post(
"/v0.10/endpoint",
data=dict(
display_name="XXX",
)
)
```
```json
{
"code": "NotSupported",
"message": "GCSv4 is no longer supported. Contact your sysadmin.",
"request_id": "XXXXXXXX",
"resource": "/endpoint"
}
```

What should I do here?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with the CLI implementation in src/globus_cli/commands/gcp/create/mapped.py and compare it with TransferClient.create_shared_endpoint and the direct /v0.10/endpoint request described here. Determine how the SDK can expose the mapped-collection operation without a host endpoint; done means Python callers can perform the CLI-equivalent operation without the deprecated API path.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.