-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement cinder volume driver as block storage (#9)
Implement cinder volume driver as block storage Unrelated changes: - Use fmt.Sprintf to concatenate strings - Rename plugin to common name velero.io/openstack - Allow authenticating against swift with special env vars - Allow Authenticate to specify which service is authenticating - Log enhancements (lowercase the errors) - Update README with installation, env vars usage, volume backups section, development section
- Loading branch information
Showing
5 changed files
with
373 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
package main | ||
|
||
import ( | ||
swift "github.com/Lirt/velero-plugin-swift/src/swift" | ||
"github.com/Lirt/velero-plugin-swift/src/cinder" | ||
"github.com/Lirt/velero-plugin-swift/src/swift" | ||
"github.com/sirupsen/logrus" | ||
veleroplugin "github.com/vmware-tanzu/velero/pkg/plugin/framework" | ||
) | ||
|
||
func main() { | ||
veleroplugin.NewServer(). | ||
RegisterObjectStore("velero.io/swift", newSwiftObjectStore). | ||
RegisterObjectStore("velero.io/openstack", newSwiftObjectStore). | ||
RegisterVolumeSnapshotter("velero.io/openstack", newCinderBlockStore). | ||
Serve() | ||
} | ||
|
||
func newSwiftObjectStore(logger logrus.FieldLogger) (interface{}, error) { | ||
return swift.NewObjectStore(logger), nil | ||
} | ||
|
||
func newCinderBlockStore(logger logrus.FieldLogger) (interface{}, error) { | ||
return cinder.NewBlockStore(logger), nil | ||
} |
Oops, something went wrong.