Skip to content

Commit 39b9260

Browse files
committed
Merge branch 'dev' into proj/image-gen2
2 parents bf8e23c + ebf5cdd commit 39b9260

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1237
-439
lines changed

.github/labels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
- name: new-feature
33
description: for new features in the changelog.
44
color: 225fee
5+
- name: project
6+
description: for new projects in the changelog.
7+
color: 46BAF0
58
- name: improvement
69
description: for improvements in existing functionality in the changelog.
710
color: 22ee47

.github/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ changelog:
33
labels:
44
- ignore-for-release
55
categories:
6-
- title: ⚠️ Breaking Change
6+
- title: 📋 New Project
7+
labels:
8+
- project
9+
- title: ⚠️ Breaking Change
710
labels:
811
- breaking-change
912
- title: 🐛 Bug Fixes
@@ -18,7 +21,7 @@ changelog:
1821
- title: 🧪 Testing Improvements
1922
labels:
2023
- testing
21-
- title: ⚙️ Repo/CI Improvements
24+
- title: ⚙️ Repo/CI Improvements
2225
labels:
2326
- repo-ci-improvement
2427
- title: 📖 Documentation

.github/workflows/e2e-test-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ jobs:
103103
if: always()
104104
run: |
105105
filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
106-
python tod_scripts/add_to_xml_test_report.py \
106+
python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \
107107
--branch_name "${GITHUB_REF#refs/*/}" \
108108
--gha_run_id "$GITHUB_RUN_ID" \
109109
--gha_run_number "$GITHUB_RUN_NUMBER" \
110110
--xmlfile "${filename}"
111111
sync
112-
python3 tod_scripts/test_report_upload_script.py "${filename}"
112+
python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}"
113113
env:
114114
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
115115
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}

.github/workflows/e2e-test.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
name: Integration Tests
22

33
on:
4-
workflow_dispatch: null
4+
workflow_dispatch:
5+
inputs:
6+
use_minimal_test_account:
7+
description: 'Use minimal test account'
8+
required: false
9+
default: 'false'
10+
sha:
11+
description: 'The hash value of the commit'
12+
required: false
13+
default: ''
514
push:
615
branches:
716
- main
@@ -13,7 +22,16 @@ jobs:
1322
env:
1423
EXIT_STATUS: 0
1524
steps:
16-
- name: Clone Repository
25+
- name: Clone Repository with SHA
26+
if: ${{ inputs.sha != '' }}
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
submodules: 'recursive'
31+
ref: ${{ inputs.sha }}
32+
33+
- name: Clone Repository without SHA
34+
if: ${{ inputs.sha == '' }}
1735
uses: actions/checkout@v4
1836
with:
1937
fetch-depth: 0
@@ -40,32 +58,36 @@ jobs:
4058
mv calicoctl-linux-amd64 /usr/local/bin/calicoctl
4159
mv kubectl /usr/local/bin/kubectl
4260
61+
- name: Set LINODE_TOKEN
62+
run: |
63+
echo "LINODE_TOKEN=${{ secrets[inputs.use_minimal_test_account == 'true' && 'MINIMAL_LINODE_TOKEN' || 'LINODE_TOKEN'] }}" >> $GITHUB_ENV
64+
4365
- name: Run Integration tests
4466
run: |
4567
timestamp=$(date +'%Y%m%d%H%M')
4668
report_filename="${timestamp}_sdk_test_report.xml"
4769
make testint TEST_ARGS="--junitxml=${report_filename}"
4870
env:
49-
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
71+
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}
5072

5173
- name: Apply Calico Rules to LKE
5274
if: always()
5375
run: |
5476
cd scripts && ./lke_calico_rules_e2e.sh
5577
env:
56-
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
78+
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}
5779

5880
- name: Upload test results
5981
if: always()
6082
run: |
6183
filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
62-
python tod_scripts/add_to_xml_test_report.py \
84+
python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \
6385
--branch_name "${GITHUB_REF#refs/*/}" \
6486
--gha_run_id "$GITHUB_RUN_ID" \
6587
--gha_run_number "$GITHUB_RUN_NUMBER" \
6688
--xmlfile "${filename}"
6789
sync
68-
python3 tod_scripts/test_report_upload_script.py "${filename}"
90+
python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}"
6991
env:
7092
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
7193
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}

.github/workflows/release-cross-repo-test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
steps:
1515
- name: Checkout linode_api4 repository
1616
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
submodules: 'recursive'
1720

1821
- name: update packages
1922
run: sudo apt-get update -y
@@ -26,11 +29,13 @@ jobs:
2629
with:
2730
python-version: '3.10'
2831

29-
- name: checkout repo
30-
uses: actions/checkout@v3
32+
- name: Checkout ansible repo
33+
uses: actions/checkout@v4
3134
with:
3235
repository: linode/ansible_linode
3336
path: .ansible/collections/ansible_collections/linode/cloud
37+
fetch-depth: 0
38+
submodules: 'recursive'
3439

3540
- name: install dependencies
3641
run: |

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "tod_scripts"]
2-
path = tod_scripts
3-
url = https://github.com/linode/TOD-test-report-uploader.git
1+
[submodule "e2e_scripts"]
2+
path = e2e_scripts
3+
url = https://github.com/linode/dx-e2e-test-scripts

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ linode_api4
33

44
The official python library for the `Linode API v4`_ in python.
55

6-
.. _Linode API v4: https://developers.linode.com/api/v4/
6+
.. _Linode API v4: https://techdocs.akamai.com/linode-api/reference/api
77

88
.. image:: https://img.shields.io/github/actions/workflow/status/linode/linode_api4-python/main.yml?label=tests
99
:target: https://img.shields.io/github/actions/workflow/status/linode/linode_api4-python/main.yml?label=tests

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ linode_api4
22
===========
33

44
This is the documentation for the official Python bindings of the Linode
5-
API v4. For API documentation, see `developers.linode.com`_.
5+
API v4. For API documentation, see `techdocs.akamai.com`_.
66

77
This library can be used to interact with all features of the Linode API.
88

9-
.. _developers.linode.com: https://developers.linode.com/api/v4
9+
.. _techdocs.akamai.com: https://techdocs.akamai.com/linode-api/reference/api
1010

1111
Installation
1212
------------

e2e_scripts

Submodule e2e_scripts added at b561785

linode_api4/groups/account.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __call__(self):
3434
3535
account = client.account()
3636
37-
API Documentation: https://www.linode.com/docs/api/account/#account-view
37+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account
3838
3939
:returns: Returns the acting user's account information.
4040
:rtype: Account
@@ -52,7 +52,7 @@ def events(self, *filters):
5252
"""
5353
Lists events on the current account matching the given filters.
5454
55-
API Documentation: https://www.linode.com/docs/api/account/#events-list
55+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-events
5656
5757
:param filters: Any number of filters to apply to this query.
5858
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
@@ -69,7 +69,7 @@ def events_mark_seen(self, event):
6969
Marks event as the last event we have seen. If event is an int, it is treated
7070
as an event_id, otherwise it should be an event object whose id will be used.
7171
72-
API Documentation: https://www.linode.com/docs/api/account/#event-mark-as-seen
72+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-event-seen
7373
7474
:param event: The Linode event to mark as seen.
7575
:type event: Event or int
@@ -85,7 +85,7 @@ def settings(self):
8585
Returns the account settings data for this acocunt. This is not a
8686
listing endpoint.
8787
88-
API Documentation: https://www.linode.com/docs/api/account/#account-settings-view
88+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-settings
8989
9090
:returns: The account settings data for this account.
9191
:rtype: AccountSettings
@@ -105,7 +105,7 @@ def invoices(self):
105105
"""
106106
Returns Invoices issued to this account.
107107
108-
API Documentation: https://www.linode.com/docs/api/account/#invoices-list
108+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-invoices
109109
110110
:param filters: Any number of filters to apply to this query.
111111
@@ -118,7 +118,7 @@ def payments(self):
118118
"""
119119
Returns a list of Payments made on this account.
120120
121-
API Documentation: https://www.linode.com/docs/api/account/#payments-list
121+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-payments
122122
123123
:returns: A list of payments made on this account.
124124
:rtype: PaginatedList of Payment
@@ -129,7 +129,7 @@ def oauth_clients(self, *filters):
129129
"""
130130
Returns the OAuth Clients associated with this account.
131131
132-
API Documentation: https://www.linode.com/docs/api/account/#oauth-clients-list
132+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-clients
133133
134134
:param filters: Any number of filters to apply to this query.
135135
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
@@ -144,7 +144,7 @@ def oauth_client_create(self, name, redirect_uri, **kwargs):
144144
"""
145145
Creates a new OAuth client.
146146
147-
API Documentation: https://www.linode.com/docs/api/account/#oauth-client-create
147+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-client
148148
149149
:param name: The name of this application.
150150
:type name: str
@@ -174,7 +174,7 @@ def users(self, *filters):
174174
"""
175175
Returns a list of users on this account.
176176
177-
API Documentation: https://www.linode.com/docs/api/account/#users-list
177+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-users
178178
179179
:param filters: Any number of filters to apply to this query.
180180
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
@@ -189,7 +189,7 @@ def logins(self):
189189
"""
190190
Returns a collection of successful logins for all users on the account during the last 90 days.
191191
192-
API Documentation: https://www.linode.com/docs/api/account/#user-logins-list-all
192+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-logins
193193
194194
:returns: A list of Logins on this account.
195195
:rtype: PaginatedList of Login
@@ -201,7 +201,7 @@ def maintenance(self):
201201
"""
202202
Returns a collection of Maintenance objects for any entity a user has permissions to view. Cancelled Maintenance objects are not returned.
203203
204-
API Documentation: https://www.linode.com/docs/api/account/#user-logins-list-all
204+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-logins
205205
206206
:returns: A list of Maintenance objects on this account.
207207
:rtype: List of Maintenance objects as MappedObjects
@@ -217,7 +217,7 @@ def payment_methods(self):
217217
"""
218218
Returns a list of Payment Methods for this Account.
219219
220-
API Documentation: https://www.linode.com/docs/api/account/#payment-methods-list
220+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-payment-methods
221221
222222
:returns: A list of Payment Methods on this account.
223223
:rtype: PaginatedList of PaymentMethod
@@ -229,7 +229,7 @@ def add_payment_method(self, data, is_default, type):
229229
"""
230230
Adds a Payment Method to your Account with the option to set it as the default method.
231231
232-
API Documentation: https://www.linode.com/docs/api/account/#payment-method-add
232+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-payment-method
233233
234234
:param data: An object representing the credit card information you have on file with
235235
Linode to make Payments against your Account.
@@ -281,7 +281,7 @@ def notifications(self):
281281
"""
282282
Returns a collection of Notification objects representing important, often time-sensitive items related to your Account.
283283
284-
API Documentation: https://www.linode.com/docs/api/account/#notifications-list
284+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-notifications
285285
286286
:returns: A list of Notifications on this account.
287287
:rtype: List of Notification objects as MappedObjects
@@ -297,7 +297,7 @@ def linode_managed_enable(self):
297297
"""
298298
Enables Linode Managed for the entire account and sends a welcome email to the account’s associated email address.
299299
300-
API Documentation: https://www.linode.com/docs/api/account/#linode-managed-enable
300+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-enable-account-managed
301301
"""
302302

303303
resp = self.client.post(
@@ -315,7 +315,7 @@ def add_promo_code(self, promo_code):
315315
"""
316316
Adds an expiring Promo Credit to your account.
317317
318-
API Documentation: https://www.linode.com/docs/api/account/#promo-credit-add
318+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-promo-credit
319319
320320
:param promo_code: The Promo Code.
321321
:type promo_code: str
@@ -341,7 +341,7 @@ def service_transfers(self):
341341
"""
342342
Returns a collection of all created and accepted Service Transfers for this account, regardless of the user that created or accepted the transfer.
343343
344-
API Documentation: https://www.linode.com/docs/api/account/#service-transfers-list
344+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-service-transfers
345345
346346
:returns: A list of Service Transfers on this account.
347347
:rtype: PaginatedList of ServiceTransfer
@@ -353,7 +353,7 @@ def service_transfer_create(self, entities):
353353
"""
354354
Creates a transfer request for the specified services.
355355
356-
API Documentation: https://www.linode.com/docs/api/account/#service-transfer-create
356+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-service-transfer
357357
358358
:param entities: A collection of the services to include in this transfer request, separated by type.
359359
:type entities: dict
@@ -396,7 +396,7 @@ def transfer(self):
396396
"""
397397
Returns a MappedObject containing the account's transfer pool data.
398398
399-
API Documentation: https://www.linode.com/docs/api/account/#network-utilization-view
399+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-transfer
400400
401401
:returns: Information about this account's transfer pool data.
402402
:rtype: MappedObject
@@ -421,7 +421,7 @@ def user_create(self, email, username, restricted=True):
421421
The new user will receive an email inviting them to set up their password.
422422
This must be completed before they can log in.
423423
424-
API Documentation: https://www.linode.com/docs/api/account/#user-create
424+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-user
425425
426426
:param email: The new user's email address. This is used to finish setting
427427
up their user account.
@@ -459,7 +459,7 @@ def enrolled_betas(self, *filters):
459459
"""
460460
Returns a list of all Beta Programs an account is enrolled in.
461461
462-
API doc: https://www.linode.com/docs/api/beta-programs/#enrolled-beta-programs-list
462+
API doc: https://techdocs.akamai.com/linode-api/reference/get-enrolled-beta-programs
463463
464464
:returns: a list of Beta Programs.
465465
:rtype: PaginatedList of AccountBetaProgram
@@ -470,7 +470,7 @@ def join_beta_program(self, beta: Union[str, BetaProgram]):
470470
"""
471471
Enrolls an account into a beta program.
472472
473-
API doc: https://www.linode.com/docs/api/beta-programs/#beta-program-enroll
473+
API doc: https://techdocs.akamai.com/linode-api/reference/post-beta-program
474474
475475
:param beta: The object or id of a beta program to join.
476476
:type beta: BetaProgram or str
@@ -491,7 +491,7 @@ def availabilities(self, *filters):
491491
Returns a list of all available regions and the resource types which are available
492492
to the account.
493493
494-
API doc: https://www.linode.com/docs/api/account/#region-service-availability
494+
API doc: https://techdocs.akamai.com/linode-api/reference/get-account-availability
495495
496496
:returns: a list of region availability information.
497497
:rtype: PaginatedList of AccountAvailability
@@ -502,7 +502,9 @@ def child_accounts(self, *filters):
502502
"""
503503
Returns a list of all child accounts under the this parent account.
504504
505-
API doc: TBD
505+
NOTE: Parent/Child related features may not be generally available.
506+
507+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-child-accounts
506508
507509
:returns: a list of all child accounts.
508510
:rtype: PaginatedList of ChildAccount

0 commit comments

Comments
 (0)