Skip to content

Commit

Permalink
Merge pull request #1257 from PravinRanjan10/master
Browse files Browse the repository at this point in the history
API code after decoupling
  • Loading branch information
skdwriting committed Apr 10, 2020
2 parents 0cf2829 + b7d385a commit 9c8e2c4
Show file tree
Hide file tree
Showing 287 changed files with 409 additions and 37,606 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: xenial
sudo: required

language: go
go_import_path: github.com/opensds/opensds
go_import_path: github.com/sodafoundation/api

go:
- 1.12.x
Expand Down Expand Up @@ -33,7 +33,8 @@ matrix:

install:
# Build OpenSDS Controller source code
- make all
- make osdsapiserver
- make osdsctl

script:
- ./install/CI/coverage
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Additionally, community organizers are available to help community members engag

If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify OpenSDS with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.

[Policy](https://github.com/opensds/opensds/blob/master/LICENSE)
[Policy](https://github.com/sodafoundation/api/blob/master/LICENSE)

## 8. Scope

Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# OpenSDS

[![Go Report Card](https://goreportcard.com/badge/github.com/opensds/opensds?branch=master)](https://goreportcard.com/report/github.com/opensds/opensds)
[![Build Status](https://travis-ci.org/opensds/opensds.svg?branch=master)](https://travis-ci.org/opensds/opensds)
[![Coverage Status](https://coveralls.io/repos/github/opensds/opensds/badge.svg?branch=master)](https://coveralls.io/github/opensds/opensds?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/sodafoundation/api?branch=master)](https://goreportcard.com/report/github.com/sodafoundation/api)
[![Build Status](https://travis-ci.org/sodafoundation/api.svg?branch=master)](https://travis-ci.org/sodafoundation/api)
[![Coverage Status](https://coveralls.io/repos/github/sodafoundation/api/badge.svg?branch=master)](https://coveralls.io/github/sodafoundation/api?branch=master)

<img src="https://www.opensds.io/wp-content/uploads/sites/18/2016/11/logo_opensds.png" width="100">

Expand Down Expand Up @@ -48,10 +48,10 @@ When reporting issues, refer to this format:

### Propose PRs

- Raise your idea as an [issue](https://github.com/opensds/opensds/issues)
- Raise your idea as an [issue](https://github.com/sodafoundation/api/issues)
- If it is a new feature that needs lots of design details, a design proposal should also be submitted [here](https://github.com/opensds/design-specs/pulls).
- After reaching consensus in the issue discussions and design proposal reviews, complete the development on the forked repo and submit a PR.
Here are the [PRs](https://github.com/opensds/opensds/pulls?q=is%3Apr+is%3Aclosed) that are already closed.
Here are the [PRs](https://github.com/sodafoundation/api/pulls?q=is%3Apr+is%3Aclosed) that are already closed.
- If a PR is submitted by one of the core members, it has to be merged by a different core member.
- After PR is sufficiently discussed, it will get merged, abondoned or rejected depending on the outcome of the discussion.

Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The installation documents have been moved into: [https://github.com/opensds/opensds/wiki](https://github.com/opensds/opensds/wiki)
The installation documents have been moved into: [https://github.com/sodafoundation/api/wiki](https://github.com/sodafoundation/api/wiki)
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ ubuntu-dev-setup:
sudo apt-get update && sudo apt-get install -y \
build-essential gcc librados-dev librbd-dev

build: prebuild osdsdock osdslet osdsapiserver osdsctl metricexporter
build: prebuild osdsapiserver osdsctl osdslet osdsdock

prebuild:
mkdir -p $(BUILD_DIR)

.PHONY: osdsdock osdslet osdsapiserver osdsctl docker test protoc goimports

osdsdock:
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdsdock github.com/opensds/opensds/cmd/osdsdock
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdsdock github.com/sodafoundation/dock/cmd/osdsdock

osdslet:
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdslet github.com/opensds/opensds/cmd/osdslet
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdslet github.com/sodafoundation/controller/cmd/osdslet

osdsapiserver:
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdsapiserver github.com/opensds/opensds/cmd/osdsapiserver
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdsapiserver github.com/sodafoundation/api/cmd/osdsapiserver

osdsctl:
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdsctl github.com/opensds/opensds/osdsctl
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/osdsctl github.com/sodafoundation/api/osdsctl

metricexporter:
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/lvm_exporter github.com/opensds/opensds/contrib/exporters/lvm_exporter
go build -ldflags '-w -s' -o $(BUILD_DIR)/bin/lvm_exporter github.com/sodafoundation/api/contrib/exporters/lvm_exporter

docker: build
cp $(BUILD_DIR)/bin/osdsdock ./cmd/osdsdock
Expand Down
6 changes: 3 additions & 3 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package main
import (
"fmt"

"github.com/opensds/opensds/client"
"github.com/sodafoundation/api/client"
)

func main() {
Expand All @@ -39,8 +39,8 @@ package main
import (
"fmt"

"github.com/opensds/opensds/client"
"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/client"
"github.com/sodafoundation/api/pkg/model"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"os"

"github.com/opensds/opensds/pkg/utils/constants"
"github.com/opensds/opensds/pkg/utils/pwd"
"github.com/sodafoundation/api/pkg/utils/constants"
"github.com/sodafoundation/api/pkg/utils/pwd"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os"
"strings"

"github.com/opensds/opensds/pkg/utils/constants"
"github.com/sodafoundation/api/pkg/utils/constants"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions client/dock.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

func NewDockMgr(r Receiver, edp string, tenantId string) *DockMgr {
Expand Down
2 changes: 1 addition & 1 deletion client/dock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fd = &DockMgr{
Expand Down
4 changes: 2 additions & 2 deletions client/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"strings"
"sync"

"github.com/opensds/opensds/pkg/model"
. "github.com/opensds/opensds/testutils/collection"
"github.com/sodafoundation/api/pkg/model"
. "github.com/sodafoundation/api/testutils/collection"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions client/fileshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

// FileShareBuilder contains request body of handling a fileshare request.
Expand Down
4 changes: 2 additions & 2 deletions client/fileshare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
. "github.com/opensds/opensds/testutils/collection"
"github.com/sodafoundation/api/pkg/model"
. "github.com/sodafoundation/api/testutils/collection"
)

var fakeShareMgr = &FileShareMgr{
Expand Down
4 changes: 2 additions & 2 deletions client/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

// HostBuilder contains request body of handling a host request.
Expand Down
2 changes: 1 addition & 1 deletion client/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fakeHostMgr = &HostMgr{
Expand Down
4 changes: 2 additions & 2 deletions client/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

// NewPoolMgr
Expand Down
2 changes: 1 addition & 1 deletion client/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fp = &PoolMgr{
Expand Down
4 changes: 2 additions & 2 deletions client/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

// ProfileBuilder contains request body of handling a profile request.
Expand Down
2 changes: 1 addition & 1 deletion client/profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fpr = &ProfileMgr{
Expand Down
6 changes: 3 additions & 3 deletions client/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/identity/v3/tokens"
"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils"
"github.com/opensds/opensds/pkg/utils/constants"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils"
"github.com/sodafoundation/api/pkg/utils/constants"
)

func NewHttpError(code int, msg string) error {
Expand Down
4 changes: 2 additions & 2 deletions client/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

type ReplicationBuilder *model.ReplicationSpec
Expand Down
2 changes: 1 addition & 1 deletion client/replication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fr = &ReplicationMgr{
Expand Down
2 changes: 1 addition & 1 deletion client/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

// VersionBuilder contains request body of handling a version request.
Expand Down
2 changes: 1 addition & 1 deletion client/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fakeVersion = &VersionMgr{
Expand Down
4 changes: 2 additions & 2 deletions client/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package client
import (
"strings"

"github.com/opensds/opensds/pkg/model"
"github.com/opensds/opensds/pkg/utils/urls"
"github.com/sodafoundation/api/pkg/model"
"github.com/sodafoundation/api/pkg/utils/urls"
)

// VolumeBuilder contains request body of handling a volume request.
Expand Down
2 changes: 1 addition & 1 deletion client/volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"github.com/opensds/opensds/pkg/model"
"github.com/sodafoundation/api/pkg/model"
)

var fv = &VolumeMgr{
Expand Down
4 changes: 2 additions & 2 deletions cmd/osdsapiserver/hooks/pre_build
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
echo 'export GOPATH=$HOME/gopath' >> /etc/profile
source /etc/profile
cd $HOME
mkdir -p gopath/src/github.com/opensds/opensds
cd gopath/src/github.com/opensds/opensds
mkdir -p gopath/src/github.com/sodafoundation/api
cd gopath/src/github.com/sodafoundation/api
cp -r ${BASE_DIR}/* .
make ubuntu-dev-setup && make docker
cp cmd/osdsapiserver/osdsapiserver ${BASE_DIR}/cmd/osdsapiserver
10 changes: 5 additions & 5 deletions cmd/osdsapiserver/osdsapiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ package main
import (
"flag"

"github.com/opensds/opensds/pkg/api"
"github.com/opensds/opensds/pkg/db"
. "github.com/opensds/opensds/pkg/utils/config"
"github.com/opensds/opensds/pkg/utils/daemon"
"github.com/opensds/opensds/pkg/utils/logs"
"github.com/sodafoundation/api/pkg/api"
"github.com/sodafoundation/api/pkg/db"
. "github.com/sodafoundation/api/pkg/utils/config"
"github.com/sodafoundation/api/pkg/utils/daemon"
"github.com/sodafoundation/api/pkg/utils/logs"
)

func init() {
Expand Down
20 changes: 0 additions & 20 deletions cmd/osdsdock/Autobuildfile

This file was deleted.

20 changes: 0 additions & 20 deletions cmd/osdsdock/Dockerfile

This file was deleted.

0 comments on commit 9c8e2c4

Please sign in to comment.