Skip to content

Commit 8cbc8bc

Browse files
authored
Merge pull request #37 from UpCloudLtd/change-zone
Change zone from hel1 to hel2
2 parents a3d7aab + 78ffcd3 commit 8cbc8bc

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Since the request for creating a new server is asynchronous, the server will rep
112112
```go
113113
// Create the server
114114
serverDetails, err := svc.CreateServer(&request.CreateServerRequest{
115-
Zone: "fi-hel1",
115+
Zone: "fi-hel2",
116116
Title: "My new server",
117117
Hostname: "server.example.com",
118118
PasswordDelivery: request.PasswordDeliveryNone,

upcloud/ip_address_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func TestUnmarshalIPAddresses(t *testing.T) {
1414
<access>public</access>
1515
<address>2a04:3540:1000:310:6069:7bff:fe96:71d1</address>
1616
<family>IPv6</family>
17-
<ptr_record>6069-7bff-fe96-71d1.v6.fi-hel1.host.upcloud.com</ptr_record>
17+
<ptr_record>6069-7bff-fe96-71d1.v6.fi-hel2.host.upcloud.com</ptr_record>
1818
<server>0000acd1-06aa-4453-865c-fedb3f02a6a1</server>
1919
</ip_address>
2020
<ip_address>
@@ -29,7 +29,7 @@ func TestUnmarshalIPAddresses(t *testing.T) {
2929
<address>94.237.32.40</address>
3030
<family>IPv4</family>
3131
<part_of_plan>yes</part_of_plan>
32-
<ptr_record>94-237-32-40.fi-hel1.host.upcloud.com</ptr_record>
32+
<ptr_record>94-237-32-40.fi-hel2.host.upcloud.com</ptr_record>
3333
<server>0000acd1-06aa-4453-865c-fedb3f02a6a1</server>
3434
</ip_address>
3535
</ip_addresses>`
@@ -43,6 +43,6 @@ func TestUnmarshalIPAddresses(t *testing.T) {
4343
assert.Equal(t, IPAddressAccessPublic, firstAddress.Access)
4444
assert.Equal(t, "2a04:3540:1000:310:6069:7bff:fe96:71d1", firstAddress.Address)
4545
assert.Equal(t, IPAddressFamilyIPv6, firstAddress.Family)
46-
assert.Equal(t, "6069-7bff-fe96-71d1.v6.fi-hel1.host.upcloud.com", firstAddress.PTRRecord)
46+
assert.Equal(t, "6069-7bff-fe96-71d1.v6.fi-hel2.host.upcloud.com", firstAddress.PTRRecord)
4747
assert.Equal(t, "0000acd1-06aa-4453-865c-fedb3f02a6a1", firstAddress.ServerUUID)
4848
}

upcloud/price_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestUmarshalPriceZones(t *testing.T) {
114114
<amount>1</amount>
115115
<price>0</price>
116116
</ipv6_address>
117-
<name>fi-hel1</name>
117+
<name>fi-hel2</name>
118118
<public_ipv4_bandwidth_in>
119119
<amount>1</amount>
120120
<price>0</price>

upcloud/request/server_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestGetServerDetailsRequest(t *testing.T) {
2020
// TestCreateServerRequest tests that CreateServerRequest objects behave correctly
2121
func TestCreateServerRequest(t *testing.T) {
2222
request := CreateServerRequest{
23-
Zone: "fi-hel1",
23+
Zone: "fi-hel2",
2424
Title: "Integration test server #1",
2525
Hostname: "debian.example.com",
2626
PasswordDelivery: PasswordDeliveryNone,
@@ -56,7 +56,7 @@ func TestCreateServerRequest(t *testing.T) {
5656
},
5757
}
5858

59-
expectedXML := "<server><hostname>debian.example.com</hostname><ip_addresses><ip_address><access>private</access><family>IPv4</family></ip_address><ip_address><access>public</access><family>IPv4</family></ip_address><ip_address><access>public</access><family>IPv6</family></ip_address></ip_addresses><login_user><create_password>no</create_password><ssh_keys><ssh_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWf2MmpHweXCNUcW91PWZR5UqOkydBr1Gi1xDI16IW4JndMYkH9OF0sWvPz03kfY6NbcHY0bed1Q8BpAC//WfLltuvjrzk33IoFJZ2Ai+4fVdkevkf7pBeSvzdXSyKAT+suHrp/2Qu5hewIUdDCp+znkwyypIJ/C2hDphwbLR3QquOfn6KyKMPZC4my8dFvLxESI0UqeripaBHUGcvNG2LL563hXmWzUu/cyqCpg5IBzpj/ketg8m1KBO7U0dimIAczuxfHk3kp9bwOFquWA2vSFNuVkr8oavk36pHkU88qojYNEy/zUTINE0w6CE/EbDkQVDZEGgDtAkq4jL+4MPV negge@palinski</ssh_key><ssh_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJfx4OmD8D6mnPA0BPk2DVlbggEkMvB2cecSttauZuaYX7Vju6PvG+kXrUbTvO09oLQMoNYAk3RinqQLXo9eF7bzZIsgB4ZmKGau84kOpYjguhimkKtZiVTKF53G2pbnpiZUN9wfy3xK2mt/MkacjZ1Tp7lAgRGTfWDoTfQa88kzOJGNPWXd12HIvFtd/1KoS9vm5O0nDLV+5zSBLxEYNDmBlIGu1Y3XXle5ygL1BhfGvqOQnv/TdRZcrOgVGWHADvwEid91/+IycLNMc37uP7TdS6vOihFBMytfmFXAqt4+3AzYNmyc+R392RorFzobZ1UuEFm3gUod2Wvj8pY8d/ negge@palinski</ssh_key></ssh_keys></login_user><password_delivery>none</password_delivery><storage_devices><storage_device><action>clone</action><storage>01000000-0000-4000-8000-000030060200</storage><title>disk1</title><size>30</size><tier>maxiops</tier></storage_device></storage_devices><title>Integration test server #1</title><zone>fi-hel1</zone></server>"
59+
expectedXML := "<server><hostname>debian.example.com</hostname><ip_addresses><ip_address><access>private</access><family>IPv4</family></ip_address><ip_address><access>public</access><family>IPv4</family></ip_address><ip_address><access>public</access><family>IPv6</family></ip_address></ip_addresses><login_user><create_password>no</create_password><ssh_keys><ssh_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWf2MmpHweXCNUcW91PWZR5UqOkydBr1Gi1xDI16IW4JndMYkH9OF0sWvPz03kfY6NbcHY0bed1Q8BpAC//WfLltuvjrzk33IoFJZ2Ai+4fVdkevkf7pBeSvzdXSyKAT+suHrp/2Qu5hewIUdDCp+znkwyypIJ/C2hDphwbLR3QquOfn6KyKMPZC4my8dFvLxESI0UqeripaBHUGcvNG2LL563hXmWzUu/cyqCpg5IBzpj/ketg8m1KBO7U0dimIAczuxfHk3kp9bwOFquWA2vSFNuVkr8oavk36pHkU88qojYNEy/zUTINE0w6CE/EbDkQVDZEGgDtAkq4jL+4MPV negge@palinski</ssh_key><ssh_key>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJfx4OmD8D6mnPA0BPk2DVlbggEkMvB2cecSttauZuaYX7Vju6PvG+kXrUbTvO09oLQMoNYAk3RinqQLXo9eF7bzZIsgB4ZmKGau84kOpYjguhimkKtZiVTKF53G2pbnpiZUN9wfy3xK2mt/MkacjZ1Tp7lAgRGTfWDoTfQa88kzOJGNPWXd12HIvFtd/1KoS9vm5O0nDLV+5zSBLxEYNDmBlIGu1Y3XXle5ygL1BhfGvqOQnv/TdRZcrOgVGWHADvwEid91/+IycLNMc37uP7TdS6vOihFBMytfmFXAqt4+3AzYNmyc+R392RorFzobZ1UuEFm3gUod2Wvj8pY8d/ negge@palinski</ssh_key></ssh_keys></login_user><password_delivery>none</password_delivery><storage_devices><storage_device><action>clone</action><storage>01000000-0000-4000-8000-000030060200</storage><title>disk1</title><size>30</size><tier>maxiops</tier></storage_device></storage_devices><title>Integration test server #1</title><zone>fi-hel2</zone></server>"
6060
actualXML, err := xml.Marshal(&request)
6161
assert.Nil(t, err)
6262
assert.Equal(t, expectedXML, string(actualXML))

upcloud/request/storage_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ func TestCreateStorageRequest(t *testing.T) {
3737
Tier: upcloud.StorageTierMaxIOPS,
3838
Title: "Test storage",
3939
Size: 10,
40-
Zone: "fi-hel1",
40+
Zone: "fi-hel2",
4141
BackupRule: &upcloud.BackupRule{
4242
Interval: upcloud.BackupRuleIntervalDaily,
4343
Time: "0430",
4444
Retention: 30,
4545
},
4646
}
4747

48-
expectedXML := "<storage><size>10</size><tier>maxiops</tier><title>Test storage</title><zone>fi-hel1</zone><backup_rule><interval>daily</interval><time>0430</time><retention>30</retention></backup_rule></storage>"
48+
expectedXML := "<storage><size>10</size><tier>maxiops</tier><title>Test storage</title><zone>fi-hel2</zone><backup_rule><interval>daily</interval><time>0430</time><retention>30</retention></backup_rule></storage>"
4949
actualXML, err := xml.Marshal(&request)
5050
assert.Nil(t, err)
5151
assert.Equal(t, expectedXML, string(actualXML))
@@ -110,11 +110,11 @@ func TestCloneStorageRequest(t *testing.T) {
110110
request := CloneStorageRequest{
111111
UUID: "foo",
112112
Title: "Cloned storage",
113-
Zone: "fi-hel1",
113+
Zone: "fi-hel2",
114114
Tier: upcloud.StorageTierMaxIOPS,
115115
}
116116

117-
expectedXML := "<storage><zone>fi-hel1</zone><tier>maxiops</tier><title>Cloned storage</title></storage>"
117+
expectedXML := "<storage><zone>fi-hel2</zone><tier>maxiops</tier><title>Cloned storage</title></storage>"
118118
actualXML, err := xml.Marshal(&request)
119119
assert.Nil(t, err)
120120
assert.Equal(t, expectedXML, string(actualXML))

upcloud/service/service_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func TestCloneStorage(t *testing.T) {
274274
clonedStorageDetails, err := svc.CloneStorage(&request.CloneStorageRequest{
275275
UUID: storageDetails.UUID,
276276
Title: "Cloned storage",
277-
Zone: "fi-hel1",
277+
Zone: "fi-hel2",
278278
Tier: upcloud.StorageTierMaxIOPS,
279279
})
280280

@@ -607,7 +607,7 @@ func createServer(name string) *upcloud.ServerDetails {
607607
hostname := strings.ToLower(title + ".example.com")
608608

609609
createServerRequest := request.CreateServerRequest{
610-
Zone: "fi-hel1",
610+
Zone: "fi-hel2",
611611
Title: title,
612612
Hostname: hostname,
613613
PasswordDelivery: request.PasswordDeliveryNone,
@@ -689,7 +689,7 @@ func createStorage() *upcloud.StorageDetails {
689689
Tier: upcloud.StorageTierMaxIOPS,
690690
Title: "Test storage",
691691
Size: 10,
692-
Zone: "fi-hel1",
692+
Zone: "fi-hel2",
693693
BackupRule: &upcloud.BackupRule{
694694
Interval: upcloud.BackupRuleIntervalDaily,
695695
Time: "0430",

upcloud/zone_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ func TestUnmarshalZones(t *testing.T) {
1515
<id>de-fra1</id>
1616
</zone>
1717
<zone>
18-
<description>Helsinki #1</description>
19-
<id>fi-hel1</id>
18+
<description>Helsinki #2</description>
19+
<id>fi-hel2</id>
2020
</zone>
2121
<zone>
2222
<description>London #1</description>

0 commit comments

Comments
 (0)