Skip to content

Commit

Permalink
Merge pull request #229 from civo/random-distro
Browse files Browse the repository at this point in the history
avoid mentioning instance default distro
  • Loading branch information
uzaxirr authored Jan 10, 2025
2 parents 9bfd02e + 988a74c commit 3cef8ed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
6 changes: 0 additions & 6 deletions instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@ func (c *Client) NewInstanceConfig() (*InstanceConfig, error) {
return nil, decodeError(err)
}

diskimage, err := c.GetMostRecentDistro("ubuntu")
if err != nil {
return nil, decodeError(err)
}

return &InstanceConfig{
Count: 1,
Hostname: utils.RandomName(),
Expand All @@ -222,7 +217,6 @@ func (c *Client) NewInstanceConfig() (*InstanceConfig, error) {
Region: c.Region,
PublicIPRequired: "true",
NetworkID: network.ID,
TemplateID: diskimage.ID,
SnapshotID: "",
InitialUser: "civo",
SSHKeyID: "",
Expand Down
3 changes: 0 additions & 3 deletions instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ func TestNewInstanceConfig(t *testing.T) {
if got.NetworkID != "1" {
t.Errorf("Expected %s, got %s", "1", got.NetworkID)
}
if got.TemplateID != "77bea4dd-bfd4-492c-823d-f92eb6dd962d" {
t.Errorf("Expected %s, got %s", "77bea4dd-bfd4-492c-823d-f92eb6dd962d", got.TemplateID)
}
if got.Count != 1 {
t.Errorf("Expected %d, got %d", 1, got.Count)
}
Expand Down

0 comments on commit 3cef8ed

Please sign in to comment.