test: update snapshot workflow for dual stack

go
codex 2 weeks ago
parent 8c76dd2ddb
commit ce4263217d

@ -247,13 +247,33 @@ namespace {
$instance->network_status = 'active';
$instance->expires_at = null;
$instance->spec_json = json_encode([
'managed' => true,
'template_id' => 'debian-12', 'os_source' => 'cloud_template',
'os_name' => 'Debian 12', 'login_name' => 'root',
'guest_hostname' => 'snapshot-old',
'public_ip_cidr' => '192.0.2.10/24', 'region' => 'HKG',
'public_network' => [
'contract' => 1,
'network_selector' => 'bridge:br0',
'ipv4' => [
'pool_key' => str_repeat('1', 32),
'pool_cidr' => '8.8.8.0/24',
'address_cidr' => '8.8.8.10/24',
'gateway' => '8.8.8.1',
'gateway_on_link' => false,
],
'ipv6' => [
'pool_key' => str_repeat('2', 32),
'pool_cidr' => '2404:c140:156:3a::/64',
'address_cidr' => '2404:c140:156:3a::10/64',
'gateway' => '2404:c140:156::1',
'gateway_on_link' => true,
],
'dns_servers' => ['1.1.1.1', '2606:4700:4700::1111'],
],
'region' => 'HKG',
'vcpu' => 2, 'memory_mib' => 2048, 'disk_gib' => 40,
'agent_metadata_version' => 1,
], JSON_THROW_ON_ERROR);
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES);
$instance->sealed_credential = CloudSecrets::encrypt([
'password' => 'old-password', 'login_name' => 'root',
], 'instance-credential');

Loading…
Cancel
Save