mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
chore(fdo): remove FDO code EE-7235 (#11981)
This commit is contained in:
parent
1a3db327c7
commit
19fa40286a
57 changed files with 3 additions and 2609 deletions
|
@ -36,8 +36,6 @@ const (
|
|||
ManifestFileDefaultName = "k8s-deployment.yml"
|
||||
// EdgeStackStorePath represents the subfolder where edge stack files are stored in the file store folder.
|
||||
EdgeStackStorePath = "edge_stacks"
|
||||
// FDOProfileStorePath represents the subfolder where FDO profiles files are stored in the file store folder.
|
||||
FDOProfileStorePath = "fdo_profiles"
|
||||
// PrivateKeyFile represents the name on disk of the file containing the private key.
|
||||
PrivateKeyFile = "portainer.key"
|
||||
// PublicKeyFile represents the name on disk of the file containing the public key.
|
||||
|
@ -1003,23 +1001,6 @@ func MoveDirectory(originalPath, newPath string, overwriteTargetPath bool) error
|
|||
return os.Rename(originalPath, newPath)
|
||||
}
|
||||
|
||||
// StoreFDOProfileFileFromBytes creates a subfolder in the FDOProfileStorePath and stores a new file from bytes.
|
||||
// It returns the path to the folder where the file is stored.
|
||||
func (service *Service) StoreFDOProfileFileFromBytes(fdoProfileIdentifier string, data []byte) (string, error) {
|
||||
err := service.createDirectoryInStore(FDOProfileStorePath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
filePath := JoinPaths(FDOProfileStorePath, fdoProfileIdentifier)
|
||||
err = service.createFileInStore(filePath, bytes.NewReader(data))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return service.wrapFileStore(filePath), nil
|
||||
}
|
||||
|
||||
func CreateFile(path string, r io.Reader) error {
|
||||
out, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue