mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
journal: rename CSIJournal to Config
This better reflects what it actually does now. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
52603d595a
commit
8dea42a624
@ -56,7 +56,7 @@ var (
|
|||||||
|
|
||||||
// volJournal is used to maintain RADOS based journals for CO generated
|
// volJournal is used to maintain RADOS based journals for CO generated
|
||||||
// VolumeName to backing CephFS subvolumes
|
// VolumeName to backing CephFS subvolumes
|
||||||
volJournal *journal.CSIJournal
|
volJournal *journal.Config
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewDriver returns new ceph driver
|
// NewDriver returns new ceph driver
|
||||||
|
@ -112,7 +112,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// CSIJournal defines the interface and the required key names for the above RADOS based OMaps
|
// CSIJournal defines the interface and the required key names for the above RADOS based OMaps
|
||||||
type CSIJournal struct {
|
type Config struct {
|
||||||
// csiDirectory is the name of the CSI volumes object map that contains CSI volume-name (or
|
// csiDirectory is the name of the CSI volumes object map that contains CSI volume-name (or
|
||||||
// snapshot name) based keys
|
// snapshot name) based keys
|
||||||
csiDirectory string
|
csiDirectory string
|
||||||
@ -147,8 +147,8 @@ type CSIJournal struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewCSIVolumeJournal returns an instance of CSIJournal for volumes
|
// NewCSIVolumeJournal returns an instance of CSIJournal for volumes
|
||||||
func NewCSIVolumeJournal(suffix string) *CSIJournal {
|
func NewCSIVolumeJournal(suffix string) *Config {
|
||||||
return &CSIJournal{
|
return &Config{
|
||||||
csiDirectory: "csi.volumes." + suffix,
|
csiDirectory: "csi.volumes." + suffix,
|
||||||
csiNameKeyPrefix: "csi.volume.",
|
csiNameKeyPrefix: "csi.volume.",
|
||||||
cephUUIDDirectoryPrefix: "csi.volume.",
|
cephUUIDDirectoryPrefix: "csi.volume.",
|
||||||
@ -162,8 +162,8 @@ func NewCSIVolumeJournal(suffix string) *CSIJournal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewCSISnapshotJournal returns an instance of CSIJournal for snapshots
|
// NewCSISnapshotJournal returns an instance of CSIJournal for snapshots
|
||||||
func NewCSISnapshotJournal(suffix string) *CSIJournal {
|
func NewCSISnapshotJournal(suffix string) *Config {
|
||||||
return &CSIJournal{
|
return &Config{
|
||||||
csiDirectory: "csi.snaps." + suffix,
|
csiDirectory: "csi.snaps." + suffix,
|
||||||
csiNameKeyPrefix: "csi.snap.",
|
csiNameKeyPrefix: "csi.snap.",
|
||||||
cephUUIDDirectoryPrefix: "csi.snap.",
|
cephUUIDDirectoryPrefix: "csi.snap.",
|
||||||
@ -178,14 +178,14 @@ func NewCSISnapshotJournal(suffix string) *CSIJournal {
|
|||||||
|
|
||||||
// NewCSIVolumeJournalWithNamespace returns an instance of CSIJournal for
|
// NewCSIVolumeJournalWithNamespace returns an instance of CSIJournal for
|
||||||
// volumes using a predetermined namespace value.
|
// volumes using a predetermined namespace value.
|
||||||
func NewCSIVolumeJournalWithNamespace(suffix, ns string) *CSIJournal {
|
func NewCSIVolumeJournalWithNamespace(suffix, ns string) *Config {
|
||||||
j := NewCSIVolumeJournal(suffix)
|
j := NewCSIVolumeJournal(suffix)
|
||||||
j.namespace = ns
|
j.namespace = ns
|
||||||
return j
|
return j
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetNameForUUID returns volume name
|
// GetNameForUUID returns volume name
|
||||||
func (cj *CSIJournal) GetNameForUUID(prefix, uid string, isSnapshot bool) string {
|
func (cj *Config) GetNameForUUID(prefix, uid string, isSnapshot bool) string {
|
||||||
if prefix == "" {
|
if prefix == "" {
|
||||||
if isSnapshot {
|
if isSnapshot {
|
||||||
prefix = defaultSnapshotNamingPrefix
|
prefix = defaultSnapshotNamingPrefix
|
||||||
@ -207,14 +207,14 @@ type ImageData struct {
|
|||||||
// Connection represents a real or virtual connection to a ceph cluster
|
// Connection represents a real or virtual connection to a ceph cluster
|
||||||
// that can make changes to the journal(s).
|
// that can make changes to the journal(s).
|
||||||
type Connection struct {
|
type Connection struct {
|
||||||
config *CSIJournal
|
config *Config
|
||||||
// connection metadata
|
// connection metadata
|
||||||
monitors string
|
monitors string
|
||||||
cr *util.Credentials
|
cr *util.Credentials
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect establishes a new connection to a ceph cluster for journal metadata.
|
// Connect establishes a new connection to a ceph cluster for journal metadata.
|
||||||
func (cj *CSIJournal) Connect(monitors string, cr *util.Credentials) (*Connection, error) {
|
func (cj *Config) Connect(monitors string, cr *util.Credentials) (*Connection, error) {
|
||||||
conn := &Connection{
|
conn := &Connection{
|
||||||
config: cj,
|
config: cj,
|
||||||
monitors: monitors,
|
monitors: monitors,
|
||||||
|
@ -51,8 +51,8 @@ var (
|
|||||||
|
|
||||||
// volJournal and snapJournal are used to maintain RADOS based journals for CO generated
|
// volJournal and snapJournal are used to maintain RADOS based journals for CO generated
|
||||||
// VolumeName to backing RBD images
|
// VolumeName to backing RBD images
|
||||||
volJournal *journal.CSIJournal
|
volJournal *journal.Config
|
||||||
snapJournal *journal.CSIJournal
|
snapJournal *journal.Config
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewDriver returns new rbd driver
|
// NewDriver returns new rbd driver
|
||||||
|
Loading…
Reference in New Issue
Block a user