Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRITON-2469 Update joyent links to TritonDataCenter #201

Open
wants to merge 18 commits into
base: v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ We also now add support for using `SDC_*` and `TRITON_*` env vars when working w
connections per host, total of 10x connections per client.
- Expose an optional Headers attribute to clients to allow them to customize
HTTP headers when making Object requests.
- Fix a bug in Directory ListIndex [#69](https://github.com/joyent/issues/69)
- Fix a bug in Directory ListIndex [#69](https://github.com/TritonDataCenter/issues/69)
- Inputs to Object inputs have been relaxed to `io.Reader` (formerly a
`io.ReadSeeker`) [#73](https://github.com/joyent/issues/73).
- Add support for ForceDelete of all children of a directory [#71](https://github.com/joyent/issues/71)
- storage: Introduce `Objects.GetInfo` and `Objects.IsDir` using HEAD requests [#74](https://github.com/joyent/triton-go/issues/74)
`io.ReadSeeker`) [#73](https://github.com/TritonDataCenter/issues/73).
- Add support for ForceDelete of all children of a directory [#71](https://github.com/TritonDataCenter/issues/71)
- storage: Introduce `Objects.GetInfo` and `Objects.IsDir` using HEAD requests [#74](https://github.com/TritonDataCenter/triton-go/issues/74)

## 0.2.1 (November 8 2017)

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# triton-go

`triton-go` is a client SDK for Go applications using Joyent's Triton Compute
`triton-go` is a client SDK for Go applications using Triton Compute
and Object Storage (Manta) APIs.

The Triton Go SDK is used in the following open source projects.
Expand All @@ -10,8 +10,8 @@ The Triton Go SDK is used in the following open source projects.
- [Vault](http://github.com/hashicorp/vault)
- [Terraform](http://github.com/hashicorp/terraform)
- [Terraform Triton Provider](https://github.com/terraform-providers/terraform-provider-triton)
- [Docker Machine](https://github.com/joyent/docker-machine-driver-triton)
- [Triton Kubernetes](https://github.com/joyent/triton-kubernetes)
- [Docker Machine](https://github.com/TritonDataCenter/docker-machine-driver-triton)
- [Triton Kubernetes](https://github.com/TritonDataCenter/triton-kubernetes)
- [HashiCorp go-discover](https://github.com/hashicorp/go-discover)

## Usage
Expand Down Expand Up @@ -89,15 +89,15 @@ is performed using the [pkg/errors][7] library.

Acceptance Tests run directly against the Triton API (e.g. CloudAPI), so you
will need an installation of Triton in order to run them, or
[COAL](https://github.com/joyent/triton/blob/master/docs/developer-guide/coal-setup.md)
[COAL](https://github.com/TritonDataCenter/triton/blob/master/docs/developer-guide/coal-setup.md)
(Cloud On A Laptop). The tests create real resources and thus could cost real
money if you are using a paid Triton account! It is also possible that the
acceptance tests will leave behind resources, so extra attention will be needed
to clean up these test resources.

The acceptance tests depend upon a few things in your Triton setup:

- the [Ubuntu 16.04](https://docs.joyent.com/public-cloud/instances/virtual-machines/images/linux/ubuntu-certified#1604-xenial-images) LX image to be installed
- the [Ubuntu 16.04](https://docs.tritondatacenter.com/public-cloud/instances/virtual-machines/images/linux/ubuntu-certified#1604-xenial-images) LX image to be installed
- a generic package with Memory in the range of 128MB to 1024MB
- a public (external) network to provision with
- if your Triton setup is used for testing - then running
Expand Down Expand Up @@ -131,7 +131,7 @@ The verbose output has been removed for brevity here.
```
$ HTTP_PROXY=http://localhost:8888 \
TRITON_TEST=1 \
TRITON_URL=https://us-sw-1.api.joyent.com \
TRITON_URL=https://us-central-1.api.mnx.io \
TRITON_ACCOUNT=AccountName \
TRITON_KEY_ID=a4:c6:f3:75:80:27:e0:03:a9:98:79:ef:c5:0a:06:11 \
go test -v -run "TestAccKey"
Expand All @@ -142,7 +142,7 @@ $ HTTP_PROXY=http://localhost:8888 \
=== RUN TestAccKey_Delete
--- PASS: TestAccKey_Delete (15.08s)
PASS
ok github.com/joyent/triton-go 31.861s
ok github.com/TritonDataCenter/triton-go 31.861s
```

## Example API
Expand Down Expand Up @@ -173,9 +173,9 @@ import (
"os"
"time"

triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/authentication"
"github.com/joyent/triton-go/compute"
triton "github.com/TritonDataCenter/triton-go"
"github.com/TritonDataCenter/triton-go/authentication"
"github.com/TritonDataCenter/triton-go/compute"
)

func main() {
Expand Down Expand Up @@ -259,7 +259,7 @@ func main() {

```

[4]: https://github.com/joyent/node-http-signature/blob/master/http_signing.md
[5]: https://godoc.org/github.com/joyent/triton-go/authentication
[6]: https://godoc.org/github.com/joyent/triton-go/authentication
[4]: https://github.com/TritonDataCenter/node-http-signature/blob/master/http_signing.md
[5]: https://godoc.org/github.com/TritonDataCenter/triton-go/authentication
[6]: https://godoc.org/github.com/TritonDataCenter/triton-go/authentication
[7]: https://github.com/pkg/errors
3 changes: 2 additions & 1 deletion account/account.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -15,7 +16,7 @@ import (
"path"
"time"

"github.com/joyent/triton-go/client"
"github.com/TritonDataCenter/triton-go/client"
"github.com/pkg/errors"
)

Expand Down
7 changes: 4 additions & 3 deletions account/account_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -16,9 +17,9 @@ import (
"strings"
"testing"

triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/account"
"github.com/joyent/triton-go/testutils"
triton "github.com/TritonDataCenter/triton-go"
"github.com/TritonDataCenter/triton-go/account"
"github.com/TritonDataCenter/triton-go/testutils"
"github.com/pkg/errors"
)

Expand Down
5 changes: 3 additions & 2 deletions account/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -11,8 +12,8 @@ package account
import (
"net/http"

triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/client"
triton "github.com/TritonDataCenter/triton-go"
"github.com/TritonDataCenter/triton-go/client"
)

type AccountClient struct {
Expand Down
3 changes: 2 additions & 1 deletion account/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -14,7 +15,7 @@ import (
"net/http"
"path"

"github.com/joyent/triton-go/client"
"github.com/TritonDataCenter/triton-go/client"
"github.com/pkg/errors"
)

Expand Down
7 changes: 4 additions & 3 deletions account/config_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -16,9 +17,9 @@ import (
"strings"
"testing"

triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/account"
"github.com/joyent/triton-go/testutils"
triton "github.com/TritonDataCenter/triton-go"
"github.com/TritonDataCenter/triton-go/account"
"github.com/TritonDataCenter/triton-go/testutils"
"github.com/pkg/errors"
)

Expand Down
3 changes: 2 additions & 1 deletion account/keys.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -14,7 +15,7 @@ import (
"net/http"
"path"

"github.com/joyent/triton-go/client"
"github.com/TritonDataCenter/triton-go/client"
"github.com/pkg/errors"
)

Expand Down
7 changes: 4 additions & 3 deletions account/keys_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -16,10 +17,10 @@ import (
"strings"
"testing"

triton "github.com/TritonDataCenter/triton-go"
"github.com/TritonDataCenter/triton-go/account"
"github.com/TritonDataCenter/triton-go/testutils"
"github.com/abdullin/seq"
triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/account"
"github.com/joyent/triton-go/testutils"
"github.com/pkg/errors"
)

Expand Down
15 changes: 8 additions & 7 deletions client/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright 2020 Joyent, Inc.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -23,10 +24,10 @@ import (
"strings"
"time"

triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/authentication"
"github.com/joyent/triton-go/errors"
tritonutils "github.com/joyent/triton-go/utils"
triton "github.com/TritonDataCenter/triton-go"
"github.com/TritonDataCenter/triton-go/authentication"
"github.com/TritonDataCenter/triton-go/errors"
tritonutils "github.com/TritonDataCenter/triton-go/utils"
pkgerrors "github.com/pkg/errors"
)

Expand All @@ -41,12 +42,12 @@ var (
InvalidDCInURL = "invalid data center in URL"

knownDCFormats = []string{
`https?://(.*).api.joyent.com`,
`https?://(.*).api.joyentcloud.com`,
`https?://(.*).api.samsungcloud.io`,
`https?://(.*).api.tritoncompute.cloud`,
`https?://(.*).api.mnx.io`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove samsung and tritoncompute.cloud. Honestly, the whole "short hand dc reference" should be eliminated entirely.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed. See comment below regarding removal of "short hand dc reference".

}

jpcFormatURL = "https://tsg.%s.svc.joyent.zone"
jpcFormatURL = "https://tsg.%s.svc.triton.zone"
spcFormatURL = "https://tsg.%s.svc.samsungcloud.zone"

tritonTransportHttpTraceChecked = false
Expand Down
9 changes: 5 additions & 4 deletions client/client_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -13,7 +14,7 @@ import (
"strings"
"testing"

auth "github.com/joyent/triton-go/authentication"
auth "github.com/TritonDataCenter/triton-go/authentication"
)

const BadURL = "**ftp://man($$"
Expand Down Expand Up @@ -85,11 +86,11 @@ gnfBQoS89m3aO035henSfRFKVJkHaEoasj8hB3pwl9FGZUJp1c2JxiKzONqZhyGa
}

func TestNew(t *testing.T) {
mantaURL := "https://us-east.manta.joyent.com"
mantaURL := "https://us-central.manta.mnx.io"
tsgEnv := "http://tsg.test.org"
jpcTritonURL := "https://us-east-1.api.joyent.com"
jpcTritonURL := "https://us-central-1.api.mnx.io"
spcTritonURL := "https://us-east-1.api.samsungcloud.io"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all SPC references entirely.

This entire section should be reworked to not use any pre-defined URLs. It should only work with user supplied run-time defined account information.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unit tests AFAICT. Would you like run-time defined account information for these?

jpcServiceURL := "https://tsg.us-east-1.svc.joyent.zone"
jpcServiceURL := "https://tsg.us-central-1.svc.triton.zone"
spcServiceURL := "https://tsg.us-east-1.svc.samsungcloud.zone"
privateInstallUrl := "https://myinstall.mycompany.com"

Expand Down
7 changes: 4 additions & 3 deletions cmd/agent/account/public.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -13,9 +14,9 @@ import (

"strconv"

"github.com/joyent/triton-go/account"
tac "github.com/joyent/triton-go/account"
"github.com/joyent/triton-go/cmd/config"
"github.com/TritonDataCenter/triton-go/account"
tac "github.com/TritonDataCenter/triton-go/account"
"github.com/TritonDataCenter/triton-go/cmd/config"
"github.com/pkg/errors"
)

Expand Down
7 changes: 4 additions & 3 deletions cmd/agent/compute/public.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (tcc) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -15,10 +16,10 @@ import (

"fmt"

"github.com/TritonDataCenter/triton-go/cmd/config"
tcc "github.com/TritonDataCenter/triton-go/compute"
terrors "github.com/TritonDataCenter/triton-go/errors"
"github.com/imdario/mergo"
"github.com/joyent/triton-go/cmd/config"
tcc "github.com/joyent/triton-go/compute"
terrors "github.com/joyent/triton-go/errors"
"github.com/pkg/errors"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/agent/compute/sortImages.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -11,7 +12,7 @@ package compute
import (
"sort"

"github.com/joyent/triton-go/compute"
"github.com/TritonDataCenter/triton-go/compute"
)

type imageSort []*compute.Image
Expand Down
3 changes: 2 additions & 1 deletion cmd/agent/compute/sortInstances.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -11,7 +12,7 @@ package compute
import (
"sort"

"github.com/joyent/triton-go/compute"
"github.com/TritonDataCenter/triton-go/compute"
)

type instanceSort []*compute.Instance
Expand Down
5 changes: 3 additions & 2 deletions cmd/agent/identity/public.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,8 +10,8 @@
package identity

import (
"github.com/joyent/triton-go/cmd/config"
"github.com/joyent/triton-go/identity"
"github.com/TritonDataCenter/triton-go/cmd/config"
"github.com/TritonDataCenter/triton-go/identity"
"github.com/pkg/errors"
)

Expand Down
5 changes: 3 additions & 2 deletions cmd/agent/network/public.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// Copyright (c) 2018, Joyent, Inc. All rights reserved.
// Copyright 2024 MNX Solutions, Inc.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,8 +10,8 @@
package network

import (
"github.com/joyent/triton-go/cmd/config"
"github.com/joyent/triton-go/network"
"github.com/TritonDataCenter/triton-go/cmd/config"
"github.com/TritonDataCenter/triton-go/network"
"github.com/pkg/errors"
)

Expand Down
Loading