Skip to content

Commit

Permalink
Merge branch 'update-package' into 'master'
Browse files Browse the repository at this point in the history
Updated package names

See merge request cse2000-software-project/2019-2020-q4/cluster-11/emulating-k8s/emulating-k8s!82
  • Loading branch information
NULLx76 committed Jun 22, 2020
2 parents 6745ba7 + e1a514e commit 51e8820
Show file tree
Hide file tree
Showing 113 changed files with 387 additions and 394 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/atlarge-research/opendc-emulate-kubernetes
local-prefixes: github.com/atlarge-research/apate
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 30
Expand Down
2 changes: 1 addition & 1 deletion .run/controlplane.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</envs>
<kind value="PACKAGE" />
<filePath value="$PROJECT_DIR$/services/controlplane/main.go" />
<package value="github.com/atlarge-research/opendc-emulate-kubernetes/services/controlplane" />
<package value="github.com/atlarge-research/apate/services/controlplane" />
<directory value="$PROJECT_DIR$/" />
<method v="2" />
</configuration>
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lint:

.PHONY: lint_fix_imports
lint_fix_imports:
goimports -local github.com/atlarge-research/opendc-emulate-kubernetes -w **/*.go
goimports -local github.com/atlarge-research/apate -w **/*.go
golangci-lint run

.PHONY: lint_fix
Expand Down Expand Up @@ -65,25 +65,25 @@ protobuf:
mock_gen: ./pkg/runner/mock_runner/mock_runner.go ./api/health/mock_health/health_mock.go ./services/controlplane/store/mock_store/store_mock.go ./services/apatelet/store/mock_store/store_mock.go ./services/apatelet/provider/mock_cache_store/mock_cache_store.go ./services/apatelet/provider/podmanager/mock_podmanager/mock_podmanager.go pkg/kubernetes/mock_kubernetes/mock_api.go

./api/health/mock_health/health_mock.go: ./api/health/health.pb.go
mockgen github.com/atlarge-research/opendc-emulate-kubernetes/api/health Health_HealthStreamClient,HealthClient,Health_HealthStreamServer > $@
mockgen github.com/atlarge-research/apate/api/health Health_HealthStreamClient,HealthClient,Health_HealthStreamServer > $@

./services/controlplane/store/mock_store/store_mock.go: ./services/controlplane/store/store.go
mockgen github.com/atlarge-research/opendc-emulate-kubernetes/services/controlplane/store Store > $@
mockgen github.com/atlarge-research/apate/services/controlplane/store Store > $@

./services/apatelet/store/mock_store/store_mock.go: ./services/apatelet/store/store.go
mockgen github.com/atlarge-research/opendc-emulate-kubernetes/services/apatelet/store Store > $@
mockgen github.com/atlarge-research/apate/services/apatelet/store Store > $@

./services/apatelet/provider/mock_cache_store/mock_cache_store.go: FORCE
mockgen k8s.io/client-go/tools/cache Store > $@

./services/apatelet/provider/podmanager/mock_podmanager/mock_podmanager.go:
mockgen github.com/atlarge-research/opendc-emulate-kubernetes/services/apatelet/provider/podmanager PodManager > $@
mockgen github.com/atlarge-research/apate/services/apatelet/provider/podmanager PodManager > $@

./pkg/runner/mock_runner/mock_runner.go:
mockgen github.com/atlarge-research/opendc-emulate-kubernetes/pkg/runner ApateletRunner > $@
mockgen github.com/atlarge-research/apate/pkg/runner ApateletRunner > $@

./pkg/kubernetes/mock_kubernetes/mock_api.go:
mockgen github.com/atlarge-research/opendc-emulate-kubernetes/pkg/kubernetes ClusterAPI > $@
mockgen github.com/atlarge-research/apate/pkg/kubernetes ClusterAPI > $@

crd_gen:
controller-gen object paths=./pkg/apis/...
Expand Down
8 changes: 3 additions & 5 deletions api/apatelet/apatelet.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/apatelet/apatelet.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "github.com/atlarge-research/opendc-emulate-kubernetes/api/apatelet";
option go_package = "github.com/atlarge-research/apate/api/apatelet";
package apate.apatelet;

import "google/protobuf/empty.proto";
Expand Down
11 changes: 5 additions & 6 deletions api/apatelet/scenario.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/apatelet/scenario.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "github.com/atlarge-research/opendc-emulate-kubernetes/api/apatelet";
option go_package = "github.com/atlarge-research/apate/api/apatelet";
package apate.apatelet;

import "google/protobuf/empty.proto";
Expand Down
9 changes: 4 additions & 5 deletions api/controlplane/cluster_operations.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/controlplane/cluster_operations.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "github.com/atlarge-research/opendc-emulate-kubernetes/api/controlplane";
option go_package = "github.com/atlarge-research/apate/api/controlplane";
package apate.controlplane;

import "google/protobuf/empty.proto";
Expand Down
9 changes: 4 additions & 5 deletions api/controlplane/scenario.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/controlplane/scenario.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "github.com/atlarge-research/opendc-emulate-kubernetes/api/controlplane";
option go_package = "github.com/atlarge-research/apate/api/controlplane";
package apate.controlplane;

import "google/protobuf/empty.proto";
Expand Down
9 changes: 4 additions & 5 deletions api/controlplane/status.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/controlplane/status.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "github.com/atlarge-research/opendc-emulate-kubernetes/api/controlplane";
option go_package = "github.com/atlarge-research/apate/api/controlplane";
package apate.controlplane;

import "google/protobuf/empty.proto";
Expand Down
11 changes: 5 additions & 6 deletions api/health/health.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/health/health.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

option go_package = "github.com/atlarge-research/opendc-emulate-kubernetes/api/health";
option go_package = "github.com/atlarge-research/apate/api/health";
package apate.health;

import "google/protobuf/empty.proto";
Expand Down
4 changes: 2 additions & 2 deletions api/health/mock_health/health_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci/go_test_with_coverage_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CI_NODE_INDEX=${CI_NODE_INDEX:-0}
output="regular"
coverMode="count"
coverPkg="./..."
srcPkg="github.com/atlarge-research/opendc-emulate-kubernetes"
srcPkg="github.com/atlarge-research/apate"

if [[ ${TESTFLAGS} = *"-race"* ]]; then
output="race"
Expand Down
2 changes: 1 addition & 1 deletion cmd/apate-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/atlarge-research/opendc-emulate-kubernetes/cmd/apate-cli/run"
"github.com/atlarge-research/apate/cmd/apate-cli/run"
)

func main() {
Expand Down
10 changes: 5 additions & 5 deletions cmd/apate-cli/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import (
"path/filepath"
"time"

cpApi "github.com/atlarge-research/opendc-emulate-kubernetes/api/controlplane"
cpApi "github.com/atlarge-research/apate/api/controlplane"

"github.com/fatih/color"
"github.com/pkg/errors"
"github.com/urfave/cli/v2"

"github.com/atlarge-research/opendc-emulate-kubernetes/internal/service"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/clients/controlplane"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/container"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/env"
"github.com/atlarge-research/apate/internal/service"
"github.com/atlarge-research/apate/pkg/clients/controlplane"
"github.com/atlarge-research/apate/pkg/container"
"github.com/atlarge-research/apate/pkg/env"
)

type commandLineArgs struct {
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
}
],
// Edit links
repo: 'atlarge-research/opendc-emulate-kubernetes',
repo: 'atlarge-research/apate',
docsDir: 'docs',
editLinks: true,
}
Expand Down
6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To install `apate-cli` binary with curl, you should do the following:
1. Download the latest release with the command:

```sh
curl -LO https://github.com/atlarge-research/opendc-emulate-kubernetes/releases/download/v0.1.0/apate-cli
curl -LO https://github.com/atlarge-research/apate/releases/download/v0.1.0/apate-cli
```

2. Make the `apate-cli` binary executable.
Expand All @@ -43,12 +43,12 @@ To install `apate-cli` binary with curl, you should do the following:
To install the `apate-cli` from source first clone the repo:

```bash
git clone https://github.com/atlarge-research/opendc-emulate-kubernetes
git clone https://github.com/atlarge-research/apate
```

then move into the dir:
```bash
cd opendc-emulate-kubernetes
cd apate
```

Finally you can install the `apate-cli` like this:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/atlarge-research/opendc-emulate-kubernetes
module github.com/atlarge-research/apate

go 1.14

Expand Down
2 changes: 1 addition & 1 deletion internal/crd/node/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/tools/cache"

nodeconfigv1 "github.com/atlarge-research/opendc-emulate-kubernetes/pkg/apis/nodeconfiguration/v1"
nodeconfigv1 "github.com/atlarge-research/apate/pkg/apis/nodeconfiguration/v1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
Expand Down
2 changes: 1 addition & 1 deletion internal/crd/pod/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/runtime"

podconfigv1 "github.com/atlarge-research/opendc-emulate-kubernetes/pkg/apis/podconfiguration/v1"
podconfigv1 "github.com/atlarge-research/apate/pkg/apis/podconfiguration/v1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/serializer"
Expand Down
4 changes: 2 additions & 2 deletions internal/kubectl/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"os/exec"
"strings"

"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/env"
"github.com/atlarge-research/apate/pkg/env"

"github.com/pkg/errors"

"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/kubernetes/kubeconfig"
"github.com/atlarge-research/apate/pkg/kubernetes/kubeconfig"
)

func prepareHelm() error {
Expand Down
2 changes: 1 addition & 1 deletion internal/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/pkg/errors"

"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/kubernetes/kubeconfig"
"github.com/atlarge-research/apate/pkg/kubernetes/kubeconfig"
)

// CreateNameSpace creates a namespace on the cluster
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/nodeconfiguration/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/atlarge-research/opendc-emulate-kubernetes/internal/kubectl"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/apis/nodeconfiguration"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/env"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/kubernetes/kubeconfig"
"github.com/atlarge-research/apate/internal/kubectl"
"github.com/atlarge-research/apate/pkg/apis/nodeconfiguration"
"github.com/atlarge-research/apate/pkg/env"
"github.com/atlarge-research/apate/pkg/kubernetes/kubeconfig"
)

// SchemeGroupVersion is group version used to register these objects
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/podconfiguration/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v1
import (
"io/ioutil"

"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/env"
"github.com/atlarge-research/apate/pkg/env"

"github.com/pkg/errors"

Expand All @@ -12,9 +12,9 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/atlarge-research/opendc-emulate-kubernetes/internal/kubectl"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/apis/podconfiguration"
"github.com/atlarge-research/opendc-emulate-kubernetes/pkg/kubernetes/kubeconfig"
"github.com/atlarge-research/apate/internal/kubectl"
"github.com/atlarge-research/apate/pkg/apis/podconfiguration"
"github.com/atlarge-research/apate/pkg/kubernetes/kubeconfig"
)

// SchemeGroupVersion is group version used to register these objects
Expand Down
4 changes: 2 additions & 2 deletions pkg/clients/apatelet/apatelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/pkg/errors"
"google.golang.org/grpc"

"github.com/atlarge-research/opendc-emulate-kubernetes/api/apatelet"
"github.com/atlarge-research/opendc-emulate-kubernetes/internal/service"
"github.com/atlarge-research/apate/api/apatelet"
"github.com/atlarge-research/apate/internal/service"
)

//ApateClient is the client used for the Apatelet service on the apatelets
Expand Down
Loading

0 comments on commit 51e8820

Please sign in to comment.