Skip to content

Commit

Permalink
Merge branch 'develop' into react-18-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
bnussman committed Feb 12, 2024
2 parents e21da94 + 35521e0 commit 6802714
Show file tree
Hide file tree
Showing 29 changed files with 1,206 additions and 76 deletions.
18 changes: 8 additions & 10 deletions packages/api-v4/src/placement-groups/placement-groups.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import {
assignVMsToPlacementGroupSchema,
createPlacementGroupSchema,
unassignVMsFromPlacementGroupSchema,
renamePlacementGroupSchema,
} from '@linode/validation';
import { API_ROOT } from '../constants';
Expand All @@ -15,10 +13,10 @@ import Request, {
} from '../request';
import type { Filter, Params, ResourcePage as Page } from '../types';
import type {
AssignVMsToPlacementGroupPayload,
AssignLinodesToPlacementGroupPayload,
CreatePlacementGroupPayload,
PlacementGroup,
UnassignVMsFromPlacementGroupPayload,
UnassignLinodesFromPlacementGroupPayload,
RenamePlacementGroupPayload,
} from './types';

Expand Down Expand Up @@ -109,9 +107,9 @@ export const deletePlacementGroup = (placementGroupId: number) =>
*
* @note While this accepts an array of Linode ids (future proofing), only one Linode id is supported at this time.
*/
export const assignVMsToPlacementGroup = (
export const assignLinodesToPlacementGroup = (
placementGroupId: number,
linodeIds: AssignVMsToPlacementGroupPayload
payload: AssignLinodesToPlacementGroupPayload
) =>
Request<PlacementGroup>(
setURL(
Expand All @@ -120,7 +118,7 @@ export const assignVMsToPlacementGroup = (
)}/assign`
),
setMethod('POST'),
setData(linodeIds, assignVMsToPlacementGroupSchema)
setData(payload)
);

/**
Expand All @@ -133,9 +131,9 @@ export const assignVMsToPlacementGroup = (
*
* @note While this accepts an array of Linode ids (future proofing), only one Linode id is supported at this time.
*/
export const unassignVMsFromPlacementGroup = (
export const unassignLinodesFromPlacementGroup = (
placementGroupId: number,
linodeIds: UnassignVMsFromPlacementGroupPayload
payload: UnassignLinodesFromPlacementGroupPayload
) =>
Request<PlacementGroup>(
setURL(
Expand All @@ -144,5 +142,5 @@ export const unassignVMsFromPlacementGroup = (
)}/unassign`
),
setMethod('POST'),
setData(linodeIds, unassignVMsFromPlacementGroupSchema)
setData(payload)
);
8 changes: 6 additions & 2 deletions packages/api-v4/src/placement-groups/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ export type RenamePlacementGroupPayload = Pick<PlacementGroup, 'label'>;
/**
* Since the API expects an array of ONE linode id, we'll use a tuple here.
*/
export type AssignVMsToPlacementGroupPayload = [number];
export type UnassignVMsFromPlacementGroupPayload = [number];
export type AssignLinodesToPlacementGroupPayload = {
linodes: [number];
};
export type UnassignLinodesFromPlacementGroupPayload = {
linodes: [number];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Add AssignLinodesToPlacementGroup drawer ([#10140](https://github.com/linode/manager/pull/10140))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10144-tests-1707158192794.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Add Cypress tests for OBJ Multicluster access key operations ([#10144](https://github.com/linode/manager/pull/10144))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Create PlacementGroups Summary component ([#10164](https://github.com/linode/manager/pull/10164))
Loading

0 comments on commit 6802714

Please sign in to comment.