forked from nanovms/ops
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow mounting volume by label (nanovms#662)
* refactor volumes and allow mount by label - remove JSON store, listing volumes now scans default volume dir - <volume_name>:<volume_uuid> for filename, <volume_name>:<volume_label> symlink for label - if no label is specified, label is set to default - if volume with default label exists, on next volume created without label, attach label to the latest volume * implement volume mount on local image operations * add onprem volume tests * add tests and fix bugs * remove unused mock * setup nightly for volume test * fix create and mount volume with label * Fix deleting volume by label and uuid. * Also use volume name as label. Co-authored-by: Fábio Ferreira <[email protected]>
- Loading branch information
1 parent
a15a8f2
commit b235d66
Showing
20 changed files
with
946 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package lepton | ||
|
||
// CreateVolume is a stub to satisfy VolumeService interface | ||
func (a *AWS) CreateVolume(config *Config, name, data, size, provider string) (NanosVolume, error) { | ||
var vol NanosVolume | ||
return vol, nil | ||
} | ||
|
||
// GetAllVolumes is a stub to satisfy VolumeService interface | ||
func (a *AWS) GetAllVolumes(config *Config) error { | ||
return nil | ||
} | ||
|
||
// DeleteVolume is a stub to satisfy VolumeService interface | ||
func (a *AWS) DeleteVolume(config *Config, name string) error { | ||
return nil | ||
} | ||
|
||
// AttachVolume is a stub to satisfy VolumeService interface | ||
func (a *AWS) AttachVolume(config *Config, image, name, mount string) error { | ||
return nil | ||
} | ||
|
||
// DetachVolume is a stub to satisfy VolumeService interface | ||
func (a *AWS) DetachVolume(config *Config, image, name string) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package lepton | ||
|
||
// CreateVolume is a stub to satisfy VolumeService interface | ||
func (a *Azure) CreateVolume(config *Config, name, data, size, provider string) (NanosVolume, error) { | ||
var vol NanosVolume | ||
return vol, nil | ||
} | ||
|
||
// GetAllVolumes is a stub to satisfy VolumeService interface | ||
func (a *Azure) GetAllVolumes(config *Config) error { | ||
return nil | ||
} | ||
|
||
// DeleteVolume is a stub to satisfy VolumeService interface | ||
func (a *Azure) DeleteVolume(config *Config, name string) error { | ||
return nil | ||
} | ||
|
||
// AttachVolume is a stub to satisfy VolumeService interface | ||
func (a *Azure) AttachVolume(config *Config, image, name, mount string) error { | ||
return nil | ||
} | ||
|
||
// DetachVolume is a stub to satisfy VolumeService interface | ||
func (a *Azure) DetachVolume(config *Config, image, name string) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package lepton | ||
|
||
// CreateVolume is a stub to satisfy VolumeService interface | ||
func (do *DigitalOcean) CreateVolume(config *Config, name, data, size, provider string) (NanosVolume, error) { | ||
var vol NanosVolume | ||
return vol, nil | ||
} | ||
|
||
// GetAllVolumes is a stub to satisfy VolumeService interface | ||
func (do *DigitalOcean) GetAllVolumes(config *Config) error { | ||
return nil | ||
} | ||
|
||
// DeleteVolume is a stub to satisfy VolumeService interface | ||
func (do *DigitalOcean) DeleteVolume(config *Config, name string) error { | ||
return nil | ||
} | ||
|
||
// AttachVolume is a stub to satisfy VolumeService interface | ||
func (do *DigitalOcean) AttachVolume(config *Config, image, name, mount string) error { | ||
return nil | ||
} | ||
|
||
// DetachVolume is a stub to satisfy VolumeService interface | ||
func (do *DigitalOcean) DetachVolume(config *Config, image, name string) error { | ||
return nil | ||
} |
Oops, something went wrong.