diff --git a/packages/grid_client/src/modules/models.ts b/packages/grid_client/src/modules/models.ts index 1faf5821dd..061724c00c 100644 --- a/packages/grid_client/src/modules/models.ts +++ b/packages/grid_client/src/modules/models.ts @@ -593,6 +593,7 @@ class FilterOptions { @Expose() @IsOptional() @Min(0) sru?: number; // GB @Expose() @IsOptional() @Min(0) hru?: number; // GB @Expose() @IsOptional() @IsBoolean() publicIPs?: boolean; + @Expose() @IsOptional() @IsBoolean() hasIPv6?: boolean; @Expose() @IsOptional() @IsBoolean() accessNodeV4?: boolean; @Expose() @IsOptional() @IsBoolean() accessNodeV6?: boolean; @Expose() @IsOptional() @IsBoolean() gateway?: boolean; @@ -629,6 +630,7 @@ class FarmFilterOptions { @Expose() @IsOptional() @Min(0) nodeSRU?: number; // GB @Expose() @IsOptional() @Min(0) nodeHRU?: number; // GB @Expose() @IsOptional() @IsBoolean() publicIp?: boolean; + @Expose() @IsOptional() @IsBoolean() nodeHasIPv6?: boolean; @Expose() @IsOptional() @IsBoolean() certificationType?: CertificationType; @Expose() @IsOptional() @IsString() farmName?: string; @Expose() @IsOptional() @IsString() country?: string; diff --git a/packages/grid_client/src/primitives/nodes.ts b/packages/grid_client/src/primitives/nodes.ts index 4de4c57259..bfa9e73ede 100644 --- a/packages/grid_client/src/primitives/nodes.ts +++ b/packages/grid_client/src/primitives/nodes.ts @@ -407,6 +407,7 @@ class Nodes { free_ips: options.publicIPs ? 1 : "", ipv4: options.accessNodeV4, ipv6: options.accessNodeV6, + has_ipv6: options.hasIPv6, certification_type: options.certified ? "Certified" : "", farm_ids: options.farmId ? [options.farmId] : options.farmIds, farm_name: options.farmName, @@ -448,6 +449,7 @@ class Nodes { country: options.country, dedicated: options.dedicated, node_available_for: options.availableFor, + node_has_ipv6: options.nodeHasIPv6, node_status: "up", page: options.page, size: options.size, diff --git a/packages/gridproxy_client/src/builders/farms.ts b/packages/gridproxy_client/src/builders/farms.ts index dc375f95dc..a39b328f63 100644 --- a/packages/gridproxy_client/src/builders/farms.ts +++ b/packages/gridproxy_client/src/builders/farms.ts @@ -22,6 +22,7 @@ export interface FarmsQuery { certificationType: CertificationType; dedicated: boolean; stellarAddress: string; + nodeHasIPv6: boolean; } const FARMS_MAPPER: BuilderMapper = { @@ -39,6 +40,7 @@ const FARMS_MAPPER: BuilderMapper = { stellarAddress: "stellar_address", totalIps: "total_ips", twinId: "twin_id", + nodeHasIPv6: "node_has_ipv6", }; const FARMS_VALIDATOR: BuilderValidator = { @@ -58,6 +60,7 @@ const FARMS_VALIDATOR: BuilderValidator = { }, dedicated: assertBoolean, stellarAddress: assertString, + nodeHasIPv6: assertBoolean, }; export class FarmsBuilder extends AbstractBuilder { diff --git a/packages/gridproxy_client/src/builders/nodes.ts b/packages/gridproxy_client/src/builders/nodes.ts index 0e5585fda7..5f62a617c2 100644 --- a/packages/gridproxy_client/src/builders/nodes.ts +++ b/packages/gridproxy_client/src/builders/nodes.ts @@ -74,6 +74,7 @@ export interface NodesQuery { sortBy: SortBy; sortOrder: SortOrder; numGpu: number; + hasIPv6: boolean; } const NODES_MAPPER: BuilderMapper = { @@ -117,6 +118,7 @@ const NODES_MAPPER: BuilderMapper = { sortBy: "sort_by", sortOrder: "sort_order", numGpu: "num_gpu", + hasIPv6: "has_ipv6", }; const NODES_VALIDATOR: BuilderValidator = { @@ -174,6 +176,7 @@ const NODES_VALIDATOR: BuilderValidator = { sortBy: assertString, sortOrder: assertString, numGpu: assertInt, + hasIPv6: assertBoolean, }; export class NodesBuilder extends AbstractBuilder { diff --git a/packages/playground/src/utils/nodeSelector.ts b/packages/playground/src/utils/nodeSelector.ts index 6cd1b6e00c..580c87d962 100644 --- a/packages/playground/src/utils/nodeSelector.ts +++ b/packages/playground/src/utils/nodeSelector.ts @@ -104,6 +104,7 @@ export function normalizeFarmFilters( publicIp: filters.ipv4 || undefined, nodeCertified: filters.certified || undefined, nodeHasGPU: filters.hasGPU || undefined, + nodeHasIPv6: filters.ipv6 || undefined, }; } @@ -195,6 +196,7 @@ export function normalizeNodeFilters( (filters.solutionDisk ?? 0) + (filters.rootFilesystemSize ?? 0), ) || undefined, publicIPs: filters.ipv4 || undefined, + hasIPv6: filters.ipv6 || undefined, hasGPU: filters.hasGPU || undefined, rentedBy: filters.dedicated ? options.twinId : undefined, certified: filters.certified || undefined, diff --git a/packages/playground/src/views/nodes.vue b/packages/playground/src/views/nodes.vue index d4d23c2135..1a28ef2271 100644 --- a/packages/playground/src/views/nodes.vue +++ b/packages/playground/src/views/nodes.vue @@ -38,6 +38,10 @@ /> + + + + (true); @@ -556,6 +561,7 @@ export default { numGpu: +filters.value.numGpu || undefined, rentable: filters.value.rentable && profileManager.profile ? filters.value.rentable : undefined, availableFor: filters.value.rentable && profileManager.profile ? profileManager.profile.twinId : undefined, + hasIPv6: filters.value.ipv6, }, { loadFarm: true }, );