Skip to content

Commit 931e463

Browse files
Merge branch 'dev' into feat/linode-fw-apply
2 parents 4c4f29a + f1fa70e commit 931e463

File tree

14 files changed

+148
-155
lines changed

14 files changed

+148
-155
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,8 @@ jobs:
1313
name: Analyze (${{ matrix.language }})
1414
runs-on: ubuntu-latest
1515
permissions:
16-
# required for all workflows
1716
security-events: write
1817

19-
# required to fetch internal or private CodeQL packs
20-
packages: read
21-
22-
# only required for workflows in private repositories
23-
actions: read
24-
contents: read
25-
2618
strategy:
2719
fail-fast: false
2820
matrix:

.github/workflows/e2e-test.yml

Lines changed: 27 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -160,64 +160,34 @@ jobs:
160160
runs-on: ubuntu-latest
161161
needs: [integration-tests]
162162
if: ${{ (success() || failure()) && github.repository == 'linode/linode_api4-python' }} # Run even if integration tests fail and only on main repository
163-
164163
steps:
165164
- name: Notify Slack
166-
uses: slackapi/slack-github-action@v1.27.0
165+
uses: slackapi/slack-github-action@v2.0.0
167166
with:
168-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
167+
method: chat.postMessage
168+
token: ${{ secrets.SLACK_BOT_TOKEN }}
169169
payload: |
170-
{
171-
"blocks": [
172-
{
173-
"type": "section",
174-
"text": {
175-
"type": "mrkdwn",
176-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
177-
}
178-
},
179-
{
180-
"type": "divider"
181-
},
182-
{
183-
"type": "section",
184-
"fields": [
185-
{
186-
"type": "mrkdwn",
187-
"text": "*Build Result:*\n${{ needs.integration-tests.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
188-
},
189-
{
190-
"type": "mrkdwn",
191-
"text": "*Branch:*\n`${{ github.ref_name }}`"
192-
}
193-
]
194-
},
195-
{
196-
"type": "section",
197-
"fields": [
198-
{
199-
"type": "mrkdwn",
200-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
201-
},
202-
{
203-
"type": "mrkdwn",
204-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
205-
}
206-
]
207-
},
208-
{
209-
"type": "divider"
210-
},
211-
{
212-
"type": "context",
213-
"elements": [
214-
{
215-
"type": "mrkdwn",
216-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
217-
}
218-
]
219-
}
220-
]
221-
}
222-
env:
223-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
170+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
171+
blocks:
172+
- type: section
173+
text:
174+
type: mrkdwn
175+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
176+
- type: divider
177+
- type: section
178+
fields:
179+
- type: mrkdwn
180+
text: "*Build Result:*\n${{ needs.integration-tests.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
181+
- type: mrkdwn
182+
text: "*Branch:*\n`${{ github.ref_name }}`"
183+
- type: section
184+
fields:
185+
- type: mrkdwn
186+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
187+
- type: mrkdwn
188+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
189+
- type: divider
190+
- type: context
191+
elements:
192+
- type: mrkdwn
193+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"

.github/workflows/nightly-smoke-tests.yml

Lines changed: 27 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -45,62 +45,33 @@ jobs:
4545

4646
- name: Notify Slack
4747
if: always() && github.repository == 'linode/linode_api4-python'
48-
uses: slackapi/slack-github-action@v1.27.0
48+
uses: slackapi/slack-github-action@v2.0.0
4949
with:
50-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
50+
method: chat.postMessage
51+
token: ${{ secrets.SLACK_BOT_TOKEN }}
5152
payload: |
52-
{
53-
"blocks": [
54-
{
55-
"type": "section",
56-
"text": {
57-
"type": "mrkdwn",
58-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
59-
}
60-
},
61-
{
62-
"type": "divider"
63-
},
64-
{
65-
"type": "section",
66-
"fields": [
67-
{
68-
"type": "mrkdwn",
69-
"text": "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
70-
},
71-
{
72-
"type": "mrkdwn",
73-
"text": "*Branch:*\n`${{ github.ref_name }}`"
74-
}
75-
]
76-
},
77-
{
78-
"type": "section",
79-
"fields": [
80-
{
81-
"type": "mrkdwn",
82-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
83-
},
84-
{
85-
"type": "mrkdwn",
86-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
87-
}
88-
]
89-
},
90-
{
91-
"type": "divider"
92-
},
93-
{
94-
"type": "context",
95-
"elements": [
96-
{
97-
"type": "mrkdwn",
98-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
99-
}
100-
]
101-
}
102-
]
103-
}
104-
env:
105-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
53+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
54+
blocks:
55+
- type: section
56+
text:
57+
type: mrkdwn
58+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
59+
- type: divider
60+
- type: section
61+
fields:
62+
- type: mrkdwn
63+
text: "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
64+
- type: mrkdwn
65+
text: "*Branch:*\n`${{ github.ref_name }}`"
66+
- type: section
67+
fields:
68+
- type: mrkdwn
69+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
70+
- type: mrkdwn
71+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
72+
- type: divider
73+
- type: context
74+
elements:
75+
- type: mrkdwn
76+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
10677

.github/workflows/release-notify-slack.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ jobs:
1111
steps:
1212
- name: Notify Slack - Main Message
1313
id: main_message
14-
uses: slackapi/slack-github-action@v1.27.0
14+
uses: slackapi/slack-github-action@v2.0.0
1515
with:
16-
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
16+
method: chat.postMessage
17+
token: ${{ secrets.SLACK_BOT_TOKEN }}
1718
payload: |
18-
{
19-
"blocks": [
20-
{
21-
"type": "section",
22-
"text": {
23-
"type": "mrkdwn",
24-
"text": "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
25-
}
26-
}
27-
]
28-
}
29-
env:
30-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
19+
channel: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
20+
blocks:
21+
- type: section
22+
text:
23+
type: mrkdwn
24+
text: "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"

linode_api4/objects/linode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class Type(Base):
269269
"vcpus": Property(),
270270
"gpus": Property(),
271271
"successor": Property(),
272+
"accelerated_devices": Property(),
272273
# type_class is populated from the 'class' attribute of the returned JSON
273274
}
274275

test/fixtures/linode_types.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"results": 4,
2+
"results": 5,
33
"pages": 1,
44
"page": 1,
55
"data": [
66
{
7+
"accelerated_devices": 0,
78
"disk": 20480,
89
"memory": 1024,
910
"transfer": 1000,
@@ -52,6 +53,7 @@
5253
"successor": null
5354
},
5455
{
56+
"accelerated_devices": 0,
5557
"disk": 20480,
5658
"memory": 16384,
5759
"transfer": 5000,
@@ -100,6 +102,7 @@
100102
"successor": null
101103
},
102104
{
105+
"accelerated_devices": 0,
103106
"disk": 30720,
104107
"memory": 2048,
105108
"transfer": 2000,
@@ -148,6 +151,7 @@
148151
"successor": null
149152
},
150153
{
154+
"accelerated_devices": 0,
151155
"disk": 49152,
152156
"memory": 4096,
153157
"transfer": 3000,
@@ -194,6 +198,33 @@
194198
}
195199
],
196200
"successor": null
201+
},
202+
{
203+
"id": "g1-accelerated-netint-vpu-t1u1-m",
204+
"label": "Netint Quadra T1U x1 Medium",
205+
"price": {
206+
"hourly": 0.0,
207+
"monthly": 0.0
208+
},
209+
"region_prices": [],
210+
"addons": {
211+
"backups": {
212+
"price": {
213+
"hourly": 0.0,
214+
"monthly": 0.0
215+
},
216+
"region_prices": []
217+
}
218+
},
219+
"memory": 24576,
220+
"disk": 307200,
221+
"transfer": 0,
222+
"vcpus": 12,
223+
"gpus": 0,
224+
"network_out": 16000,
225+
"class": "accelerated",
226+
"successor": null,
227+
"accelerated_devices": 1
197228
}
198229
]
199230
}

test/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def create_linode_for_pass_reset(test_linode_client, e2e_test_firewall):
184184
linode_instance, password = client.linode.instance_create(
185185
"g6-nanode-1",
186186
region,
187-
image="linode/debian10",
187+
image="linode/debian12",
188188
label=label,
189189
firewall=e2e_test_firewall,
190190
)

test/integration/linode_client/test_linode_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def setup_client_and_linode(test_linode_client, e2e_test_firewall):
1919
linode_instance, password = client.linode.instance_create(
2020
"g6-nanode-1",
2121
region,
22-
image="linode/debian10",
22+
image="linode/debian12",
2323
label=label,
2424
firewall=e2e_test_firewall,
2525
)
@@ -250,7 +250,7 @@ def test_create_linode_instance_without_image(test_linode_client):
250250
def test_create_linode_instance_with_image(setup_client_and_linode):
251251
linode = setup_client_and_linode[1]
252252

253-
assert re.search("linode/debian10", str(linode.image))
253+
assert re.search("linode/debian12", str(linode.image))
254254

255255

256256
def test_create_linode_with_interfaces(test_linode_client):
@@ -262,7 +262,7 @@ def test_create_linode_with_interfaces(test_linode_client):
262262
"g6-nanode-1",
263263
region,
264264
label=label,
265-
image="linode/debian10",
265+
image="linode/debian12",
266266
interfaces=[
267267
{"purpose": "public"},
268268
ConfigInterface(

test/integration/models/account/test_account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_latest_get_event(test_linode_client, e2e_test_firewall):
7171
linode, password = client.linode.instance_create(
7272
"g6-nanode-1",
7373
region,
74-
image="linode/debian10",
74+
image="linode/debian12",
7575
label=label,
7676
firewall=e2e_test_firewall,
7777
)

test/integration/models/firewall/test_firewall.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def linode_fw(test_linode_client):
1414
label = get_test_label()
1515

1616
linode_instance, password = client.linode.instance_create(
17-
"g6-nanode-1", region, image="linode/debian10", label=label
17+
"g6-nanode-1", region, image="linode/debian12", label=label
1818
)
1919

2020
yield linode_instance

0 commit comments

Comments
 (0)