diff --git a/emulators/google-compute/emulator_core/services/region.py b/emulators/google-compute/emulator_core/services/region.py index 76cced1..b867211 100644 --- a/emulators/google-compute/emulator_core/services/region.py +++ b/emulators/google-compute/emulator_core/services/region.py @@ -30,7 +30,8 @@ class Region: def to_dict(self) -> Dict[str, Any]: d: Dict[str, Any] = {} d["quotas"] = self.quotas - d["deprecated"] = self.deprecated + if self.deprecated: + d["deprecated"] = self.deprecated if self.creation_timestamp is not None and self.creation_timestamp != "": d["creationTimestamp"] = self.creation_timestamp if self.description is not None and self.description != "": @@ -45,7 +46,7 @@ def to_dict(self) -> Dict[str, Any]: if self.id is not None and self.id != "": d["id"] = self.id d["kind"] = "compute#region" - d["selfLink"] = f"https://www.googleapis.com/compute/v1/{self.name}" + d["selfLink"] = f"https://www.googleapis.com/compute/v1/projects/vera-project/regions/{self.name}" return d class Region_Backend: diff --git a/emulators/google-compute/emulator_core/services/zone.py b/emulators/google-compute/emulator_core/services/zone.py index f5896b4..6e5d8cf 100644 --- a/emulators/google-compute/emulator_core/services/zone.py +++ b/emulators/google-compute/emulator_core/services/zone.py @@ -39,11 +39,12 @@ def to_dict(self) -> Dict[str, Any]: d["status"] = self.status if self.id is not None and self.id != "": d["id"] = self.id - d["deprecated"] = self.deprecated + if self.deprecated: + d["deprecated"] = self.deprecated d["supportsPzs"] = self.supports_pzs d["availableCpuPlatforms"] = self.available_cpu_platforms d["kind"] = "compute#zone" - d["selfLink"] = f"https://www.googleapis.com/compute/v1/{self.name}" + d["selfLink"] = f"https://www.googleapis.com/compute/v1/projects/vera-project/zones/{self.name}" return d class Zone_Backend: diff --git a/emulators/google-compute/main.py b/emulators/google-compute/main.py index e362eb9..4f955da 100644 --- a/emulators/google-compute/main.py +++ b/emulators/google-compute/main.py @@ -89,28 +89,33 @@ # Static machine-type definitions (subset of real GCP types used in tests) _MACHINE_TYPES: Dict[str, Dict[str, Any]] = { - "n1-standard-1": {"guestCpus": 1, "memoryMb": 3840, "description": "1 vCPU, 3.75 GB RAM"}, - "n1-standard-2": {"guestCpus": 2, "memoryMb": 7680, "description": "2 vCPUs, 7.5 GB RAM"}, - "n1-standard-4": {"guestCpus": 4, "memoryMb": 15360, "description": "4 vCPUs, 15 GB RAM"}, - "e2-micro": {"guestCpus": 2, "memoryMb": 1024, "description": "2 vCPUs, 1 GB RAM"}, - "e2-small": {"guestCpus": 2, "memoryMb": 2048, "description": "2 vCPUs, 2 GB RAM"}, - "e2-medium": {"guestCpus": 2, "memoryMb": 4096, "description": "2 vCPUs, 4 GB RAM"}, - "e2-standard-2": {"guestCpus": 2, "memoryMb": 8192, "description": "2 vCPUs, 8 GB RAM"}, - "e2-standard-4": {"guestCpus": 4, "memoryMb": 16384, "description": "4 vCPUs, 16 GB RAM"}, - "n2-standard-2": {"guestCpus": 2, "memoryMb": 8192, "description": "2 vCPUs, 8 GB RAM"}, - "n2-standard-4": {"guestCpus": 4, "memoryMb": 16384, "description": "4 vCPUs, 16 GB RAM"}, + "n1-standard-1": {"id": "3001", "guestCpus": 1, "memoryMb": 3840, "imageSpaceGb": 10, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "1 vCPU, 3.75 GB RAM"}, + "n1-standard-2": {"id": "3002", "guestCpus": 2, "memoryMb": 7680, "imageSpaceGb": 10, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "2 vCPUs, 7.5 GB RAM"}, + "n1-standard-4": {"id": "3004", "guestCpus": 4, "memoryMb": 15360, "imageSpaceGb": 10, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "4 vCPUs, 15 GB RAM"}, + "e2-micro": {"id": "334002", "guestCpus": 2, "memoryMb": 1024, "imageSpaceGb": 0, "isSharedCpu": True, "maximumPersistentDisks": 16, "maximumPersistentDisksSizeGb": "3072", "description": "Efficient Instance, 2 vCPU (1/8 shared physical core) and 1 GB RAM"}, + "e2-small": {"id": "334003", "guestCpus": 2, "memoryMb": 2048, "imageSpaceGb": 0, "isSharedCpu": True, "maximumPersistentDisks": 16, "maximumPersistentDisksSizeGb": "3072", "description": "Efficient Instance, 2 vCPU (1/4 shared physical core) and 2 GB RAM"}, + "e2-medium": {"id": "334004", "guestCpus": 2, "memoryMb": 4096, "imageSpaceGb": 0, "isSharedCpu": True, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "Efficient Instance, 2 vCPU (1/2 shared physical core) and 4 GB RAM"}, + "e2-standard-2": {"id": "335002", "guestCpus": 2, "memoryMb": 8192, "imageSpaceGb": 0, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "Efficient Instance, 2 vCPUs, 8 GB RAM"}, + "e2-standard-4": {"id": "335004", "guestCpus": 4, "memoryMb": 16384, "imageSpaceGb": 0, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "Efficient Instance, 4 vCPUs, 16 GB RAM"}, + "n2-standard-2": {"id": "901002", "guestCpus": 2, "memoryMb": 8192, "imageSpaceGb": 0, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "2 vCPUs 8 GB RAM"}, + "n2-standard-4": {"id": "901004", "guestCpus": 4, "memoryMb": 16384, "imageSpaceGb": 0, "isSharedCpu": False, "maximumPersistentDisks": 128, "maximumPersistentDisksSizeGb": "263168", "description": "4 vCPUs 16 GB RAM"}, } def _make_machine_type_dict(name: str, zone: str, project: str = "vera-project") -> Dict[str, Any]: - info = _MACHINE_TYPES.get(name, {"guestCpus": 1, "memoryMb": 3840, "description": name}) + info = _MACHINE_TYPES.get(name, {"id": "0", "guestCpus": 1, "memoryMb": 3840, "description": name}) return { "kind": "compute#machineType", - "id": str(abs(hash(name)) % (10**15)), + "id": info["id"], + "creationTimestamp": "1969-12-31T16:00:00.000-08:00", "name": name, "description": info["description"], "guestCpus": info["guestCpus"], "memoryMb": info["memoryMb"], + "imageSpaceGb": info["imageSpaceGb"], + "isSharedCpu": info["isSharedCpu"], + "maximumPersistentDisks": info["maximumPersistentDisks"], + "maximumPersistentDisksSizeGb": info["maximumPersistentDisksSizeGb"], "zone": zone, "selfLink": f"https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/machineTypes/{name}", } @@ -297,20 +302,124 @@ def _seed_defaults() -> None: description="Default network for the project", ) logger.info("Seeded default VPC network") + _CPU_PLATFORMS_AB = [ + "Ampere Altra", + "Intel Broadwell", + "Intel Cascade Lake", + "Intel Emerald Rapids", + "AMD Genoa", + "NVIDIA Grace", + "Intel Granite Rapids", + "Intel Haswell", + "Intel Ice Lake", + "Intel Ivy Bridge", + "Google Axion", + "AMD Milan", + "AMD Rome", + "Intel Sandy Bridge", + "Intel Sapphire Rapids", + "Intel Skylake", + "Google Axion", + "AMD Turin", + ] + _CPU_PLATFORMS_F = [ + "Ampere Altra", + "Intel Broadwell", + "Intel Cascade Lake", + "Intel Emerald Rapids", + "AMD Genoa", + "Intel Granite Rapids", + "Intel Haswell", + "Intel Ice Lake", + "Intel Ivy Bridge", + "Google Axion", + "AMD Milan", + "AMD Rome", + "Intel Sandy Bridge", + "Intel Sapphire Rapids", + "Intel Skylake", + "Google Axion", + "AMD Turin", + ] + _CPU_PLATFORMS_C = [ + "Intel Broadwell", + "Intel Cascade Lake", + "Intel Emerald Rapids", + "AMD Genoa", + "Intel Granite Rapids", + "Intel Haswell", + "Intel Ice Lake", + "Intel Ivy Bridge", + "Google Axion", + "AMD Milan", + "AMD Rome", + "Intel Sandy Bridge", + "Intel Sapphire Rapids", + "Intel Skylake", + "Google Axion", + "AMD Turin", + ] if "us-central1-a" not in state.zones: state.zones["us-central1-a"] = Zone( name="us-central1-a", region="us-central1", status="UP", description="us-central1-a", + creation_timestamp="1969-12-31T16:00:00.000-08:00", + id="2000", + supports_pzs=True, + available_cpu_platforms=_CPU_PLATFORMS_AB, ) logger.info("Seeded zone us-central1-a") + if "us-central1-b" not in state.zones: + state.zones["us-central1-b"] = Zone( + name="us-central1-b", + region="us-central1", + status="UP", + description="us-central1-b", + creation_timestamp="1969-12-31T16:00:00.000-08:00", + id="2001", + supports_pzs=True, + available_cpu_platforms=_CPU_PLATFORMS_AB, + ) + logger.info("Seeded zone us-central1-b") + if "us-central1-c" not in state.zones: + state.zones["us-central1-c"] = Zone( + name="us-central1-c", + region="us-central1", + status="UP", + description="us-central1-c", + creation_timestamp="1969-12-31T16:00:00.000-08:00", + id="2002", + supports_pzs=True, + available_cpu_platforms=_CPU_PLATFORMS_C, + ) + logger.info("Seeded zone us-central1-c") + if "us-central1-f" not in state.zones: + state.zones["us-central1-f"] = Zone( + name="us-central1-f", + region="us-central1", + status="UP", + description="us-central1-f", + creation_timestamp="1969-12-31T16:00:00.000-08:00", + id="2004", + supports_pzs=False, + available_cpu_platforms=_CPU_PLATFORMS_F, + ) + logger.info("Seeded zone us-central1-f") if "us-central1" not in state.regions: state.regions["us-central1"] = Region( name="us-central1", status="UP", description="us-central1", - zones=["https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a"], + zones=[ + "https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a", + "https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-b", + "https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-c", + "https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-f", + ], + creation_timestamp="1969-12-31T16:00:00.000-08:00", + id="1000", ) logger.info("Seeded region us-central1") diff --git a/emulators/google-compute/tests/cli/gcp_commands.json b/emulators/google-compute/tests/cli/gcp_commands.json index b8b35d7..a33d838 100644 --- a/emulators/google-compute/tests/cli/gcp_commands.json +++ b/emulators/google-compute/tests/cli/gcp_commands.json @@ -4,13 +4,13 @@ "cmd": "gcpcli zones list --format=json", "use_id": false, "use_file": false, - "output": "[{\"name\": \"us-central1-a\", \"status\": \"UP\", \"id\": \"2000\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\"}]" + "output": "[{\"region\": \"us-central1\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"us-central1-a\", \"description\": \"us-central1-a\", \"status\": \"UP\", \"id\": \"2000\", \"supportsPzs\": true, \"availableCpuPlatforms\": [\"Ampere Altra\", \"Intel Broadwell\", \"Intel Cascade Lake\", \"Intel Emerald Rapids\", \"AMD Genoa\", \"NVIDIA Grace\", \"Intel Granite Rapids\", \"Intel Haswell\", \"Intel Ice Lake\", \"Intel Ivy Bridge\", \"Google Axion\", \"AMD Milan\", \"AMD Rome\", \"Intel Sandy Bridge\", \"Intel Sapphire Rapids\", \"Intel Skylake\", \"Google Axion\", \"AMD Turin\"], \"kind\": \"compute#zone\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a\"}, {\"region\": \"us-central1\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"us-central1-b\", \"description\": \"us-central1-b\", \"status\": \"UP\", \"id\": \"2001\", \"supportsPzs\": true, \"availableCpuPlatforms\": [\"Ampere Altra\", \"Intel Broadwell\", \"Intel Cascade Lake\", \"Intel Emerald Rapids\", \"AMD Genoa\", \"NVIDIA Grace\", \"Intel Granite Rapids\", \"Intel Haswell\", \"Intel Ice Lake\", \"Intel Ivy Bridge\", \"Google Axion\", \"AMD Milan\", \"AMD Rome\", \"Intel Sandy Bridge\", \"Intel Sapphire Rapids\", \"Intel Skylake\", \"Google Axion\", \"AMD Turin\"], \"kind\": \"compute#zone\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-b\"}, {\"region\": \"us-central1\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"us-central1-c\", \"description\": \"us-central1-c\", \"status\": \"UP\", \"id\": \"2002\", \"supportsPzs\": true, \"availableCpuPlatforms\": [\"Intel Broadwell\", \"Intel Cascade Lake\", \"Intel Emerald Rapids\", \"AMD Genoa\", \"Intel Granite Rapids\", \"Intel Haswell\", \"Intel Ice Lake\", \"Intel Ivy Bridge\", \"Google Axion\", \"AMD Milan\", \"AMD Rome\", \"Intel Sandy Bridge\", \"Intel Sapphire Rapids\", \"Intel Skylake\", \"Google Axion\", \"AMD Turin\"], \"kind\": \"compute#zone\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-c\"}, {\"region\": \"us-central1\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"us-central1-f\", \"description\": \"us-central1-f\", \"status\": \"UP\", \"id\": \"2004\", \"supportsPzs\": false, \"availableCpuPlatforms\": [\"Ampere Altra\", \"Intel Broadwell\", \"Intel Cascade Lake\", \"Intel Emerald Rapids\", \"AMD Genoa\", \"Intel Granite Rapids\", \"Intel Haswell\", \"Intel Ice Lake\", \"Intel Ivy Bridge\", \"Google Axion\", \"AMD Milan\", \"AMD Rome\", \"Intel Sandy Bridge\", \"Intel Sapphire Rapids\", \"Intel Skylake\", \"Google Axion\", \"AMD Turin\"], \"kind\": \"compute#zone\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-f\"}]" }, { "cmd": "gcpcli zones describe us-central1-a --format=json", "use_id": false, "use_file": false, - "output": "{\"name\": \"us-central1-a\", \"status\": \"UP\", \"id\": \"2000\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\"}" + "output": "{\"region\": \"us-central1\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"us-central1-a\", \"description\": \"us-central1-a\", \"status\": \"UP\", \"id\": \"2000\", \"supportsPzs\": true, \"availableCpuPlatforms\": [\"Ampere Altra\", \"Intel Broadwell\", \"Intel Cascade Lake\", \"Intel Emerald Rapids\", \"AMD Genoa\", \"NVIDIA Grace\", \"Intel Granite Rapids\", \"Intel Haswell\", \"Intel Ice Lake\", \"Intel Ivy Bridge\", \"Google Axion\", \"AMD Milan\", \"AMD Rome\", \"Intel Sandy Bridge\", \"Intel Sapphire Rapids\", \"Intel Skylake\", \"Google Axion\", \"AMD Turin\"], \"kind\": \"compute#zone\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a\"}" } ], "tests/cli/compute/regions.rst": [ @@ -18,13 +18,13 @@ "cmd": "gcpcli regions list --format=json", "use_id": false, "use_file": false, - "output": "[{\"name\": \"us-central1\", \"status\": \"UP\", \"id\": \"1000\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\"}]" + "output": "[{\"quotas\": [], \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"description\": \"us-central1\", \"quotaStatusWarning\": {}, \"name\": \"us-central1\", \"zones\": [\"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a\", \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-b\", \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-c\", \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-f\"], \"supportsPzs\": false, \"status\": \"UP\", \"id\": \"1000\", \"kind\": \"compute#region\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/regions/us-central1\"}]" }, { "cmd": "gcpcli regions describe us-central1 --format=json", "use_id": false, "use_file": false, - "output": "{\"name\": \"us-central1\", \"status\": \"UP\", \"id\": \"1000\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\"}" + "output": "{\"quotas\": [], \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"description\": \"us-central1\", \"quotaStatusWarning\": {}, \"name\": \"us-central1\", \"zones\": [\"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a\", \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-b\", \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-c\", \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-f\"], \"supportsPzs\": false, \"status\": \"UP\", \"id\": \"1000\", \"kind\": \"compute#region\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/regions/us-central1\"}" } ], "tests/cli/compute/machine-types.rst": [ @@ -32,13 +32,13 @@ "cmd": "gcpcli machine-types list --zones=us-central1-a --format=json", "use_id": false, "use_file": false, - "output": "[{\"name\": \"n1-standard-1\", \"guestCpus\": 1, \"memoryMb\": 3840, \"id\": \"3001\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"imageSpaceGb\": 10, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\"}]" + "output": "[{\"kind\": \"compute#machineType\", \"id\": \"3001\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"n1-standard-1\", \"description\": \"1 vCPU, 3.75 GB RAM\", \"guestCpus\": 1, \"memoryMb\": 3840, \"imageSpaceGb\": 10, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/n1-standard-1\"}, {\"kind\": \"compute#machineType\", \"id\": \"3002\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"n1-standard-2\", \"description\": \"2 vCPUs, 7.5 GB RAM\", \"guestCpus\": 2, \"memoryMb\": 7680, \"imageSpaceGb\": 10, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/n1-standard-2\"}, {\"kind\": \"compute#machineType\", \"id\": \"3004\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"n1-standard-4\", \"description\": \"4 vCPUs, 15 GB RAM\", \"guestCpus\": 4, \"memoryMb\": 15360, \"imageSpaceGb\": 10, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/n1-standard-4\"}, {\"kind\": \"compute#machineType\", \"id\": \"334002\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"e2-micro\", \"description\": \"Efficient Instance, 2 vCPU (1/8 shared physical core) and 1 GB RAM\", \"guestCpus\": 2, \"memoryMb\": 1024, \"imageSpaceGb\": 0, \"isSharedCpu\": true, \"maximumPersistentDisks\": 16, \"maximumPersistentDisksSizeGb\": \"3072\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/e2-micro\"}, {\"kind\": \"compute#machineType\", \"id\": \"334003\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"e2-small\", \"description\": \"Efficient Instance, 2 vCPU (1/4 shared physical core) and 2 GB RAM\", \"guestCpus\": 2, \"memoryMb\": 2048, \"imageSpaceGb\": 0, \"isSharedCpu\": true, \"maximumPersistentDisks\": 16, \"maximumPersistentDisksSizeGb\": \"3072\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/e2-small\"}, {\"kind\": \"compute#machineType\", \"id\": \"334004\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"e2-medium\", \"description\": \"Efficient Instance, 2 vCPU (1/2 shared physical core) and 4 GB RAM\", \"guestCpus\": 2, \"memoryMb\": 4096, \"imageSpaceGb\": 0, \"isSharedCpu\": true, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/e2-medium\"}, {\"kind\": \"compute#machineType\", \"id\": \"335002\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"e2-standard-2\", \"description\": \"Efficient Instance, 2 vCPUs, 8 GB RAM\", \"guestCpus\": 2, \"memoryMb\": 8192, \"imageSpaceGb\": 0, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/e2-standard-2\"}, {\"kind\": \"compute#machineType\", \"id\": \"335004\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"e2-standard-4\", \"description\": \"Efficient Instance, 4 vCPUs, 16 GB RAM\", \"guestCpus\": 4, \"memoryMb\": 16384, \"imageSpaceGb\": 0, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/e2-standard-4\"}, {\"kind\": \"compute#machineType\", \"id\": \"901002\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"n2-standard-2\", \"description\": \"2 vCPUs 8 GB RAM\", \"guestCpus\": 2, \"memoryMb\": 8192, \"imageSpaceGb\": 0, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/n2-standard-2\"}, {\"kind\": \"compute#machineType\", \"id\": \"901004\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"n2-standard-4\", \"description\": \"4 vCPUs 16 GB RAM\", \"guestCpus\": 4, \"memoryMb\": 16384, \"imageSpaceGb\": 0, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/n2-standard-4\"}]" }, { "cmd": "gcpcli machine-types describe n1-standard-1 --zone=us-central1-a --format=json", "use_id": false, "use_file": false, - "output": "{\"name\": \"n1-standard-1\", \"guestCpus\": 1, \"memoryMb\": 3840, \"id\": \"3001\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"imageSpaceGb\": 10, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\"}" + "output": "{\"kind\": \"compute#machineType\", \"id\": \"3001\", \"creationTimestamp\": \"1969-12-31T16:00:00.000-08:00\", \"name\": \"n1-standard-1\", \"description\": \"1 vCPU, 3.75 GB RAM\", \"guestCpus\": 1, \"memoryMb\": 3840, \"imageSpaceGb\": 10, \"isSharedCpu\": false, \"maximumPersistentDisks\": 128, \"maximumPersistentDisksSizeGb\": \"263168\", \"zone\": \"us-central1-a\", \"selfLink\": \"https://www.googleapis.com/compute/v1/projects/vera-project/zones/us-central1-a/machineTypes/n1-standard-1\"}" } ], "tests/cli/compute/networks.rst": [