libstorage-ng
Toggle main menu visibility
Loading...
Searching...
No Matches
Nfs.h
1
/*
2
* Copyright (c) [2017-2020] SUSE LLC
3
*
4
* All Rights Reserved.
5
*
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms of version 2 of the GNU General Public License as published
8
* by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
* more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, contact Novell, Inc.
17
*
18
* To contact Novell about this file by physical or electronic mail, you may
19
* find current contact information at www.novell.com.
20
*/
21
22
23
#ifndef STORAGE_NFS_H
24
#define STORAGE_NFS_H
25
26
27
#include "storage/Filesystems/Filesystem.h"
28
#include "storage/Devicegraph.h"
29
30
31
namespace
storage
32
{
33
34
class
NfsNotFoundByServerAndPath :
public
DeviceNotFound
35
{
36
public
:
37
38
NfsNotFoundByServerAndPath(
const
std::string& server,
const
std::string& path);
39
};
40
41
55
class
Nfs :
public
Filesystem
56
{
57
public
:
58
64
static
Nfs*
create
(
Devicegraph
* devicegraph,
const
std::string& server,
const
std::string& path);
65
66
static
Nfs* load(
Devicegraph
* devicegraph,
const
xmlNode* node);
67
71
const
std::string&
get_server
()
const
;
72
76
const
std::string&
get_path
()
const
;
77
81
static
std::vector<Nfs*>
get_all
(
Devicegraph
* devicegraph);
82
86
static
std::vector<const Nfs*>
get_all
(
const
Devicegraph
* devicegraph);
87
94
static
Nfs*
find_by_server_and_path
(
Devicegraph
* devicegraph,
const
std::string& server,
95
const
std::string& path);
96
100
static
const
Nfs*
find_by_server_and_path
(
const
Devicegraph
* devicegraph,
101
const
std::string& server,
const
std::string& path);
102
103
public
:
104
105
class
Impl;
106
107
Impl& get_impl();
108
const
Impl& get_impl()
const
;
109
110
virtual
Nfs* clone()
const override
;
111
virtual
std::unique_ptr<Device> clone_v2()
const override
;
112
113
Nfs(Impl* impl);
114
ST_NO_SWIG Nfs(std::unique_ptr<Device::Impl>&& impl);
115
116
};
117
118
124
bool
is_nfs
(
const
Device
* device);
125
132
Nfs
*
to_nfs
(
Device
* device);
133
137
const
Nfs
*
to_nfs
(
const
Device
* device);
138
139
}
140
141
#endif
storage::Device
An abstract base class for storage devices.
Definition
Device.h:82
storage::Devicegraph
The main container of the libstorage-ng.
Definition
Devicegraph.h:170
storage::Nfs
Class to represent a NFS mount.
Definition
Nfs.h:56
storage::Nfs::find_by_server_and_path
static Nfs * find_by_server_and_path(Devicegraph *devicegraph, const std::string &server, const std::string &path)
Find a Nfs by its server and path.
storage::Nfs::get_all
static std::vector< Nfs * > get_all(Devicegraph *devicegraph)
Get all Nfses.
storage::Nfs::find_by_server_and_path
static const Nfs * find_by_server_and_path(const Devicegraph *devicegraph, const std::string &server, const std::string &path)
Find a Nfs by its server and path.
storage::Nfs::get_server
const std::string & get_server() const
Get the server of the Nfs.
storage::Nfs::create
static Nfs * create(Devicegraph *devicegraph, const std::string &server, const std::string &path)
Create a device of type Nfs.
storage::Nfs::get_all
static std::vector< const Nfs * > get_all(const Devicegraph *devicegraph)
Get all Nfses.
storage::Nfs::get_path
const std::string & get_path() const
Get the path of the Nfs.
storage
The storage namespace.
Definition
Actiongraph.h:40
storage::is_nfs
bool is_nfs(const Device *device)
Checks whether device points to a Nfs.
storage::to_nfs
Nfs * to_nfs(Device *device)
Converts pointer to Device to pointer to Nfs.
storage
Filesystems
Nfs.h
Generated by
1.17.0