/usr/share/gocode/src/github.com/lxc/lxd/lxd/storage_test.go is in golang-github-lxc-lxd-dev 2.0.2-0ubuntu1~16.04.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | package main
import (
"fmt"
"github.com/gorilla/websocket"
log "gopkg.in/inconshreveable/log15.v2"
)
type storageMock struct {
d *Daemon
sType storageType
log log.Logger
storageShared
}
func (s *storageMock) Init(config map[string]interface{}) (storage, error) {
s.sType = storageTypeMock
s.sTypeName = storageTypeToString(storageTypeMock)
if err := s.initShared(); err != nil {
return s, err
}
return s, nil
}
func (s *storageMock) GetStorageType() storageType {
return s.sType
}
func (s *storageMock) GetStorageTypeName() string {
return s.sTypeName
}
func (s *storageMock) ContainerCreate(container container) error {
return nil
}
func (s *storageMock) ContainerCreateFromImage(
container container, imageFingerprint string) error {
return nil
}
func (s *storageMock) ContainerCanRestore(container container, sourceContainer container) error {
return nil
}
func (s *storageMock) ContainerDelete(container container) error {
return nil
}
func (s *storageMock) ContainerCopy(
container container, sourceContainer container) error {
return nil
}
func (s *storageMock) ContainerStart(container container) error {
return nil
}
func (s *storageMock) ContainerStop(container container) error {
return nil
}
func (s *storageMock) ContainerRename(
container container, newName string) error {
return nil
}
func (s *storageMock) ContainerRestore(
container container, sourceContainer container) error {
return nil
}
func (s *storageMock) ContainerSetQuota(
container container, size int64) error {
return nil
}
func (s *storageMock) ContainerGetUsage(
container container) (int64, error) {
return 0, nil
}
func (s *storageMock) ContainerSnapshotCreate(
snapshotContainer container, sourceContainer container) error {
return nil
}
func (s *storageMock) ContainerSnapshotDelete(
snapshotContainer container) error {
return nil
}
func (s *storageMock) ContainerSnapshotRename(
snapshotContainer container, newName string) error {
return nil
}
func (s *storageMock) ContainerSnapshotStart(container container) error {
return nil
}
func (s *storageMock) ContainerSnapshotStop(container container) error {
return nil
}
func (s *storageMock) ContainerSnapshotCreateEmpty(snapshotContainer container) error {
return nil
}
func (s *storageMock) ImageCreate(fingerprint string) error {
return nil
}
func (s *storageMock) ImageDelete(fingerprint string) error {
return nil
}
func (s *storageMock) MigrationType() MigrationFSType {
return MigrationFSType_RSYNC
}
func (s *storageMock) MigrationSource(container container) (MigrationStorageSourceDriver, error) {
return nil, fmt.Errorf("not implemented")
}
func (s *storageMock) MigrationSink(live bool, container container, snapshots []container, conn *websocket.Conn) error {
return nil
}
|