Skip to content

Commit

Permalink
Merge pull request #4 from cs3org/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
Daniel-WWU-IT authored Mar 1, 2021
2 parents 3c8f8c6 + 06aa61f commit 98f7bfa
Show file tree
Hide file tree
Showing 43 changed files with 1,319 additions and 857 deletions.
28 changes: 14 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: localAPIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -562,7 +562,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: localAPIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -631,7 +631,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -703,7 +703,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -775,7 +775,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -847,7 +847,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -919,7 +919,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -991,7 +991,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOcisStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -1063,7 +1063,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -1140,7 +1140,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -1217,7 +1217,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -1294,7 +1294,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -1371,7 +1371,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down Expand Up @@ -1448,7 +1448,7 @@ steps:
- git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing
- git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner
- cd /drone/src/tmp/testrunner
- git checkout 62c3d362651fc785952ec7bd3046cd9f0d108cf3
- git checkout 76af1195cb662e4cebc5f3fab4e5383bf0498702

- name: oC10APIAcceptanceTestsOwncloudStorage
image: registry.cern.ch/docker.io/owncloudci/php:7.4
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/ocis-quota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: quota querying and tree accounting

The ocs api now returns the user quota for the users home storage. Furthermore, the ocis storage driver now reads the quota from the extended attributes of the user home or root node and implements tree size accounting. Finally, ocdav PROPFINDS now handle the `DAV:quota-used-bytes` and `DAV:quote-available-bytes` properties.

https://github.com/cs3org/reva/pull/1405
https://github.com/cs3org/reva/pull/1491
3 changes: 3 additions & 0 deletions changelog/unreleased/publicshare-sql-driver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Enhancement: SQL driver for the publicshare service

https://github.com/cs3org/reva/pull/1495
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/go-openapi/strfmt v0.19.2 // indirect
github.com/go-sql-driver/mysql v1.5.0
github.com/golang/protobuf v1.4.3
github.com/gomodule/redigo v1.8.3
github.com/gomodule/redigo v1.8.4
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/uuid v1.2.0
Expand All @@ -34,7 +34,7 @@ require (
github.com/mitchellh/mapstructure v1.4.1
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/ory/fosite v0.37.0
github.com/ory/fosite v0.38.0
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.3
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
Expand All @@ -43,12 +43,13 @@ require (
github.com/stretchr/testify v1.7.0
github.com/studio-b12/gowebdav v0.0.0-20200303150724-9380631c29a1
github.com/tus/tusd v1.1.1-0.20200416115059-9deabf9d80c2
go.opencensus.io v0.22.6
go.opencensus.io v0.23.0
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221
google.golang.org/grpc v1.35.0
google.golang.org/grpc v1.36.0
)

go 1.13
Expand Down
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomodule/redigo v1.8.3 h1:HR0kYDX2RJZvAup8CsiJwxB4dTCSC0AaUq6S4SiLwUc=
github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/gomodule/redigo v1.8.4 h1:Z5JUg94HMTR1XpwBaSH4vq3+PNSIykBLxMdglbw10gg=
github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -746,8 +746,8 @@ github.com/ory/analytics-go/v4 v4.0.0/go.mod h1:FMx9cLRD9xN+XevPvZ5FDMfignpmcqPP
github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs=
github.com/ory/dockertest/v3 v3.5.4/go.mod h1:J8ZUbNB2FOhm1cFZW9xBpDsODqsSWcyYgtJYVPcnF70=
github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0=
github.com/ory/fosite v0.37.0 h1:NaKYm3hhZW1c812uetiNfHlvXmTokIRrOOiTYz+Yhro=
github.com/ory/fosite v0.37.0/go.mod h1:37r59qkOSPueYKmaA7EHiXrDMF1B+XPN+MgkZgTRg3Y=
github.com/ory/fosite v0.38.0 h1:4y+IurqBAu/Gf0NlW47gabRJZyYIqda+OFHMx5fsy6Q=
github.com/ory/fosite v0.38.0/go.mod h1:37r59qkOSPueYKmaA7EHiXrDMF1B+XPN+MgkZgTRg3Y=
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4=
github.com/ory/go-acc v0.2.5 h1:31irXHzG2vnKQSE4weJm7AdfrnpaVjVCq3nD7viXCJE=
github.com/ory/go-acc v0.2.5/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw=
Expand Down Expand Up @@ -978,8 +978,8 @@ go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok=
go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.13.0/go.mod h1:TwTkyRaTam1pOIb2wxcAiC2hkMVbokXkt6DEt5nDkD8=
go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
Expand Down Expand Up @@ -1194,6 +1194,8 @@ golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7Ow
golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091 h1:DMyOG0U+gKfu8JZzg2UQe9MeaC1X+xQWlAKcRnjxjCw=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b h1:lAZ0/chPUDWwjqosYR0X4M490zQhMsiJ4K3DbA7o+3g=
golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
17 changes: 14 additions & 3 deletions internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1762,9 +1762,20 @@ func (s *svc) PurgeRecycle(ctx context.Context, req *gateway.PurgeRecycleRequest
return res, nil
}

func (s *svc) GetQuota(ctx context.Context, _ *gateway.GetQuotaRequest) (*provider.GetQuotaResponse, error) {
res := &provider.GetQuotaResponse{
Status: status.NewUnimplemented(ctx, nil, "GetQuota not yet implemented"),
func (s *svc) GetQuota(ctx context.Context, req *gateway.GetQuotaRequest) (*provider.GetQuotaResponse, error) {
c, err := s.find(ctx, req.Ref)
if err != nil {
return &provider.GetQuotaResponse{
Status: status.NewStatusFromErrType(ctx, "GetQuota ref="+req.Ref.String(), err),
}, nil
}

res, err := c.GetQuota(ctx, &provider.GetQuotaRequest{
Opaque: req.GetOpaque(),
//Ref: req.GetRef(), // TODO send which storage space ... or root
})
if err != nil {
return nil, errors.Wrap(err, "gateway: error calling GetQuota")
}
return res, nil
}
Expand Down
4 changes: 2 additions & 2 deletions internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,8 @@ func (s *service) GetQuota(ctx context.Context, req *provider.GetQuotaRequest) (

res := &provider.GetQuotaResponse{
Status: status.NewOK(ctx),
TotalBytes: uint64(total),
UsedBytes: uint64(used),
TotalBytes: total,
UsedBytes: used,
}
return res, nil
}
Expand Down
Loading

0 comments on commit 98f7bfa

Please sign in to comment.