John Mulligan
df3c6dae2e
cephfs admin: add newFSAdmin func for setting up fsadmin test instances
...
Previously, the getFSAdmin function always fetched a cached (if
available) fsadmin instance set up for the default configuration of
ceph. This change makes getFSAdmin based on newFSAdmin a function
that always returns a new instance and allows a custom configuration
to be passed.
Otherwise, newFSAdmin works like getFSAdmin did previously, supporting
debugging via an environment variable.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
John Mulligan
d11dd8b6d1
internal commands: add EmptyBody filter function
...
EmptyBody is like NoBody, but also accepts an empty JSON object ("{}").
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-03 07:25:28 +00:00
Effi Ofer
5ff1efe3aa
rbd: add EncryptionLoad api to support the rbd_encryption_load librbd api
...
Signed-off-by: Effi Ofer <effio@il.ibm.com>
2021-08-02 21:03:36 +00:00
Sven Anderson
b968165e78
rbd: add tests for MirrorImageInfoList
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
Sven Anderson
520f6bfe0d
rbd: remove unnecessary type casts
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
Sven Anderson
ac895ae097
rbd: implement binding for rbd_mirror_image_info_list
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
Sven Anderson
8cbfd1971a
rbd: fix comment formatting
...
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-08-02 16:39:39 +00:00
John Mulligan
dfd1e08fab
rbd: remove build tag for luminous from watchers.go
...
go-ceph stopped supporting luminous in v0.6.0. There's no need to
keep the build tag for it any more.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan
b59dda4061
rbd: rename watchers_mimic.go to watchers.go
...
Drop the _mimic from watchers go file and tests go file.
The mimic was not specific to the version supported, just the version
it was new for. Clean up the naming to reflect that.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan
aca200e407
rbd: remove features_mimic.go
...
go-ceph stopped supporting mimic in v0.7.0. Separate go files for
feature flags added in mimic are no longer needed. Constants and
tests from these files have been moved into the appropriate files.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan
b3ed5036f3
rbd: remove luminous and mimic build tags from options_octopus.go
...
These versions of ceph have not been supported for the last few
release of go-ceph.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan
29a94e03b5
rbd: remove options_mimic.go moving content to options.go
...
go-ceph stopped supporting mimic in v0.7.0. Keeping the constants
that were added in mimic in a standalone file is no longer needed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan
b201e01628
rbd: remove rbd_mimic.go
...
go-ceph stopped supporting mimic in v0.7.0. This file no longer is
needed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
John Mulligan
5c0c0c94da
rbd: remove snapshot_mimic.go
...
go-ceph stopped supporting mimic in v0.7.0. This file no longer is
needed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-02 15:15:48 +00:00
Jiffin Tony Thottan
11f319727f
Merge pull request #543 from leseb/rm-debug
...
rgw/admin: remove Debug field from API type
2021-07-29 15:47:05 +05:30
Sébastien Han
9cae71ab54
rgw/admin: remove Debug field from API type
...
Instead of implementing our own logging let's the consumer implement
their own potential debug for each HTTP requests.
Closes: https://github.com/ceph/go-ceph/issues/508
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-27 18:21:53 +02:00
John Mulligan
402707f2f5
rados: naming conventions: fixes in WriteFull function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
b7b21273e3
rados: naming conventions: fixes in Write function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
396e8f32ff
rados: naming conventions: fixes in Unlock function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
e7cdc8fa68
rados: naming conventions: fixes in Truncate function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
3a7c059e82
rados: naming conventions: fixes in Stat function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
86d8bee873
rados: naming conventions: fixes in SetXattr function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
c27c941bef
rados: naming conventions: fixes in SetNamespace function
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_ns -> cns" rados/ioctx.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
f4a114fdd6
rados: naming conventions: fixes in RmXattr function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
4dc59eed6a
rados: naming conventions: fixes in Read function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
64bfa59378
rados: naming conventions: fixes in LockShared function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
b3cdd63c76
rados: naming conventions: fixes in LockExclusive function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
22b0d4636e
rados: naming conventions: fixes in ListXattrs function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
9f1fdbbe9e
rados: naming conventions: fixes in ListObjects function
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_entry -> cEntry" rados/ioctx.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
c45780d58d
rados: naming conventions: fixes in ListLockers function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
1cb879d9e0
rados: naming conventions: fixes in GetXattr function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
4307dc99ec
rados: naming conventions: fixes in GetPoolStats function
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_stat -> cStat" rados/ioctx.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
aba1bfef37
rados: naming conventions: fixes in Delete function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
35d991cf64
rados: naming conventions: fixes in BreakLock function
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_client -> cClient" rados/ioctx.go
Command: gofmt -w -r "c_cookie -> cCookie" rados/ioctx.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
John Mulligan
6485854703
rados: naming conventions: fixes in Append function
...
Fix up variable names that don't meet Go standards.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-26 14:07:47 -04:00
Effi Ofer
c15b97cf7c
rbd: add image encryption format api
...
Signed-off-by: Effi Ofer <effio@il.ibm.com>
2021-07-26 15:48:33 +00:00
Sébastien Han
1a18c07193
rgw/admin: un-export mock client
...
We don't need to export the mock, the consumer will generate its own.
What really matters is to have an interface that consumer can mock it
desired. Reference: https://github.com/golang/go/wiki/CodeReviewComments#interfaces
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-22 10:24:57 +00:00
Sébastien Han
401fbe9698
rgw/admin: remove unnecessary type
...
Now that we use http.Method* constant from the http package, we don't
need to have verbHTTP type anymore.
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-21 05:11:49 +00:00
Sébastien Han
42a9620c93
rgw/admin: add ability to mock HTTP Client
...
We can now use a mocked client to be consumed by unit tests as well as
various users of the API.
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-21 05:11:49 +00:00
Sébastien Han
53b3842e29
rgw/admin: add an interface around the HTTP Client
...
We now have a new interface `HTTPClient` which helps us doing various
operations such as mutating and mocking the HTTP Client.
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-21 05:11:49 +00:00
Sven Anderson
5da5db0b9c
devcontainer: add option to start ceph nodes for tests
2021-07-19 17:07:42 -04:00
Sébastien Han
7881ee6829
rgw/admin: use http verbs from the http package
...
The http package provides constants for common http methods so let's use
them.
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-13 14:42:54 +00:00
John Mulligan
7f34da0592
cephfs: add test case for ReadConfigFile
...
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-13 13:53:48 +00:00
John Mulligan
5b727cf7a0
cephfs: add ReadConfigFile implementing ceph_conf_read_file
...
Unlike ReadDefaultConfigFile, ReadConfigFile supports user specified
paths.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-13 13:53:48 +00:00
John Mulligan
3add450741
cephfs: fix function doc comment for ReadDefaultConfigFile
...
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-13 13:53:48 +00:00
John Mulligan
c009f6d19e
makefile: add a flag to run go commands via a container
...
By running `make USE_GOCO=1` the makefile will run go build, etc.
commands using _GO_ from a _COntainer_. This is inspired by recent work
to enable development containers for VSCode, but is more aimed at
vim/cli users like myself who want to compile the code via makefile
rules and make use of vim's quickfix feature without having to have ceph
libs or, more importantly, the right version of the ceph libs, locally.
Full example: `make build test-bins USE_CACHE=1 USE_GOCO=1`
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-08 10:36:19 -04:00
John Mulligan
7abb5fd321
makefile: use variables for go and gofmt commands
...
There are use cases where the default go commands are not what you want,
including an upcoming change. This simply "variablizes" the makefile.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-07-08 10:36:19 -04:00
John Mulligan
e0727d9cf7
rados: naming conventions: fix c_entry, c_namespace
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_entry -> cEntry" rados/object_iter.go
Command: gofmt -w -r "c_namespace -> cNamespace" rados/object_iter.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan
f25ee98e0a
rados: naming conventions: fix c_cluster_name, c_name
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_cluster_name -> cClusterName" rados/rados.go
Command: gofmt -w -r "c_name -> cName" rados/rados.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan
7f77d82bab
rados: naming conventions: c_user -> cUser
...
Fix up variable names that don't meet Go standards.
Command: gofmt -w -r "c_user -> cUser" rados/rados.go
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00