Skip to content

Commit

Permalink
spaces: WIP CreateStorageSoace
Browse files Browse the repository at this point in the history
spaces: refactor decomposedfs spaces related code into spaces.go

spaces: move list spaces to the new spaces.go file

spaces: move private create space to the new spaces.go file

space: spaces can have duplicated names

space: fix linter

space: uint conversions

linter: file header

linter: change receiver name

linter: space out comments

spaces: refactor and cleanup a bit around uuids

xattrs: add space name extended attribute, as opposed to node name

lint: redundancy ...

lint: ...

xattrs: comment on space.name

add changelog

spaces: a space creator becomes an editor within the new resource

escape ldap filters (#2042)

fix the storageid of shares (#2033)

[Build-deps]: Bump github.com/go-chi/chi/v5 from 5.0.3 to 5.0.4 (#2038)

Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](go-chi/chi@v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: github.com/go-chi/chi/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[Build-deps]: Bump github.com/aws/aws-sdk-go from 1.40.17 to 1.40.37 (#2040)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.17 to 1.40.37.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.40.17...v1.40.37)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[Build-deps]: Bump go.opentelemetry.io/otel/sdk (#2039)

Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.0.0-RC2 to 1.0.0-RC3.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.0.0-RC2...v1.0.0-RC3)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

runtime: do not truncate logs on reload (#2047)

Bump core commit id (#2048)

update cs3apis, add utility methods for share filters (#2044)

Fail initialization if app is unsupported (#2034)

Nextcloud storage integration tests & add Nextcloud drivers for auth and user (#2043)
  • Loading branch information
refs committed Sep 8, 2021
1 parent 73f10ed commit 4a81259
Show file tree
Hide file tree
Showing 61 changed files with 1,268 additions and 406 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The test runner source for API tests
CORE_COMMITID=901157f2b3d0ba1f36b1e4d22c8384e255094b11
CORE_COMMITID=370fd807e464dcc5cb9619a8890107424254dfa6
CORE_BRANCH=master
5 changes: 5 additions & 0 deletions changelog/unreleased/appprovider-unsupported.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: fail initialization of a WOPI AppProvider if
the underlying app is not WOPI-compliant nor it is supported
by the WOPI bridge extensions

https://github.com/cs3org/reva/pull/2034
5 changes: 5 additions & 0 deletions changelog/unreleased/escape-ldap-filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: escape ldap filters

Added ldap filter escaping to increase the security of reva.

https://github.com/cs3org/reva/pull/2042
8 changes: 8 additions & 0 deletions changelog/unreleased/fix-revad-logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Do not truncate logs on restart

This change fixes the way log files were opened.
Before they were truncated and now the log file
will be open in append mode and created it if it
does not exist.

https://github.com/cs3org/reva/pull/2047
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-storageid-shares.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix the storage id of shares

The storageid in the share object contained an incorrect value.

https://github.com/cs3org/reva/pull/2033
6 changes: 6 additions & 0 deletions changelog/unreleased/nextcloud-user-backend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Nextcloud user backend

Adds Nextcloud as a user backend (Nextcloud drivers for 'auth' and 'user').
Also adds back the Nextcloud storage integration tests.

https://github.com/cs3org/reva/pull/2043
5 changes: 5 additions & 0 deletions changelog/unreleased/sharing-filter-methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add utility methods for creating share filters

Updated the CS3 API to include the new share grantee filter and added utility methods for creating share filters. This will help making the code more concise.

https://github.com/cs3org/reva/pull/2044
5 changes: 5 additions & 0 deletions changelog/unreleased/spaces-creation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Create operations for Spaces

DecomposedFS is aware now of the concept of Spaces, and supports for creating them.

https://github.com/cs3org/reva/pull/2041
10 changes: 2 additions & 8 deletions cmd/reva/ocm-share-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/cs3org/reva/pkg/ocm/share"
"github.com/jedib0t/go-pretty/table"
)

Expand Down Expand Up @@ -60,14 +61,7 @@ func ocmShareListCommand() *command {
StorageId: tokens[0],
OpaqueId: tokens[1],
}
shareRequest.Filters = []*ocm.ListOCMSharesRequest_Filter{
{
Type: ocm.ListOCMSharesRequest_Filter_TYPE_RESOURCE_ID,
Term: &ocm.ListOCMSharesRequest_Filter_ResourceId{
ResourceId: id,
},
},
}
shareRequest.Filters = []*ocm.ListOCMSharesRequest_Filter{share.ResourceIDFilter(id)}
}

shareRes, err := shareClient.ListOCMShares(ctx, shareRequest)
Expand Down
10 changes: 2 additions & 8 deletions cmd/reva/public-share-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/cs3org/reva/pkg/publicshare"
"github.com/jedib0t/go-pretty/table"
)

Expand Down Expand Up @@ -60,14 +61,7 @@ func publicShareListCommand() *command {
StorageId: tokens[0],
OpaqueId: tokens[1],
}
shareRequest.Filters = []*link.ListPublicSharesRequest_Filter{
{
Type: link.ListPublicSharesRequest_Filter_TYPE_RESOURCE_ID,
Term: &link.ListPublicSharesRequest_Filter_ResourceId{
ResourceId: id,
},
},
}
shareRequest.Filters = []*link.ListPublicSharesRequest_Filter{publicshare.ResourceIDFilter(id)}
}

shareRes, err := shareClient.ListPublicShares(ctx, shareRequest)
Expand Down
10 changes: 2 additions & 8 deletions cmd/reva/share-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/cs3org/reva/pkg/share"
"github.com/jedib0t/go-pretty/table"
)

Expand Down Expand Up @@ -60,14 +61,7 @@ func shareListCommand() *command {
StorageId: tokens[0],
OpaqueId: tokens[1],
}
shareRequest.Filters = []*collaboration.ListSharesRequest_Filter{
{
Type: collaboration.ListSharesRequest_Filter_TYPE_RESOURCE_ID,
Term: &collaboration.ListSharesRequest_Filter_ResourceId{
ResourceId: id,
},
},
}
shareRequest.Filters = []*collaboration.Filter{share.ResourceIDFilter(id)}
}

shareRes, err := shareClient.ListShares(ctx, shareRequest)
Expand Down
2 changes: 1 addition & 1 deletion cmd/revad/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func getWriter(out string) (io.Writer, error) {
return os.Stdout, nil
}

fd, err := os.Create(out)
fd, err := os.OpenFile(out, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
err = errors.Wrap(err, "error creating log file: "+out)
return nil, err
Expand Down
140 changes: 140 additions & 0 deletions examples/nextcloud-integration/revad.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
[shared]
gatewaysvc = "localhost:19000"

[grpc]
address = "0.0.0.0:19000"

[grpc.services.gateway]
authregistrysvc = "localhost:19000"
appprovidersvc = "localhost:19000"
appregistry = "localhost:19000"
storageregistrysvc = "localhost:19000"
preferencessvc = "localhost:19000"
userprovidersvc = "localhost:19000"
usershareprovidersvc = "localhost:19000"
publicshareprovidersvc = "localhost:19000"
ocmcoresvc = "localhost:19000"
ocmshareprovidersvc = "localhost:19000"
ocminvitemanagersvc = "localhost:19000"
ocmproviderauthorizersvc = "localhost:19000"
commit_share_to_storage_grant = false
datagateway = "http://localhost:19001/data"
transfer_expires = 6 # give it a moment

[grpc.services.authregistry]
driver = "static"

[grpc.services.authregistry.drivers.static.rules]
basic = "localhost:19000"

[grpc.services.storageregistry]
driver = "static"

[grpc.services.storageregistry.drivers.static]
home_provider = "/home"

[grpc.services.storageregistry.drivers.static.rules]
"/home" = {"address" = "localhost:19000"}
"123e4567-e89b-12d3-a456-426655440000" = {"address" = "localhost:19000"}

[grpc.services.usershareprovider]
driver = "memory"

[grpc.services.ocmcore]
driver = "json"

# Note that ocmcore and ocmshareprovider should use the same file for storing the shares.
[grpc.services.ocmcore.drivers.json]
file = "/var/tmp/reva/shares_server_1.json"

[grpc.services.ocminvitemanager]
driver = "json"

[grpc.services.ocmshareprovider]
driver = "json"

[grpc.services.ocmshareprovider.drivers.json]
file = "/var/tmp/reva/shares_server_1.json"

[grpc.services.ocmproviderauthorizer]
driver = "json"

[grpc.services.ocmproviderauthorizer.drivers.json]
providers = "/etc/revad/providers.json"

[grpc.services.publicshareprovider]
driver = "memory"

[grpc.services.appprovider]
driver = "demo"
iopsecret = "testsecret"
wopiurl = "http://0.0.0.0:8880/"
wopibridgeurl = "http://localhost:8000/wopib"

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.static.rules]
"text/plain" = "localhost:19000"
"text/markdown" = "localhost:19000"
"application/compressed-markdown" = "localhost:19000"
"application/vnd.oasis.opendocument.text" = "localhost:19000"
"application/vnd.oasis.opendocument.spreadsheet" = "localhost:19000"
"application/vnd.oasis.opendocument.presentation" = "localhost:19000"

[grpc.services.storageprovider]
driver = "nextcloud"
mount_path = "/home"
mount_id = "123e4567-e89b-12d3-a456-426655440000"
expose_data_server = true
data_server_url = "http://127.0.0.1:19001/data"
enable_home_creation = true
disable_tus = true

[grpc.services.storageprovider.mimetypes]
".zmd" = "application/compressed-markdown"

[grpc.services.storageprovider.drivers.nextcloud]
end_point = "http://localhost/apps/sciencemesh/"
user_layout = "{{.Username}}"


[grpc.services.authprovider]
auth_manager = "nextcloud"
[grpc.services.authprovider.drivers.nextcloud]
end_point = "http://localhost/apps/sciencemesh/"

[grpc.services.userprovider]
driver = "nextcloud"
[grpc.services.userprovider.drivers.nextcloud]
end_point = "http://localhost/apps/sciencemesh/"

[http]
enabled_services = ["ocmd"]
enabled_middlewares = ["providerauthorizer", "cors"]
address = "0.0.0.0:19001"

[http.services.dataprovider]
driver = "nextcloud"

[http.services.prometheus]
[http.services.sysinfo]

[http.services.dataprovider.drivers.localhome]
user_layout = "{{.Username}}"

[http.services.ocmd]
prefix = "ocm"

[http.middlewares.providerauthorizer]
driver = "json"

[http.middlewares.providerauthorizer.drivers.json]
providers = "/etc/revad/providers.json"

[http.services.ocs]
prefix = "ocs"

[http.services.ocdav]

[http.middlewares.cors]
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ require (
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/ReneKroon/ttlcache/v2 v2.7.0
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
github.com/aws/aws-sdk-go v1.40.17
github.com/aws/aws-sdk-go v1.40.37
github.com/beevik/etree v1.1.0
github.com/bluele/gcache v0.0.2
github.com/c-bata/go-prompt v0.2.5
github.com/cheggaaa/pb v1.0.29
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e
github.com/cs3org/go-cs3apis v0.0.0-20210812121411-f18cf19614e8
github.com/cs3org/go-cs3apis v0.0.0-20210906133842-03e4a408c1f3
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8
github.com/eventials/go-tus v0.0.0-20200718001131-45c7ec8f5d59
github.com/gdexlab/go-render v1.0.1
github.com/go-chi/chi/v5 v5.0.3
github.com/go-chi/chi/v5 v5.0.4
github.com/go-ldap/ldap/v3 v3.3.0
github.com/go-openapi/errors v0.20.0 // indirect
github.com/go-openapi/strfmt v0.19.5 // indirect
Expand Down Expand Up @@ -61,10 +61,10 @@ require (
go.mongodb.org/mongo-driver v1.5.1 // indirect
go.opencensus.io v0.23.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.22.0
go.opentelemetry.io/otel v1.0.0-RC2
go.opentelemetry.io/otel v1.0.0-RC3
go.opentelemetry.io/otel/exporters/jaeger v1.0.0-RC2
go.opentelemetry.io/otel/sdk v1.0.0-RC2
go.opentelemetry.io/otel/trace v1.0.0-RC2
go.opentelemetry.io/otel/sdk v1.0.0-RC3
go.opentelemetry.io/otel/trace v1.0.0-RC3
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40
Expand Down
20 changes: 12 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
github.com/aws/aws-sdk-go v1.20.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
github.com/aws/aws-sdk-go v1.40.17 h1:WcE72YOL7ChzAWlgpEv9YMOqAwJDM1yzkv4GxWyS5wk=
github.com/aws/aws-sdk-go v1.40.17/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.40.37 h1:I+Q6cLctkFyMMrKukcDnj+i2kjrQ37LGiOM6xmsxC48=
github.com/aws/aws-sdk-go v1.40.37/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down Expand Up @@ -92,6 +92,8 @@ github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e h1:tqSPWQeueWTKnJVMJff
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
github.com/cs3org/go-cs3apis v0.0.0-20210812121411-f18cf19614e8 h1:bqUkE0l5wD62TKH6HkbSVYwyYzZ0PIeak/hnW7ggUdU=
github.com/cs3org/go-cs3apis v0.0.0-20210812121411-f18cf19614e8/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/go-cs3apis v0.0.0-20210906133842-03e4a408c1f3 h1:NcLk09WK4wx/iIrEI+7ZFbr78APaRKJxF0+zl6kv4is=
github.com/cs3org/go-cs3apis v0.0.0-20210906133842-03e4a408c1f3/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -113,8 +115,8 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm
github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do=
github.com/go-asn1-ber/asn1-ber v1.5.1 h1:pDbRAunXzIUXfx4CB2QJFv5IuPiuoW+sWvr/Us009o8=
github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-chi/chi/v5 v5.0.3 h1:khYQBdPivkYG1s1TAzDQG1f6eX4kD2TItYVZexL5rS4=
github.com/go-chi/chi/v5 v5.0.3/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.0.4 h1:5e494iHzsYBiyXQAHHuI4tyJS9M3V84OuX3ufIIGHFo=
github.com/go-chi/chi/v5 v5.0.4/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down Expand Up @@ -326,7 +328,6 @@ github.com/mattn/go-tty v0.0.3 h1:5OfyWorkyO7xP52Mq7tB36ajHDG5OHrmBGIS/DtakQI=
github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mileusna/useragent v1.0.2 h1:DgVKtiPnjxlb73z9bCwgdUvU2nQNQ97uhgfO8l9uz/w=
github.com/mileusna/useragent v1.0.2/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc=
github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4=
Expand Down Expand Up @@ -485,16 +486,19 @@ go.opentelemetry.io/contrib v0.22.0 h1:0F7gDEjgb1WGn4ODIjaCAg75hmqF+UN0LiVgwxsCo
go.opentelemetry.io/contrib v0.22.0/go.mod h1:EH4yDYeNoaTqn/8yCWQmfNB78VHfGX2Jt2bvnvzBlGM=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.22.0 h1:TjqELdtCtlOJQrTnXd2y+RP6wXKZUnnJer0HR0CSo18=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.22.0/go.mod h1:KjqwX4uJNaj479ZjFpADOMJKOM4rBXq4kN7nbeuGKrY=
go.opentelemetry.io/otel v1.0.0-RC2 h1:SHhxSjB+omnGZPgGlKe+QMp3MyazcOHdQ8qwo89oKbg=
go.opentelemetry.io/otel v1.0.0-RC2/go.mod h1:w1thVQ7qbAy8MHb0IFj8a5Q2QU0l2ksf8u/CN8m3NOM=
go.opentelemetry.io/otel v1.0.0-RC3 h1:kvwiyEkiUT/JaadXzVLI/R1wDO934A7r3Bs2wEe6wqA=
go.opentelemetry.io/otel v1.0.0-RC3/go.mod h1:Ka5j3ua8tZs4Rkq4Ex3hwgBgOchyPVq5S6P2lz//nKQ=
go.opentelemetry.io/otel/exporters/jaeger v1.0.0-RC2 h1:RF0nWsIDpDBe+s06lkLxUw9CWQUAhO6hBSxxB7dz45s=
go.opentelemetry.io/otel/exporters/jaeger v1.0.0-RC2/go.mod h1:sZZqN3Vb0iT+NE6mZ1S7sNyH3t4PFk6ElK5TLGFBZ7E=
go.opentelemetry.io/otel/oteltest v1.0.0-RC2 h1:xNKqMhlZYkASSyvF4JwObZFMq0jhFN3c3SP+2rCzVPk=
go.opentelemetry.io/otel/oteltest v1.0.0-RC2/go.mod h1:kiQ4tw5tAL4JLTbcOYwK1CWI1HkT5aiLzHovgOVnz/A=
go.opentelemetry.io/otel/sdk v1.0.0-RC2 h1:ROuteeSCBaZNjiT9JcFzZepmInDvLktR28Y6qKo8bCs=
go.opentelemetry.io/otel/sdk v1.0.0-RC2/go.mod h1:fgwHyiDn4e5k40TD9VX243rOxXR+jzsWBZYA2P5jpEw=
go.opentelemetry.io/otel/trace v1.0.0-RC2 h1:dunAP0qDULMIT82atj34m5RgvsIK6LcsXf1c/MsYg1w=
go.opentelemetry.io/otel/sdk v1.0.0-RC3 h1:iRMkET+EmJUn5mW0hJzygBraXRmrUwzbOtNvTCh/oKs=
go.opentelemetry.io/otel/sdk v1.0.0-RC3/go.mod h1:78H6hyg2fka0NYT9fqGuFLvly2yCxiBXDJAgLKo/2Us=
go.opentelemetry.io/otel/trace v1.0.0-RC2/go.mod h1:JPQ+z6nNw9mqEGT8o3eoPTdnNI+Aj5JcxEsVGREIAy4=
go.opentelemetry.io/otel/trace v1.0.0-RC3 h1:9F0ayEvlxv8BmNmPbU005WK7hC+7KbOazCPZjNa1yME=
go.opentelemetry.io/otel/trace v1.0.0-RC3/go.mod h1:VUt2TUYd8S2/ZRX09ZDFZQwn2RqfMB5MzO17jBojGxo=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
Expand Down
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *svc) CreateHome(ctx context.Context, req *provider.CreateHomeRequest) (
func (s *svc) CreateStorageSpace(ctx context.Context, req *provider.CreateStorageSpaceRequest) (*provider.CreateStorageSpaceResponse, error) {
log := appctx.GetLogger(ctx)
// TODO: needs to be fixed
c, err := s.findByPath(ctx, req.Type)
c, err := s.findByPath(ctx, "/users")
if err != nil {
return &provider.CreateStorageSpaceResponse{
Status: status.NewStatusFromErrType(ctx, "error finding path", err),
Expand Down
5 changes: 2 additions & 3 deletions internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,9 @@ func (s *service) CreateHome(ctx context.Context, req *provider.CreateHomeReques
return res, nil
}

// CreateStorageSpace creates a storage space
func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateStorageSpaceRequest) (*provider.CreateStorageSpaceResponse, error) {
return &provider.CreateStorageSpaceResponse{
Status: status.NewUnimplemented(ctx, errtypes.NotSupported("CreateStorageSpace not implemented"), "CreateStorageSpace not implemented"),
}, nil
return s.storage.CreateStorageSpace(ctx, req)
}

func hasNodeID(s *provider.StorageSpace) bool {
Expand Down
Loading

0 comments on commit 4a81259

Please sign in to comment.