Commit Graph

216 Commits

Author SHA1 Message Date
John Mulligan 615b122e49 rados: naming conventions: fixes in test func TestListAcrossNamespaces
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan 5506545be0 rados: naming conventions: fixes in test function TestSetNamespace
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan 35bcee9804 rados: naming conventions: fixes in test funcs TestObjectIterator*
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan ef031dddcf rados: naming conventions: fixes in test function TestGetPoolStats
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan a15c91d711 rados: naming conventions: fixes in test function TestCreate
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan b045c8b239 rados: naming conventions: fixes in test funcs TestGetPoolBy{Name,ID}
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan 810022af7b rados: naming conventions: fixes in test function TestMakeDeletePool
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan e3196e45e0 rados: naming conventions: fixes in test function TestGetClusterStats
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan 9d7d31d158 rados: naming conventions: fixes in test functions for config
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00:00
John Mulligan fcdd6fd657 rados: naming conventions: fixes in TestMonCommandWithInputBuffer
Fix up variable names that don't meet Go standards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-23 15:28:00 +00: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
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
John Mulligan 801a9cc498 rados: naming conventions: fix c_major, c_minor, c_patch
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_major -> cMajor" rados/rados.go
Command: gofmt -w -r "c_minor -> cMinor" rados/rados.go
Command: gofmt -w -r "c_patch -> cPatch" rados/rados.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan 4c12ff0fda rados: naming conventions: c_stat -> cStat
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_stat -> cStat" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan 9619de1d84 rados: naming conventions: c_opt/c_val -> cOpt/cVal
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_opt -> cOpt" rados/conn.go
Command: gofmt -w -r "c_val -> cVal" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan debaac7031 rados: naming conventions: c_id -> cid
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_id -> cid" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan 46c860c614 rados: naming conventions: c_pool -> cPool
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_pool -> cPool" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan 5cbf7c6514 rados: naming conventions: c_path -> cPath
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_path -> cPath" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
John Mulligan d7f73e112d rados: naming conventions: c_name -> cName
Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_name -> cName" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-06-28 13:51:01 -04:00
Mudit Agarwal 444050570c rados: add SetPoolFullTry() and UnsetPoolFullTry()
SetPoolFullTry() implements rados_set_pool_full_try() and
UnsetPoolFullTry() implements rados_unset_pool_full_try() octopus onwards.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2021-06-02 06:16:01 +00:00
Mudit Agarwal 4955746fb2 rados: add SetPoolFullTry() and UnsetPoolFullTry() for nautilus
SetPoolFullTry implements rados_set_osdmap_full_try() and
UnsetPoolFullTry implements rados_unset_osdmap_full_try() in
nautilus.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2021-06-02 06:16:01 +00:00
Mudit Agarwal 39278e1dd0 rados: changed build tag in rados/ioctx_nautilus.go
changed build tag in rados/ioctx_nautilus.go and
rados/ioctx_nautilus_test.go in a way such that the
functions in these files are built for nautilus only.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2021-06-02 06:16:01 +00:00
Mudit Agarwal 76e4089806 rados: move GetNamespace() to rados/ioctx.go
Now, we don't support ceph versions < nautilus this function
can move to a generic file so that nautilus specific functions
can be written here. Moved GetNamespace() and the corresponding
test function.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2021-06-02 06:16:01 +00:00
Sven Anderson c45fa95b32 rados: remove pointer arithmetic on C-buffers
This change uses slices on top of C allocated array memory in order
to have a simple (no pointer arithmetic) and safe (boundary-checked)
access to its elements.

Signed-off-by: Sven Anderson <sven@redhat.com>
2021-05-03 16:20:34 +00:00
John Mulligan c91f54ef25 rados: add test cases for ReadOp type and functions
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00
John Mulligan 0a67ff8f5a rados: add an initial set of tests for WriteOp operations
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00
John Mulligan 315188eaef rados: add AssertExists function to ReadOp
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00
John Mulligan c8d8d8c364 rados: add Write, WriteFull, and WriteSame WriteOp functions
Add Write implementing rados_write_op_write.
Add WriteFull implementing rados_write_op_write_full.
Add WriteSame implementing rados_write_op_writesame.

These are some of the basic functions needed to write data to
a rados object using a WriteOp.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00
John Mulligan e4e1257768 rados: add AssertExists WriteOp function
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00
John Mulligan 570738b24c rados: add CleanOmap WriteOp function
Reimplement CleanOmap in term of a new CleanOmap function on the
WriteOp.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00