storage_conf.h 18.0 KB
Newer Older
1 2 3
/*
 * storage_conf.h: config handling for storage driver
 *
4
 * Copyright (C) 2006-2008, 2010-2013 Red Hat, Inc.
5 6 7 8 9 10 11 12 13 14 15 16 17
 * Copyright (C) 2006-2008 Daniel P. Berrange
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library.  If not, see
O
Osier Yang 已提交
19
 * <http://www.gnu.org/licenses/>.
20 21 22 23 24
 *
 * Author: Daniel P. Berrange <berrange@redhat.com>
 */

#ifndef __VIR_STORAGE_CONF_H__
25
# define __VIR_STORAGE_CONF_H__
26

27 28
# include "internal.h"
# include "storage_encryption_conf.h"
29
# include "virbitmap.h"
30
# include "virthread.h"
31

32
# include <libxml/tree.h>
33

34 35 36
typedef struct _virStoragePerms virStoragePerms;
typedef virStoragePerms *virStoragePermsPtr;
struct _virStoragePerms {
37 38 39
    mode_t mode;
    uid_t uid;
    gid_t gid;
40 41 42
    char *label;
};

43 44 45 46 47 48 49 50 51 52 53 54
typedef struct _virStorageTimestamps virStorageTimestamps;
typedef virStorageTimestamps *virStorageTimestampsPtr;
struct _virStorageTimestamps {
    struct timespec atime;
    /* if btime.tv_nsec == -1 then
     * birth time is unknown
     */
    struct timespec btime;
    struct timespec ctime;
    struct timespec mtime;
};

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

/*
 * How the volume's data is stored on underlying
 * physical devices - can potentially span many
 * devices in LVM case.
 */
typedef struct _virStorageVolSourceExtent virStorageVolSourceExtent;
typedef virStorageVolSourceExtent *virStorageVolSourceExtentPtr;
struct _virStorageVolSourceExtent {
    char *path;
    unsigned long long start;
    unsigned long long end;
};

typedef struct _virStorageVolSource virStorageVolSource;
typedef virStorageVolSource *virStorageVolSourcePtr;
struct _virStorageVolSource {
    int nextent;
    virStorageVolSourceExtentPtr extents;
};


/*
 * How the volume appears on the host
 */
typedef struct _virStorageVolTarget virStorageVolTarget;
typedef virStorageVolTarget *virStorageVolTargetPtr;
struct _virStorageVolTarget {
    char *path;
    int format;
    virStoragePerms perms;
86
    virStorageTimestampsPtr timestamps;
87
    int type; /* only used by disk backend for partition type */
88 89
    /* The next three are currently only used in vol->target,
     * not in vol->backingStore. */
90
    virStorageEncryptionPtr encryption;
91 92
    virBitmapPtr features;
    char *compat;
93 94 95 96 97 98 99
};

typedef struct _virStorageVolDef virStorageVolDef;
typedef virStorageVolDef *virStorageVolDefPtr;
struct _virStorageVolDef {
    char *name;
    char *key;
100
    int type; /* enum virStorageVolType */
101

102 103
    unsigned int building;

E
Eric Blake 已提交
104 105
    unsigned long long allocation; /* bytes */
    unsigned long long capacity; /* bytes */
106 107 108

    virStorageVolSource source;
    virStorageVolTarget target;
109
    virStorageVolTarget backingStore;
110 111
};

112 113 114
typedef struct _virStorageVolDefList virStorageVolDefList;
typedef virStorageVolDefList *virStorageVolDefListPtr;
struct _virStorageVolDefList {
115
    size_t count;
116 117
    virStorageVolDefPtr *objs;
};
118

119
VIR_ENUM_DECL(virStorageVol)
120 121

enum virStoragePoolType {
122
    VIR_STORAGE_POOL_DIR,      /* Local directory */
123 124 125 126 127 128
    VIR_STORAGE_POOL_FS,       /* Local filesystem */
    VIR_STORAGE_POOL_NETFS,    /* Networked filesystem - eg NFS, GFS, etc */
    VIR_STORAGE_POOL_LOGICAL,  /* Logical volume groups / volumes */
    VIR_STORAGE_POOL_DISK,     /* Disk partitions */
    VIR_STORAGE_POOL_ISCSI,    /* iSCSI targets */
    VIR_STORAGE_POOL_SCSI,     /* SCSI HBA */
D
Dave Allan 已提交
129
    VIR_STORAGE_POOL_MPATH,    /* Multipath devices */
130
    VIR_STORAGE_POOL_RBD,      /* RADOS Block Device */
131
    VIR_STORAGE_POOL_SHEEPDOG, /* Sheepdog device */
132
    VIR_STORAGE_POOL_GLUSTER,  /* Gluster device */
133 134

    VIR_STORAGE_POOL_LAST,
135 136
};

137
VIR_ENUM_DECL(virStoragePool)
138

139 140 141 142 143 144 145
enum virStoragePoolDeviceType {
    VIR_STORAGE_DEVICE_TYPE_DISK = 0x00,
    VIR_STORAGE_DEVICE_TYPE_ROM = 0x05,

    VIR_STORAGE_DEVICE_TYPE_LAST,
};

146 147 148 149

enum virStoragePoolAuthType {
    VIR_STORAGE_POOL_AUTH_NONE,
    VIR_STORAGE_POOL_AUTH_CHAP,
150
    VIR_STORAGE_POOL_AUTH_CEPHX,
151 152

    VIR_STORAGE_POOL_AUTH_LAST,
153
};
154
VIR_ENUM_DECL(virStoragePoolAuthType)
155

156 157 158 159 160 161 162 163
typedef struct _virStoragePoolAuthSecret virStoragePoolAuthSecret;
typedef virStoragePoolAuthSecret *virStoragePoolAuthSecretPtr;
struct _virStoragePoolAuthSecret {
    unsigned char uuid[VIR_UUID_BUFLEN];
    char *usage;
    bool uuidUsable;
};

164 165 166
typedef struct _virStoragePoolAuthChap virStoragePoolAuthChap;
typedef virStoragePoolAuthChap *virStoragePoolAuthChapPtr;
struct _virStoragePoolAuthChap {
167 168
    char *username;
    virStoragePoolAuthSecret secret;
169 170
};

171 172 173 174
typedef struct _virStoragePoolAuthCephx virStoragePoolAuthCephx;
typedef virStoragePoolAuthCephx *virStoragePoolAuthCephxPtr;
struct _virStoragePoolAuthCephx {
    char *username;
175
    virStoragePoolAuthSecret secret;
176
};
177 178 179 180 181 182 183 184 185 186 187 188

/*
 * For remote pools, info on how to reach the host
 */
typedef struct _virStoragePoolSourceHost virStoragePoolSourceHost;
typedef virStoragePoolSourceHost *virStoragePoolSourceHostPtr;
struct _virStoragePoolSourceHost {
    char *name;
    int port;
};


189
/*
190 191
 * For MSDOS partitions, the free area is important when
 * creating logical partitions
192 193 194 195 196 197 198 199
 */
enum virStorageFreeType {
    VIR_STORAGE_FREE_NONE = 0,
    VIR_STORAGE_FREE_NORMAL,
    VIR_STORAGE_FREE_LOGICAL,
    VIR_STORAGE_FREE_LAST
};

200 201 202 203 204 205 206 207
/*
 * Available extents on the underlying storage
 */
typedef struct _virStoragePoolSourceDeviceExtent virStoragePoolSourceDeviceExtent;
typedef virStoragePoolSourceDeviceExtent *virStoragePoolSourceDeviceExtentPtr;
struct _virStoragePoolSourceDeviceExtent {
    unsigned long long start;
    unsigned long long end;
208
    int type; /* enum virStorageFreeType */
209 210
};

D
David Allan 已提交
211 212
typedef struct _virStoragePoolSourceInitiatorAttr virStoragePoolSourceInitiatorAttr;
struct _virStoragePoolSourceInitiatorAttr {
213
    char *iqn; /* Initiator IQN */
D
David Allan 已提交
214 215
};

216 217 218 219 220 221 222 223 224 225
/*
 * Pools can be backed by one or more devices, and some
 * allow us to track free space on underlying devices.
 */
typedef struct _virStoragePoolSourceDevice virStoragePoolSourceDevice;
typedef virStoragePoolSourceDevice *virStoragePoolSourceDevicePtr;
struct _virStoragePoolSourceDevice {
    int nfreeExtent;
    virStoragePoolSourceDeviceExtentPtr freeExtents;
    char *path;
226 227
    int format; /* Pool specific source format */

228
    /* When the source device is a physical disk,
229 230
     * the geometry data is needed
     */
231 232 233 234 235
    struct _geometry {
        int cyliders;
        int heads;
        int sectors;
    } geometry;
236 237
};

238 239 240 241
enum virStoragePoolSourceAdapterType {
    VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_DEFAULT = 0,
    VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST,
    VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST,
242

243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
    VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_LAST,
};
VIR_ENUM_DECL(virStoragePoolSourceAdapterType)

typedef struct _virStoragePoolSourceAdapter virStoragePoolSourceAdapter;
struct _virStoragePoolSourceAdapter {
    int type; /* enum virStoragePoolSourceAdapterType */

    union {
        char *name;
        struct {
            char *parent;
            char *wwnn;
            char *wwpn;
        } fchost;
    } data;
};
260 261 262 263

typedef struct _virStoragePoolSource virStoragePoolSource;
typedef virStoragePoolSource *virStoragePoolSourcePtr;
struct _virStoragePoolSource {
264 265 266
    /* An optional (maybe multiple) host(s) */
    size_t nhost;
    virStoragePoolSourceHostPtr hosts;
267 268 269 270 271 272 273 274 275

    /* And either one or more devices ... */
    int ndevice;
    virStoragePoolSourceDevicePtr devices;

    /* Or a directory */
    char *dir;

    /* Or an adapter */
276
    virStoragePoolSourceAdapter adapter;
277

278 279 280
    /* Or a name */
    char *name;

D
David Allan 已提交
281 282 283
    /* Initiator IQN */
    virStoragePoolSourceInitiatorAttr initiator;

284 285 286
    int authType;       /* virStoragePoolAuthType */
    union {
        virStoragePoolAuthChap chap;
287
        virStoragePoolAuthCephx cephx;
288 289
    } auth;

290 291 292 293 294 295
    /* Vendor of the source */
    char *vendor;

    /* Product name of the source*/
    char *product;

296 297 298 299
    /* Pool type specific format such as filesystem type,
     * or lvm version, etc.
     */
    int format;
300 301 302 303 304
};

typedef struct _virStoragePoolTarget virStoragePoolTarget;
typedef virStoragePoolTarget *virStoragePoolTargetPtr;
struct _virStoragePoolTarget {
305 306
    char *path; /* Optional local filesystem mapping */
    virStoragePerms perms; /* Default permissions for volumes */
307 308 309 310 311 312 313
};

typedef struct _virStoragePoolDef virStoragePoolDef;
typedef virStoragePoolDef *virStoragePoolDefPtr;
struct _virStoragePoolDef {
    char *name;
    unsigned char uuid[VIR_UUID_BUFLEN];
314
    int type; /* enum virStoragePoolType */
315

E
Eric Blake 已提交
316 317 318
    unsigned long long allocation; /* bytes */
    unsigned long long capacity; /* bytes */
    unsigned long long available; /* bytes */
319 320 321 322 323 324 325 326 327

    virStoragePoolSource source;
    virStoragePoolTarget target;
};

typedef struct _virStoragePoolObj virStoragePoolObj;
typedef virStoragePoolObj *virStoragePoolObjPtr;

struct _virStoragePoolObj {
328
    virMutex lock;
329

330 331 332 333
    char *configFile;
    char *autostartLink;
    int active;
    int autostart;
334
    unsigned int asyncjobs;
335 336 337 338

    virStoragePoolDefPtr def;
    virStoragePoolDefPtr newDef;

339 340
    virStorageVolDefList volumes;
};
341

342 343 344
typedef struct _virStoragePoolObjList virStoragePoolObjList;
typedef virStoragePoolObjList *virStoragePoolObjListPtr;
struct _virStoragePoolObjList {
345
    size_t count;
346
    virStoragePoolObjPtr *objs;
347 348 349 350 351 352
};

typedef struct _virStorageDriverState virStorageDriverState;
typedef virStorageDriverState *virStorageDriverStatePtr;

struct _virStorageDriverState {
353
    virMutex lock;
354

355 356
    virStoragePoolObjList pools;

357 358
    char *configDir;
    char *autostartDir;
359
    bool privileged;
360 361
};

362 363 364
typedef struct _virStoragePoolSourceList virStoragePoolSourceList;
typedef virStoragePoolSourceList *virStoragePoolSourceListPtr;
struct _virStoragePoolSourceList {
365
    int type;
366 367 368
    unsigned int nsources;
    virStoragePoolSourcePtr sources;
};
369

370 371
typedef bool (*virStoragePoolObjListFilter)(virConnectPtr conn,
                                            virStoragePoolDefPtr def);
372

373 374 375
static inline int
virStoragePoolObjIsActive(virStoragePoolObjPtr pool)
{
376 377 378
    return pool->active;
}

379
int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
380 381
                                 const char *configDir,
                                 const char *autostartDir);
382

383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
virStoragePoolObjPtr
virStoragePoolObjFindByUUID(virStoragePoolObjListPtr pools,
                            const unsigned char *uuid);
virStoragePoolObjPtr
virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
                            const char *name);
virStoragePoolObjPtr
virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool,
                                         virStoragePoolDefPtr def);

virStorageVolDefPtr
virStorageVolDefFindByKey(virStoragePoolObjPtr pool,
                          const char *key);
virStorageVolDefPtr
virStorageVolDefFindByPath(virStoragePoolObjPtr pool,
                           const char *path);
virStorageVolDefPtr
virStorageVolDefFindByName(virStoragePoolObjPtr pool,
                           const char *name);
402 403 404

void virStoragePoolObjClearVols(virStoragePoolObjPtr pool);

405 406 407
virStoragePoolDefPtr virStoragePoolDefParseString(const char *xml);
virStoragePoolDefPtr virStoragePoolDefParseFile(const char *filename);
virStoragePoolDefPtr virStoragePoolDefParseNode(xmlDocPtr xml,
408
                                                xmlNodePtr root);
409
char *virStoragePoolDefFormat(virStoragePoolDefPtr def);
410

411 412 413 414 415 416 417 418 419 420
virStorageVolDefPtr
virStorageVolDefParseString(virStoragePoolDefPtr pool,
                            const char *xml);
virStorageVolDefPtr
virStorageVolDefParseFile(virStoragePoolDefPtr pool,
                          const char *filename);
virStorageVolDefPtr
virStorageVolDefParseNode(virStoragePoolDefPtr pool,
                          xmlDocPtr xml,
                          xmlNodePtr root);
421
char *virStorageVolDefFormat(virStoragePoolDefPtr pool,
422 423
                             virStorageVolDefPtr def);

424 425 426
virStoragePoolObjPtr
virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools,
                           virStoragePoolDefPtr def);
427

428
int virStoragePoolObjSaveDef(virStorageDriverStatePtr driver,
429 430
                             virStoragePoolObjPtr pool,
                             virStoragePoolDefPtr def);
431
int virStoragePoolObjDeleteDef(virStoragePoolObjPtr pool);
432 433

void virStorageVolDefFree(virStorageVolDefPtr def);
434
void virStoragePoolSourceClear(virStoragePoolSourcePtr source);
435
void virStoragePoolSourceFree(virStoragePoolSourcePtr source);
436 437
void virStoragePoolDefFree(virStoragePoolDefPtr def);
void virStoragePoolObjFree(virStoragePoolObjPtr pool);
438 439
void virStoragePoolObjListFree(virStoragePoolObjListPtr pools);
void virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
440 441
                             virStoragePoolObjPtr pool);

442
virStoragePoolSourcePtr
443
virStoragePoolDefParseSourceString(const char *srcSpec,
444 445
                                   int pool_type);
virStoragePoolSourcePtr
446 447
virStoragePoolSourceListNewSource(virStoragePoolSourceListPtr list);
char *virStoragePoolSourceListFormat(virStoragePoolSourceListPtr def);
448

449 450 451 452
int virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
                                 virStoragePoolDefPtr def,
                                 unsigned int check_active);

453 454 455
int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
                                      virStoragePoolDefPtr def);

D
Daniel P. Berrange 已提交
456 457 458
void virStoragePoolObjLock(virStoragePoolObjPtr obj);
void virStoragePoolObjUnlock(virStoragePoolObjPtr obj);

459 460 461 462 463 464 465 466 467 468 469 470 471 472

enum virStoragePoolFormatFileSystem {
    VIR_STORAGE_POOL_FS_AUTO = 0,
    VIR_STORAGE_POOL_FS_EXT2,
    VIR_STORAGE_POOL_FS_EXT3,
    VIR_STORAGE_POOL_FS_EXT4,
    VIR_STORAGE_POOL_FS_UFS,
    VIR_STORAGE_POOL_FS_ISO,
    VIR_STORAGE_POOL_FS_UDF,
    VIR_STORAGE_POOL_FS_GFS,
    VIR_STORAGE_POOL_FS_GFS2,
    VIR_STORAGE_POOL_FS_VFAT,
    VIR_STORAGE_POOL_FS_HFSPLUS,
    VIR_STORAGE_POOL_FS_XFS,
J
Jim Fehlig 已提交
473
    VIR_STORAGE_POOL_FS_OCFS2,
474 475
    VIR_STORAGE_POOL_FS_LAST,
};
476
VIR_ENUM_DECL(virStoragePoolFormatFileSystem)
477 478 479 480

enum virStoragePoolFormatFileSystemNet {
    VIR_STORAGE_POOL_NETFS_AUTO = 0,
    VIR_STORAGE_POOL_NETFS_NFS,
481
    VIR_STORAGE_POOL_NETFS_GLUSTERFS,
482
    VIR_STORAGE_POOL_NETFS_CIFS,
483 484
    VIR_STORAGE_POOL_NETFS_LAST,
};
485
VIR_ENUM_DECL(virStoragePoolFormatFileSystemNet)
486 487 488 489 490 491 492 493 494 495 496 497 498

enum virStoragePoolFormatDisk {
    VIR_STORAGE_POOL_DISK_UNKNOWN = 0,
    VIR_STORAGE_POOL_DISK_DOS = 1,
    VIR_STORAGE_POOL_DISK_DVH,
    VIR_STORAGE_POOL_DISK_GPT,
    VIR_STORAGE_POOL_DISK_MAC,
    VIR_STORAGE_POOL_DISK_BSD,
    VIR_STORAGE_POOL_DISK_PC98,
    VIR_STORAGE_POOL_DISK_SUN,
    VIR_STORAGE_POOL_DISK_LVM2,
    VIR_STORAGE_POOL_DISK_LAST,
};
499
VIR_ENUM_DECL(virStoragePoolFormatDisk)
500 501 502 503 504 505

enum virStoragePoolFormatLogical {
    VIR_STORAGE_POOL_LOGICAL_UNKNOWN = 0,
    VIR_STORAGE_POOL_LOGICAL_LVM2 = 1,
    VIR_STORAGE_POOL_LOGICAL_LAST,
};
506
VIR_ENUM_DECL(virStoragePoolFormatLogical)
507 508

/*
509
 * XXX: these are basically partition types.
510
 *
511 512 513
 * fdisk has a bazillion partition ID types parted has
 * practically none, and splits the * info across 3
 * different attributes.
514 515 516 517 518 519 520 521 522 523 524 525 526 527
 *
 * So this is a semi-generic set
 */
enum virStorageVolFormatDisk {
    VIR_STORAGE_VOL_DISK_NONE = 0,
    VIR_STORAGE_VOL_DISK_LINUX,
    VIR_STORAGE_VOL_DISK_FAT16,
    VIR_STORAGE_VOL_DISK_FAT32,
    VIR_STORAGE_VOL_DISK_LINUX_SWAP,
    VIR_STORAGE_VOL_DISK_LINUX_LVM,
    VIR_STORAGE_VOL_DISK_LINUX_RAID,
    VIR_STORAGE_VOL_DISK_EXTENDED,
    VIR_STORAGE_VOL_DISK_LAST,
};
528
VIR_ENUM_DECL(virStorageVolFormatDisk)
529

530 531 532 533 534 535 536
enum virStorageVolTypeDisk {
    VIR_STORAGE_VOL_DISK_TYPE_NONE = 0,
    VIR_STORAGE_VOL_DISK_TYPE_PRIMARY,
    VIR_STORAGE_VOL_DISK_TYPE_LOGICAL,
    VIR_STORAGE_VOL_DISK_TYPE_EXTENDED,
    VIR_STORAGE_VOL_DISK_TYPE_LAST,
};
537

538
/*
539 540
 * Mapping of Parted fs-types MUST be kept in the
 * same order as virStorageVolFormatDisk
541 542 543 544 545 546 547 548 549 550 551 552 553
 */
enum virStoragePartedFsType {
    VIR_STORAGE_PARTED_FS_TYPE_NONE = 0,
    VIR_STORAGE_PARTED_FS_TYPE_LINUX,
    VIR_STORAGE_PARTED_FS_TYPE_FAT16,
    VIR_STORAGE_PARTED_FS_TYPE_FAT32,
    VIR_STORAGE_PARTED_FS_TYPE_LINUX_SWAP,
    VIR_STORAGE_PARTED_FS_TYPE_LINUX_LVM,
    VIR_STORAGE_PARTED_FS_TYPE_LINUX_RAID,
    VIR_STORAGE_PARTED_FS_TYPE_EXTENDED,
    VIR_STORAGE_PARTED_FS_TYPE_LAST,
};
VIR_ENUM_DECL(virStoragePartedFsType)
554

555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE   \
                (VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE)

# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT   \
                (VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT)

# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART    \
                (VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART |  \
                 VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART)

# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE  \
                (VIR_CONNECT_LIST_STORAGE_POOLS_DIR      | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_FS       | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_NETFS    | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL  | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_DISK     | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI    | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_SCSI     | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_MPATH    | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_RBD      | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG)

# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL                  \
                (VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE     | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART  | \
                 VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE)

585 586 587 588 589
int virStoragePoolObjListExport(virConnectPtr conn,
                                virStoragePoolObjList poolobjs,
                                virStoragePoolPtr **pools,
                                virStoragePoolObjListFilter filter,
                                unsigned int flags);
590

591
#endif /* __VIR_STORAGE_CONF_H__ */