Package com.cloud.agent.api

Examples of com.cloud.agent.api.StoragePoolInfo


        txn.close();
                txn = Transaction.open(Transaction.CLOUD_DB);
                txn.close();
      }
    }
    return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
        storagePool.getMountPoint(), storagePool.getPoolType(), storagePool.getCapacity(), 0);
  }
View Full Code Here


        txn.close();
                txn = Transaction.open(Transaction.CLOUD_DB);
                txn.close();
      }
    }
    return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
        storagePool.getMountPoint(), storagePool.getPoolType(), storagePool.getCapacity(), 0);
  }
View Full Code Here

                    long avail = cap - extsr.getPhysicalUtilisation(conn);
                    String name = "Cloud Stack Local EXT Storage Pool for " + _host.uuid;
                    extsr.setNameDescription(conn, name);
                    Host host = Host.getByUuid(conn, _host.uuid);
                    String address = host.getAddress(conn);
                    StoragePoolInfo pInfo = new StoragePoolInfo(extsr.getNameLabel(conn), address, SRType.EXT.toString(), SRType.EXT.toString(), Storage.StoragePoolType.EXT, cap, avail);
                    StartupStorageCommand cmd = new StartupStorageCommand();
                    cmd.setPoolInfo(pInfo);
                    cmd.setGuid(_host.uuid);
                    cmd.setDataCenter(Long.toString(_dcId));
                    cmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);
View Full Code Here

                txn.close();
                txn = Transaction.open(Transaction.CLOUD_DB);
                txn.close();
            }
        }
        return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
                storagePool.getMountPoint(), storagePool.getPoolType(), storagePool.getCapacity(), 0);
    }
View Full Code Here

                txn.close();
                txn = Transaction.open(Transaction.CLOUD_DB);
                txn.close();
            }
        }
        return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
                storagePool.getMountPoint(), storagePool.getPoolType(), storagePool.getCapacity(), 0);
    }
View Full Code Here

                    lvmsr.setNameLabel(conn, lvmuuid);
                    String name = "Cloud Stack Local LVM Storage Pool for " + _host.uuid;
                    lvmsr.setNameDescription(conn, name);
                    Host host = Host.getByUuid(conn, _host.uuid);
                    String address = host.getAddress(conn);
                    StoragePoolInfo pInfo = new StoragePoolInfo(lvmuuid, address, SRType.LVM.toString(), SRType.LVM.toString(), StoragePoolType.LVM, cap, avail);
                    StartupStorageCommand cmd = new StartupStorageCommand();
                    cmd.setPoolInfo(pInfo);
                    cmd.setGuid(_host.uuid);
                    cmd.setDataCenter(Long.toString(_dcId));
                    cmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);
                    return cmd;
                }
            } catch (XenAPIException e) {
                String msg = "build local LVM info err in host:" + _host.uuid + e.toString();
                s_logger.warn(msg);
            } catch (XmlRpcException e) {
                String msg = "build local LVM info err in host:" + _host.uuid + e.getMessage();
                s_logger.warn(msg);
            }
        }

        SR extsr = getLocalEXTSR(conn);
        if (extsr != null) {
            try {
                String extuuid = extsr.getUuid(conn);
                _host.localSRuuid = extuuid;
                long cap = extsr.getPhysicalSize(conn);
                if (cap > 0) {
                    long avail = cap - extsr.getPhysicalUtilisation(conn);
                    extsr.setNameLabel(conn, extuuid);
                    String name = "Cloud Stack Local EXT Storage Pool for " + _host.uuid;
                    extsr.setNameDescription(conn, name);
                    Host host = Host.getByUuid(conn, _host.uuid);
                    String address = host.getAddress(conn);
                    StoragePoolInfo pInfo = new StoragePoolInfo(extuuid, address, SRType.EXT.toString(), SRType.EXT.toString(), StoragePoolType.EXT, cap, avail);
                    StartupStorageCommand cmd = new StartupStorageCommand();
                    cmd.setPoolInfo(pInfo);
                    cmd.setGuid(_host.uuid);
                    cmd.setDataCenter(Long.toString(_dcId));
                    cmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);
View Full Code Here

        String capacity = (String) getConfiguredProperty(
                "local.storage.capacity", "1000000000");
        String available = (String) getConfiguredProperty(
                "local.storage.avail", "10000000");

        return new StoragePoolInfo(uuid, hostIp, localStoragePath,
                localStoragePath, StoragePoolType.Filesystem,
                Long.parseLong(capacity), Long.parseLong(available));

    }
View Full Code Here

                (Long) info.get(4), (String) info.get(3), HypervisorType.KVM,
                RouterPrivateIpStrategy.HostLocal, changes, null);
        fillNetworkInformation(cmd);
        cmd.getHostDetails().putAll(getVersionStrings());
        cmd.setCluster(getConfiguredProperty("cluster", "1"));
        StoragePoolInfo pi = initializeLocalStorage();
        StartupStorageCommand sscmd = new StartupStorageCommand();
        sscmd.setPoolInfo(pi);
        sscmd.setGuid(pi.getUuid());
        sscmd.setDataCenter((String) _params.get("zone"));
        sscmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);

        return new StartupCommand[] { cmd, sscmd };
    }
View Full Code Here

                txn.close();
                txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
                txn.close();
            }
        }
        return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
                storagePool.getMountPoint(), storagePool.getPoolType(), storagePool.getCapacity(), 0);
    }
View Full Code Here

                txn.close();
                txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
                txn.close();
            }
        }
        return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
                storagePool.getMountPoint(), storagePool.getPoolType(), storagePool.getCapacity(), 0);
    }
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.StoragePoolInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.