Skip to content

Commit 5d8e422

Browse files
feat: feat(api): map ipsec_tunnels/psk, sites/app_policies and cf1_sites for magic-on-ramps
* fix(api): remove unnecessary skip_test_reason from ipsec_tunnels psk_set psk_set was carrying a copied "TODO: investigate broken test" skip, but it is a new endpoint whose generated test has never run. Its closest analogue psk_generate (also POST) is unskipped and passes, and psk_set does not share the modified_ipsec_tunnel response wrapper that breaks the update/bulk_update tests. Removing the skip so the test runs; if it genuinely fails downstream it can be re-added with a concrete reason. * fix(api): remove app_policies mapping from magic-on-ramps app_policies has no implementation in conduit-api and none is planned, so mapping GET /accounts/{account_id}/magic/sites/{site_id}/app_policies would document a route that does not exist. Removing the skipped entry; psk_set and cf1_sites are unaffected. * fix(api): add models, terraform, skip guards for magic-on-ramps resources - Add skip_test_reason to psk_set (aligns with sibling update/bulk_update) - Add skip guard to app_policies (aligns with sibling app_configuration) - Add terraform.name and models block to cf1_sites - Add models block to cf1_sites.ramps sub-resource * feat(api): map cf1_sites and ramps for magic-on-ramps Add cf1_sites resource with CRUD methods and ramps sub-resource to magic_transit in Stainless config for SDK generation. Ref: APIX-667, APIX-795 * feat(api): map ipsec_tunnels/psk and sites/app_policies for magic-on-ramps Add Stainless config mappings for two undocumented routes from APIX-667: - ipsec_tunnels.psk_set: POST /accounts/{account_id}/magic/ipsec_tunnels/psk - sites.app_policies.list: GET /accounts/{account_id}/magic/sites/{site_id}/app_policies
1 parent 0ff89f9 commit 5d8e422

25 files changed

Lines changed: 2920 additions & 4 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 2388
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-bc7ee140b4763ca4b45594b9db8d569431c061fb81c261ddb5a3a247973dd741.yml
1+
configured_endpoints: 2398
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-2b344db846f73d18cb70c546df5b9ba346937191f97a00052bf626946391c7e2.yml
33
openapi_spec_hash: 30882bab9ab718768db2497c4638fe7d
4-
config_hash: f81f9e27d86c53b33ee1f1f3654ef3c6
4+
config_hash: 2f529580a17438fc62cd0b47db41b6f1

src/cloudflare/resources/magic_transit/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
RoutesResourceWithStreamingResponse,
3333
AsyncRoutesResourceWithStreamingResponse,
3434
)
35+
from .cf1_sites import (
36+
Cf1SitesResource,
37+
AsyncCf1SitesResource,
38+
Cf1SitesResourceWithRawResponse,
39+
AsyncCf1SitesResourceWithRawResponse,
40+
Cf1SitesResourceWithStreamingResponse,
41+
AsyncCf1SitesResourceWithStreamingResponse,
42+
)
3543
from .connectors import (
3644
ConnectorsResource,
3745
AsyncConnectorsResource,
@@ -116,6 +124,12 @@
116124
"AsyncConnectorsResourceWithRawResponse",
117125
"ConnectorsResourceWithStreamingResponse",
118126
"AsyncConnectorsResourceWithStreamingResponse",
127+
"Cf1SitesResource",
128+
"AsyncCf1SitesResource",
129+
"Cf1SitesResourceWithRawResponse",
130+
"AsyncCf1SitesResourceWithRawResponse",
131+
"Cf1SitesResourceWithStreamingResponse",
132+
"AsyncCf1SitesResourceWithStreamingResponse",
119133
"PCAPsResource",
120134
"AsyncPCAPsResource",
121135
"PCAPsResourceWithRawResponse",

src/cloudflare/resources/magic_transit/api.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ from cloudflare.types.magic_transit import (
8686
IPSECTunnelBulkUpdateResponse,
8787
IPSECTunnelGetResponse,
8888
IPSECTunnelPSKGenerateResponse,
89+
IPSECTunnelPSKSetResponse,
8990
)
9091
```
9192

@@ -98,6 +99,7 @@ Methods:
9899
- <code title="put /accounts/{account_id}/magic/ipsec_tunnels">client.magic_transit.ipsec_tunnels.<a href="./src/cloudflare/resources/magic_transit/ipsec_tunnels.py">bulk_update</a>(\*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/ipsec_tunnel_bulk_update_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/ipsec_tunnel_bulk_update_response.py">IPSECTunnelBulkUpdateResponse</a></code>
99100
- <code title="get /accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}">client.magic_transit.ipsec_tunnels.<a href="./src/cloudflare/resources/magic_transit/ipsec_tunnels.py">get</a>(ipsec_tunnel_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py">IPSECTunnelGetResponse</a></code>
100101
- <code title="post /accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}/psk_generate">client.magic_transit.ipsec_tunnels.<a href="./src/cloudflare/resources/magic_transit/ipsec_tunnels.py">psk_generate</a>(ipsec_tunnel_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py">IPSECTunnelPSKGenerateResponse</a></code>
102+
- <code title="post /accounts/{account_id}/magic/ipsec_tunnels/psk">client.magic_transit.ipsec_tunnels.<a href="./src/cloudflare/resources/magic_transit/ipsec_tunnels.py">psk_set</a>(\*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/ipsec_tunnel_psk_set_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/ipsec_tunnel_psk_set_response.py">IPSECTunnelPSKSetResponse</a></code>
101103

102104
## Routes
103105

@@ -275,6 +277,37 @@ Methods:
275277

276278
- <code title="get /accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots/latest">client.magic_transit.connectors.snapshots.latest.<a href="./src/cloudflare/resources/magic_transit/connectors/snapshots/latest.py">list</a>(connector_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/connectors/snapshots/latest_list_response.py">LatestListResponse</a></code>
277279

280+
## Cf1Sites
281+
282+
Types:
283+
284+
```python
285+
from cloudflare.types.magic_transit import Cf1Site, Cf1SiteLocation
286+
```
287+
288+
Methods:
289+
290+
- <code title="post /accounts/{account_id}/magic/cf1_sites">client.magic_transit.cf1_sites.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/cf1_sites.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/cf1_site_create_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/cf1_site.py">SyncSinglePage[Cf1Site]</a></code>
291+
- <code title="patch /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}">client.magic_transit.cf1_sites.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/cf1_sites.py">update</a>(cf1_site_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/cf1_site_update_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/cf1_site.py">Cf1Site</a></code>
292+
- <code title="get /accounts/{account_id}/magic/cf1_sites">client.magic_transit.cf1_sites.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/cf1_sites.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/magic_transit/cf1_site.py">SyncSinglePage[Cf1Site]</a></code>
293+
- <code title="delete /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}">client.magic_transit.cf1_sites.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/cf1_sites.py">delete</a>(cf1_site_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/cf1_site.py">Cf1Site</a></code>
294+
- <code title="get /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}">client.magic_transit.cf1_sites.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/cf1_sites.py">get</a>(cf1_site_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/cf1_site.py">Cf1Site</a></code>
295+
296+
### Ramps
297+
298+
Types:
299+
300+
```python
301+
from cloudflare.types.magic_transit.cf1_sites import Ramp, RampType
302+
```
303+
304+
Methods:
305+
306+
- <code title="post /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps">client.magic_transit.cf1_sites.ramps.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/ramps.py">create</a>(cf1_site_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/cf1_sites/ramp_create_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/cf1_sites/ramp.py">SyncSinglePage[Ramp]</a></code>
307+
- <code title="get /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps">client.magic_transit.cf1_sites.ramps.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/ramps.py">list</a>(cf1_site_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/cf1_sites/ramp.py">SyncSinglePage[Ramp]</a></code>
308+
- <code title="delete /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps/{ramp_id}">client.magic_transit.cf1_sites.ramps.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/ramps.py">delete</a>(ramp_id, \*, account_id, cf1_site_id) -> <a href="./src/cloudflare/types/magic_transit/cf1_sites/ramp.py">Ramp</a></code>
309+
- <code title="get /accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps/{ramp_id}">client.magic_transit.cf1_sites.ramps.<a href="./src/cloudflare/resources/magic_transit/cf1_sites/ramps.py">get</a>(ramp_id, \*, account_id, cf1_site_id) -> <a href="./src/cloudflare/types/magic_transit/cf1_sites/ramp.py">Ramp</a></code>
310+
278311
## PCAPs
279312

280313
Types:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .ramps import (
4+
RampsResource,
5+
AsyncRampsResource,
6+
RampsResourceWithRawResponse,
7+
AsyncRampsResourceWithRawResponse,
8+
RampsResourceWithStreamingResponse,
9+
AsyncRampsResourceWithStreamingResponse,
10+
)
11+
from .cf1_sites import (
12+
Cf1SitesResource,
13+
AsyncCf1SitesResource,
14+
Cf1SitesResourceWithRawResponse,
15+
AsyncCf1SitesResourceWithRawResponse,
16+
Cf1SitesResourceWithStreamingResponse,
17+
AsyncCf1SitesResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"RampsResource",
22+
"AsyncRampsResource",
23+
"RampsResourceWithRawResponse",
24+
"AsyncRampsResourceWithRawResponse",
25+
"RampsResourceWithStreamingResponse",
26+
"AsyncRampsResourceWithStreamingResponse",
27+
"Cf1SitesResource",
28+
"AsyncCf1SitesResource",
29+
"Cf1SitesResourceWithRawResponse",
30+
"AsyncCf1SitesResourceWithRawResponse",
31+
"Cf1SitesResourceWithStreamingResponse",
32+
"AsyncCf1SitesResourceWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)