Skip to content

Commit

Permalink
Using canonical/lxd
Browse files Browse the repository at this point in the history
  • Loading branch information
geaaru committed Mar 2, 2024
1 parent 1bf86e1 commit 6216b7d
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion pkg/executor/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

specs "github.com/MottainaiCI/lxd-compose/pkg/specs"

lxd_api "github.com/lxc/lxd/shared/api"
lxd_api "github.com/canonical/lxd/shared/api"
)

func (e *LxdCExecutor) GetAclList() ([]string, error) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/executor/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

"golang.org/x/sys/unix"

lxd "github.com/lxc/lxd/client"
lxd_api "github.com/lxc/lxd/shared/api"
"github.com/lxc/lxd/shared/termios"
lxd "github.com/canonical/lxd/client"
lxd_api "github.com/canonical/lxd/shared/api"
"github.com/canonical/lxd/shared/termios"
)

func (e *LxdCExecutor) RunCommandWithOutput(containerName, command string, envs map[string]string, outBuffer, errBuffer io.WriteCloser, entryPoint []string) (int, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package executor

import (
lxd_api "github.com/lxc/lxd/shared/api"
lxd_api "github.com/canonical/lxd/shared/api"
)

// Get the container data and the ETag
Expand Down
8 changes: 4 additions & 4 deletions pkg/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (

log "github.com/MottainaiCI/lxd-compose/pkg/logger"

lxd "github.com/lxc/lxd/client"
lxd_config "github.com/lxc/lxd/lxc/config"
lxd_api "github.com/lxc/lxd/shared/api"
lxd_cli "github.com/lxc/lxd/shared/cmd"
lxd "github.com/canonical/lxd/client"
lxd_config "github.com/canonical/lxd/lxc/config"
lxd_api "github.com/canonical/lxd/shared/api"
lxd_cli "github.com/canonical/lxd/shared/cmd"
)

type LxdCExecutor struct {
Expand Down
16 changes: 8 additions & 8 deletions pkg/executor/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (

log "github.com/MottainaiCI/lxd-compose/pkg/logger"

lxd "github.com/lxc/lxd/client"
lxd_shared "github.com/lxc/lxd/shared"
lxd_cli "github.com/lxc/lxd/shared/cmd"
"github.com/lxc/lxd/shared/ioprogress"
lxd_units "github.com/lxc/lxd/shared/units"
lxd "github.com/canonical/lxd/client"
lxd_shared "github.com/canonical/lxd/shared"
lxd_cli "github.com/canonical/lxd/shared/cmd"
"github.com/canonical/lxd/shared/ioprogress"
lxd_units "github.com/canonical/lxd/shared/units"
)

// Based on code of lxc client tool https://github.com/lxc/lxd/blob/master/lxc/file.go
// Based on code of lxc client tool https://github.com/canonical/lxd/blob/master/lxc/file.go
func (e *LxdCExecutor) RecursiveMkdir(nameContainer string, dir string, mode *os.FileMode, uid int64, gid int64) error {

/* special case, every container has a /, we don't need to do anything */
Expand Down Expand Up @@ -98,7 +98,7 @@ func (e *LxdCExecutor) RecursiveMkdir(nameContainer string, dir string, mode *os
return nil
}

// Based on code of lxc client tool https://github.com/lxc/lxd/blob/master/lxc/file.go
// Based on code of lxc client tool https://github.com/canonical/lxd/blob/master/lxc/file.go
func (e *LxdCExecutor) RecursivePushFile(nameContainer, source, target string) error {
var targetIsFile bool = true
var sourceIsFile bool = true
Expand Down Expand Up @@ -250,7 +250,7 @@ func (e *LxdCExecutor) RecursivePushFile(nameContainer, source, target string) e
return filepath.Walk(source, sendFile)
}

// Based on code of lxc client tool https://github.com/lxc/lxd/blob/master/lxc/file.go
// Based on code of lxc client tool https://github.com/canonical/lxd/blob/master/lxc/file.go
func (l *LxdCExecutor) RecursivePullFile(nameContainer string, destPath string, localPath string, localAsTarget bool) error {

buf, resp, err := l.LxdClient.GetContainerFile(nameContainer, destPath)
Expand Down
6 changes: 3 additions & 3 deletions pkg/executor/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"strings"
"time"

lxd "github.com/lxc/lxd/client"
lxd_api "github.com/lxc/lxd/shared/api"
lxd_cli "github.com/lxc/lxd/shared/cmd"
lxd "github.com/canonical/lxd/client"
lxd_api "github.com/canonical/lxd/shared/api"
lxd_cli "github.com/canonical/lxd/shared/cmd"
)

func (e *LxdCExecutor) LaunchContainer(name, fingerprint string, profiles []string) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

specs "github.com/MottainaiCI/lxd-compose/pkg/specs"

lxd_api "github.com/lxc/lxd/shared/api"
lxd_api "github.com/canonical/lxd/shared/api"
)

func (e *LxdCExecutor) GetNetworkList() ([]string, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

specs "github.com/MottainaiCI/lxd-compose/pkg/specs"

lxd_api "github.com/lxc/lxd/shared/api"
lxd_api "github.com/canonical/lxd/shared/api"
)

func (e *LxdCExecutor) GetProfilesList() ([]string, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

specs "github.com/MottainaiCI/lxd-compose/pkg/specs"

lxd_api "github.com/lxc/lxd/shared/api"
lxd_api "github.com/canonical/lxd/shared/api"
)

func (e *LxdCExecutor) GetStorageList() ([]string, error) {
Expand Down

0 comments on commit 6216b7d

Please sign in to comment.