From a20d2a04a86797d77819c63e556d8ec7d4c128ca Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Mon, 17 Oct 2022 17:01:33 +0300 Subject: [PATCH] Stop relying on device-type.json for resolving the device type aliases Resolves: #2541 Change-type: patch Signed-off-by: Thodoris Greasidis --- lib/commands/devices/supported.ts | 47 +- lib/utils/cloud.ts | 14 +- tests/commands/device/supported.spec.ts | 3 +- .../api-response/device-type-GET-v6.json | 620 ++++++++++++++++++ 4 files changed, 648 insertions(+), 36 deletions(-) diff --git a/lib/commands/devices/supported.ts b/lib/commands/devices/supported.ts index 9a5555a3..c1f7ab5b 100644 --- a/lib/commands/devices/supported.ts +++ b/lib/commands/devices/supported.ts @@ -15,6 +15,7 @@ * limitations under the License. */ import { flags } from '@oclif/command'; +import type * as BalenaSdk from 'balena-sdk'; import * as _ from 'lodash'; import Command from '../../command'; @@ -59,36 +60,38 @@ export default class DevicesSupportedCmd extends Command { public async run() { const { flags: options } = this.parse(DevicesSupportedCmd); - const [dts, configDTs] = await Promise.all([ - getBalenaSdk().models.deviceType.getAllSupported({ - $expand: { is_of__cpu_architecture: { $select: 'slug' } }, - $select: ['slug', 'name'], - }), - getBalenaSdk().models.config.getDeviceTypes(), - ]); - const dtsBySlug = _.keyBy(dts, (dt) => dt.slug); - const configDTsBySlug = _.keyBy(configDTs, (dt) => dt.slug); + const pineOptions = { + $select: (['slug', 'name'] as const).slice(), + $expand: { + is_of__cpu_architecture: { $select: 'slug' }, + device_type_alias: { + $select: 'is_referenced_by__alias', + $orderby: 'is_referenced_by__alias asc', + }, + }, + } as const; + const dts = (await getBalenaSdk().models.deviceType.getAllSupported( + pineOptions, + )) as Array< + BalenaSdk.PineTypedResult + >; interface DT { slug: string; aliases: string[]; arch: string; name: string; } - let deviceTypes: DT[] = []; - for (const slug of Object.keys(dtsBySlug)) { - const configDT: Partial = - configDTsBySlug[slug] || {}; - const aliases = (configDT.aliases || []).filter( - (alias) => alias !== slug, - ); - const dt: Partial = dtsBySlug[slug] || {}; - deviceTypes.push({ - slug, + let deviceTypes = dts.map((dt): DT => { + const aliases = dt.device_type_alias + .map((dta) => dta.is_referenced_by__alias) + .filter((alias) => alias !== dt.slug); + return { + slug: dt.slug, aliases: options.json ? aliases : [aliases.join(', ')], - arch: (dt.is_of__cpu_architecture as any)?.[0]?.slug || 'n/a', + arch: dt.is_of__cpu_architecture[0]?.slug || 'n/a', name: dt.name || 'N/A', - }); - } + }; + }); const fields = ['slug', 'aliases', 'arch', 'name']; deviceTypes = _.sortBy(deviceTypes, fields); if (options.json) { diff --git a/lib/utils/cloud.ts b/lib/utils/cloud.ts index 540a258b..612316db 100644 --- a/lib/utils/cloud.ts +++ b/lib/utils/cloud.ts @@ -107,16 +107,6 @@ export const getDeviceAndMaybeAppFromUUID = _.memoize( (_sdk, deviceUUID) => deviceUUID, ); -/** Given a device type alias like 'nuc', return the actual slug like 'intel-nuc'. */ -export const unaliasDeviceType = _.memoize(async function ( - sdk: SDK.BalenaSDK, - deviceType: string, -): Promise { - return ( - (await sdk.models.device.getManifestBySlug(deviceType)).slug || deviceType - ); -}); - /** * Download balenaOS image for the specified `deviceType`. * `OSVersion` may be one of: @@ -255,8 +245,8 @@ export async function getOsVersions( ); // if slug is an alias, fetch the real slug if (!versions.length) { - // unaliasDeviceType() produces a nice error msg if slug is invalid - slug = await unaliasDeviceType(sdk, slug); + // unalias device type slug + slug = (await sdk.models.deviceType.get(slug, { $select: 'slug' })).slug; if (slug !== deviceType) { versions = await sdk.models.os.getAvailableOsVersions(slug); } diff --git a/tests/commands/device/supported.spec.ts b/tests/commands/device/supported.spec.ts index bed6832c..037f552c 100644 --- a/tests/commands/device/supported.spec.ts +++ b/tests/commands/device/supported.spec.ts @@ -44,7 +44,6 @@ describe('balena devices supported', function () { it('should list currently supported devices, with correct filtering', async () => { api.expectGetDeviceTypes(); - api.expectGetConfigDeviceTypes(); const { out, err } = await runCommand('devices supported'); @@ -54,7 +53,7 @@ describe('balena devices supported', function () { expect(lines).to.have.lengthOf.at.least(2); expect(lines).to.contain('intel-nuc nuc amd64 Intel NUC'); expect(lines).to.contain( - 'odroid-xu4 odroid-ux3, odroid-u3+ armv7hf ODROID-XU4', + 'odroid-xu4 odroid-u3+, odroid-ux3 armv7hf ODROID-XU4', ); expect(err).to.eql([]); }); diff --git a/tests/test-data/api-response/device-type-GET-v6.json b/tests/test-data/api-response/device-type-GET-v6.json index d578dd9f..da1ff638 100644 --- a/tests/test-data/api-response/device-type-GET-v6.json +++ b/tests/test-data/api-response/device-type-GET-v6.json @@ -7,6 +7,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "n310-tx2", + "__metadata": {} + } + ], "id": 162, "slug": "n310-tx2", "name": "Aetina N310 TX2", @@ -23,6 +29,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "n510-tx2", + "__metadata": {} + } + ], "id": 39, "slug": "n510-tx2", "name": "Aetina N510 TX2", @@ -39,6 +51,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "aio-3288c", + "__metadata": {} + } + ], "id": 148, "slug": "aio-3288c", "name": "AIO 3288C", @@ -55,6 +73,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "am571x-evm", + "__metadata": {} + } + ], "id": 1, "slug": "am571x-evm", "name": "AM571X EVM", @@ -71,6 +95,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "apalis-imx6q", + "__metadata": {} + } + ], "id": 2, "slug": "apalis-imx6q", "name": "Apalis iMX6q", @@ -87,6 +117,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "asus-tinker-board", + "__metadata": {} + } + ], "id": 8, "slug": "asus-tinker-board", "name": "Asus Tinker Board", @@ -108,6 +144,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "asus-tinker-board-s", + "__metadata": {} + } + ], "id": 9, "slug": "asus-tinker-board-s", "name": "Asus Tinker Board S", @@ -129,6 +171,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jn30b-nano", + "__metadata": {} + } + ], "id": 141, "slug": "jn30b-nano", "name": "Auvidea JN30B Nano", @@ -145,6 +193,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "fincm3", + "__metadata": {} + } + ], "id": 21, "slug": "fincm3", "name": "Balena Fin (CM3)", @@ -161,6 +215,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "bananapi-m1-plus", + "__metadata": {} + } + ], "id": 10, "slug": "bananapi-m1-plus", "name": "BananaPi-M1+", @@ -177,6 +237,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beagleboard-xm", + "__metadata": {} + } + ], "id": 11, "slug": "beagleboard-xm", "name": "BeagleBoard-XM", @@ -193,6 +259,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-black", + "__metadata": {} + } + ], "id": 12, "slug": "beaglebone-black", "name": "BeagleBone Black", @@ -209,6 +281,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-green", + "__metadata": {} + } + ], "id": 13, "slug": "beaglebone-green", "name": "BeagleBone Green", @@ -225,6 +303,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-green-gateway", + "__metadata": {} + } + ], "id": 184, "slug": "beaglebone-green-gateway", "name": "BeagleBone Green Gateway", @@ -241,6 +325,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-green-wifi", + "__metadata": {} + } + ], "id": 14, "slug": "beaglebone-green-wifi", "name": "BeagleBone Green Wireless", @@ -257,6 +347,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "colibri-imx6dl", + "__metadata": {} + } + ], "id": 18, "slug": "colibri-imx6dl", "name": "Colibri iMX6dl", @@ -273,6 +369,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "iot-gate-imx8", + "__metadata": {} + } + ], "id": 190, "slug": "iot-gate-imx8", "name": "Compulab IOT-gate-imx8", @@ -289,6 +391,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "cl-som-imx8", + "__metadata": {} + } + ], "id": 17, "slug": "cl-som-imx8", "name": "Compulab MX8M", @@ -305,6 +413,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "coral-dev", + "__metadata": {} + } + ], "id": 142, "slug": "coral-dev", "name": "Coral Dev Board", @@ -321,6 +435,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "astro-tx2", + "__metadata": {} + } + ], "id": 161, "slug": "astro-tx2", "name": "CTI Astro TX2 G+", @@ -337,6 +457,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orbitty-tx2", + "__metadata": {} + } + ], "id": 52, "slug": "orbitty-tx2", "name": "CTI Orbitty TX2", @@ -353,6 +479,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "photon-nano", + "__metadata": {} + } + ], "id": 146, "slug": "photon-nano", "name": "CTI Photon Nano", @@ -369,6 +501,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "photon-xavier-nx", + "__metadata": {} + } + ], "id": 176, "slug": "photon-xavier-nx", "name": "CTI Photon Xavier NX", @@ -385,6 +523,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "spacely-tx2", + "__metadata": {} + } + ], "id": 64, "slug": "spacely-tx2", "name": "CTI Spacely TX2", @@ -401,6 +545,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "cybertan-ze250", + "__metadata": {} + } + ], "id": 19, "slug": "cybertan-ze250", "name": "Cybertan ZE250", @@ -417,6 +567,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "ccimx8x-sbc-pro", + "__metadata": {} + } + ], "id": 185, "slug": "ccimx8x-sbc-pro", "name": "Digi ConnectCore 8X SBC Pro", @@ -433,6 +589,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "edge", + "__metadata": {} + } + ], "id": 20, "slug": "edge", "name": "Edge Device Builder", @@ -449,6 +611,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "etcher-pro", + "__metadata": {} + } + ], "id": 144, "slug": "etcher-pro", "name": "Etcher Pro", @@ -465,6 +633,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "firefly-rk3288", + "__metadata": {} + } + ], "id": 147, "slug": "firefly-rk3288", "name": "FireFly rk3288", @@ -481,6 +655,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "floyd-nano", + "__metadata": {} + } + ], "id": 192, "slug": "floyd-nano", "name": "Floyd Nano BB02A eMMC", @@ -497,6 +677,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic", + "__metadata": {} + } + ], "id": 22, "slug": "generic", "name": "Generic", @@ -513,6 +699,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic-aarch64", + "__metadata": {} + } + ], "id": 23, "slug": "generic-aarch64", "name": "Generic AARCH64", @@ -529,6 +721,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic-amd64", + "__metadata": {} + } + ], "id": 24, "slug": "generic-amd64", "name": "generic-amd64", @@ -545,6 +743,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic-armv7ahf", + "__metadata": {} + } + ], "id": 178, "slug": "generic-armv7ahf", "name": "Generic ARMv7-a HF", @@ -561,6 +765,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "genericx86-64-ext", + "__metadata": {} + } + ], "id": 145, "slug": "genericx86-64-ext", "name": "Generic x86_64", @@ -577,6 +787,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "hummingboard", + "__metadata": {} + } + ], "id": 25, "slug": "hummingboard", "name": "Hummingboard", @@ -593,6 +809,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx8mm-var-dart ", + "__metadata": {} + } + ], "id": 151, "slug": "imx8mm-var-dart ", "name": "imx8mm-var-dart ", @@ -609,6 +831,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "intel-edison", + "__metadata": {} + } + ], "id": 29, "slug": "intel-edison", "name": "Intel Edison", @@ -625,6 +853,16 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "intel-nuc", + "__metadata": {} + }, + { + "is_referenced_by__alias": "nuc", + "__metadata": {} + } + ], "id": 30, "slug": "intel-nuc", "name": "Intel NUC", @@ -641,6 +879,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "smarc-px30", + "__metadata": {} + } + ], "id": 186, "slug": "smarc-px30", "name": "I-Pi SMARC PX30 SD-CARD", @@ -657,6 +901,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "surface-pro-6", + "__metadata": {} + } + ], "id": 67, "slug": "surface-pro-6", "name": "Microsoft Surface 6", @@ -673,6 +923,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "surface-go", + "__metadata": {} + } + ], "id": 140, "slug": "surface-go", "name": "Microsoft Surface Go", @@ -689,6 +945,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nanopc-t4", + "__metadata": {} + } + ], "id": 40, "slug": "nanopc-t4", "name": "NanoPC-T4", @@ -705,6 +967,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nanopi-neo-air", + "__metadata": {} + } + ], "id": 41, "slug": "nanopi-neo-air", "name": "Nanopi Neo Air", @@ -721,6 +989,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nitrogen6x", + "__metadata": {} + } + ], "id": 42, "slug": "nitrogen6x", "name": "Nitrogen 6x", @@ -737,6 +1011,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nitrogen6xq2g", + "__metadata": {} + } + ], "id": 43, "slug": "nitrogen6xq2g", "name": "Nitrogen 6X Quad 2GB", @@ -753,6 +1033,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nitrogen8mm", + "__metadata": {} + } + ], "id": 44, "slug": "nitrogen8mm", "name": "Nitrogen8M Mini SBC", @@ -769,6 +1055,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "npe-x500-m3", + "__metadata": {} + } + ], "id": 45, "slug": "npe-x500-m3", "name": "NPE X500 M3", @@ -785,6 +1077,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "blackboard-tx2", + "__metadata": {} + } + ], "id": 16, "slug": "blackboard-tx2", "name": "Nvidia blackboard TX2", @@ -801,6 +1099,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-nano-2gb-devkit", + "__metadata": {} + } + ], "id": 188, "slug": "jetson-nano-2gb-devkit", "name": "Nvidia Jetson Nano 2GB Devkit SD", @@ -817,6 +1121,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-nano-emmc", + "__metadata": {} + } + ], "id": 158, "slug": "jetson-nano-emmc", "name": "Nvidia Jetson Nano eMMC", @@ -833,6 +1143,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-nano", + "__metadata": {} + } + ], "id": 32, "slug": "jetson-nano", "name": "Nvidia Jetson Nano SD-CARD", @@ -849,6 +1165,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-tx1", + "__metadata": {} + } + ], "id": 33, "slug": "jetson-tx1", "name": "Nvidia Jetson TX1", @@ -865,6 +1187,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-tx2", + "__metadata": {} + } + ], "id": 34, "slug": "jetson-tx2", "name": "Nvidia Jetson TX2", @@ -881,6 +1209,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-tx2-skycatch", + "__metadata": {} + } + ], "id": 35, "slug": "jetson-tx2-skycatch", "name": "Nvidia Jetson TX2 Skycatch (EXPERIMENTAL)", @@ -897,6 +1231,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-xavier", + "__metadata": {} + } + ], "id": 36, "slug": "jetson-xavier", "name": "Nvidia Jetson Xavier", @@ -913,6 +1253,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-xavier-nx-devkit-emmc", + "__metadata": {} + } + ], "id": 159, "slug": "jetson-xavier-nx-devkit-emmc", "name": "Nvidia Jetson Xavier NX Devkit eMMC", @@ -929,6 +1275,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-xavier-nx-devkit", + "__metadata": {} + } + ], "id": 181, "slug": "jetson-xavier-nx-devkit", "name": "Nvidia Jetson Xavier NX Devkit SD-CARD", @@ -945,6 +1297,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "odroid-c1", + "__metadata": {} + } + ], "id": 46, "slug": "odroid-c1", "name": "ODROID-C1+", @@ -961,6 +1319,20 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "odroid-u3+", + "__metadata": {} + }, + { + "is_referenced_by__alias": "odroid-ux3", + "__metadata": {} + }, + { + "is_referenced_by__alias": "odroid-xu4", + "__metadata": {} + } + ], "id": 47, "slug": "odroid-xu4", "name": "ODROID-XU4", @@ -977,6 +1349,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orange-pi-lite", + "__metadata": {} + } + ], "id": 48, "slug": "orange-pi-lite", "name": "Orange Pi Lite", @@ -993,6 +1371,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orange-pi-one", + "__metadata": {} + } + ], "id": 49, "slug": "orange-pi-one", "name": "Orange Pi One", @@ -1009,6 +1393,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orangepi-plus2", + "__metadata": {} + } + ], "id": 50, "slug": "orangepi-plus2", "name": "Orange Pi Plus2", @@ -1025,6 +1415,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orange-pi-zero", + "__metadata": {} + } + ], "id": 51, "slug": "orange-pi-zero", "name": "Orange Pi Zero", @@ -1041,6 +1437,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "parallella", + "__metadata": {} + } + ], "id": 53, "slug": "parallella", "name": "Parallella", @@ -1057,6 +1459,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-pocket", + "__metadata": {} + } + ], "id": 15, "slug": "beaglebone-pocket", "name": "PocketBeagle", @@ -1073,6 +1481,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "qemux86", + "__metadata": {} + } + ], "id": 54, "slug": "qemux86", "name": "QEMU X86 32bit", @@ -1089,6 +1503,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "qemux86-64", + "__metadata": {} + } + ], "id": 55, "slug": "qemux86-64", "name": "QEMU X86 64bit", @@ -1105,6 +1525,16 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi2", + "__metadata": {} + }, + { + "is_referenced_by__alias": "raspberry-pi2", + "__metadata": {} + } + ], "id": 57, "slug": "raspberry-pi2", "name": "Raspberry Pi 2", @@ -1121,6 +1551,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi3", + "__metadata": {} + } + ], "id": 58, "slug": "raspberrypi3", "name": "Raspberry Pi 3", @@ -1137,6 +1573,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi3-64", + "__metadata": {} + } + ], "id": 59, "slug": "raspberrypi3-64", "name": "Raspberry Pi 3 (using 64bit OS)", @@ -1153,6 +1595,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi400-64", + "__metadata": {} + } + ], "id": 183, "slug": "raspberrypi400-64", "name": "Raspberry Pi 400", @@ -1169,6 +1617,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi4-64", + "__metadata": {} + } + ], "id": 60, "slug": "raspberrypi4-64", "name": "Raspberry Pi 4 (using 64bit OS)", @@ -1185,6 +1639,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypicm4-ioboard", + "__metadata": {} + } + ], "id": 191, "slug": "raspberrypicm4-ioboard", "name": "Raspberry Pi CM4 IO Board", @@ -1201,6 +1661,16 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi", + "__metadata": {} + }, + { + "is_referenced_by__alias": "raspberry-pi", + "__metadata": {} + } + ], "id": 56, "slug": "raspberry-pi", "name": "Raspberry Pi (v1 / Zero / Zero W)", @@ -1217,6 +1687,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "revpi-connect", + "__metadata": {} + } + ], "id": 163, "slug": "revpi-connect", "name": "Revolution Pi Connect", @@ -1233,6 +1709,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "revpi-core-3", + "__metadata": {} + } + ], "id": 61, "slug": "revpi-core-3", "name": "Revolution Pi Core 3", @@ -1249,6 +1731,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "kitra520", + "__metadata": {} + } + ], "id": 37, "slug": "kitra520", "name": "RushUp Kitra 520", @@ -1265,6 +1753,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "kitra710", + "__metadata": {} + } + ], "id": 38, "slug": "kitra710", "name": "RushUp Kitra 710", @@ -1281,6 +1775,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik10", + "__metadata": {} + } + ], "id": 3, "slug": "artik10", "name": "Samsung Artik 10", @@ -1297,6 +1797,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik5", + "__metadata": {} + } + ], "id": 4, "slug": "artik5", "name": "Samsung Artik 520", @@ -1313,6 +1819,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik530", + "__metadata": {} + } + ], "id": 5, "slug": "artik530", "name": "Samsung Artik 530", @@ -1329,6 +1841,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik533s", + "__metadata": {} + } + ], "id": 6, "slug": "artik533s", "name": "Samsung Artik 530s 1G", @@ -1345,6 +1863,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik710", + "__metadata": {} + } + ], "id": 7, "slug": "artik710", "name": "Samsung Artik 710", @@ -1361,6 +1885,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "iot2000", + "__metadata": {} + } + ], "id": 31, "slug": "iot2000", "name": "Siemens IOT2000", @@ -1377,6 +1907,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "skx2", + "__metadata": {} + } + ], "id": 62, "slug": "skx2", "name": "SKX2", @@ -1393,6 +1929,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "ts4900", + "__metadata": {} + } + ], "id": 68, "slug": "ts4900", "name": "Technologic TS-4900", @@ -1409,6 +1951,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "ts7700", + "__metadata": {} + } + ], "id": 69, "slug": "ts7700", "name": "Technologic TS-7700", @@ -1425,6 +1973,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-board", + "__metadata": {} + } + ], "id": 70, "slug": "up-board", "name": "UP Board", @@ -1446,6 +2000,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-core", + "__metadata": {} + } + ], "id": 71, "slug": "up-core", "name": "UP Core", @@ -1467,6 +2027,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-core-plus", + "__metadata": {} + } + ], "id": 72, "slug": "up-core-plus", "name": "UP Core Plus", @@ -1488,6 +2054,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-squared", + "__metadata": {} + } + ], "id": 73, "slug": "up-squared", "name": "UP Squared", @@ -1509,6 +2081,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx6ul-var-dart", + "__metadata": {} + } + ], "id": 26, "slug": "imx6ul-var-dart", "name": "Variscite DART-6UL", @@ -1525,6 +2103,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx8m-var-dart", + "__metadata": {} + } + ], "id": 28, "slug": "imx8m-var-dart", "name": "Variscite DART-MX8M", @@ -1541,6 +2125,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx8mm-var-dart", + "__metadata": {} + } + ], "id": 150, "slug": "imx8mm-var-dart", "name": "Variscite DART-MX8M Mini", @@ -1557,6 +2147,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "var-som-mx6", + "__metadata": {} + } + ], "id": 74, "slug": "var-som-mx6", "name": "Variscite VAR-SOM-MX6", @@ -1573,6 +2169,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx7-var-som", + "__metadata": {} + } + ], "id": 27, "slug": "imx7-var-som", "name": "Variscite VAR-SOM-MX7", @@ -1589,6 +2191,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "via-vab820-quad", + "__metadata": {} + } + ], "id": 75, "slug": "via-vab820-quad", "name": "VIA VAB 820-quad", @@ -1605,6 +2213,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "zc702-zynq7", + "__metadata": {} + } + ], "id": 169, "slug": "zc702-zynq7", "name": "Zynq ZC702", @@ -1621,6 +2235,12 @@ "__metadata": {} } ], + "device_type_alias": [ + { + "is_referenced_by__alias": "zynq-xz702", + "__metadata": {} + } + ], "id": 76, "slug": "zynq-xz702", "name": "Zynq ZC702 (DISCONTINUED)",