Examples of NfsTO


Examples of com.cloud.agent.api.to.NfsTO

            }
           
            if (!(store instanceof NfsTO)) {
                throw new CloudRuntimeException("only support mount iso on nfs");
            }
            NfsTO nfsStore = (NfsTO)store;
            String isoPath = nfsStore.getUrl() + File.separator + iso.getPath();
            int index = isoPath.lastIndexOf("/");

            String mountpoint = isoPath.substring(0, index);
            URI uri;
            try {
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

                        DataStoreTO imageStore = iso.getDataStore();
                        if (!(imageStore instanceof NfsTO)) {
                            s_logger.debug("unsupported protocol");
                            throw new Exception("unsupported protocol");
                        }
                        NfsTO nfsImageStore = (NfsTO)imageStore;
                        String isoPath = nfsImageStore.getUrl() + File.separator + iso.getPath();
                        Pair<String, ManagedObjectReference> isoDatastoreInfo = getIsoDatastoreInfo(hyperHost, isoPath);
                        assert (isoDatastoreInfo != null);
                        assert (isoDatastoreInfo.second() != null);

                        deviceConfigSpecArray[i] = new VirtualDeviceConfigSpec();
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

    EndPointSelector _epSelector;

    @Override
    public DataStoreTO getStoreTO(DataStore store) {
        ImageStoreImpl nfsStore = (ImageStoreImpl) store;
        NfsTO nfsTO = new NfsTO();
        nfsTO.setRole(store.getRole());
        nfsTO.setUrl(nfsStore.getUri());
        return nfsTO;
    }
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO


    @Override
    public DataStoreTO getStoreTO(DataStore store) {
        ImageStoreImpl nfsStore = (ImageStoreImpl) store;
        NfsTO nfsTO = new NfsTO();
        nfsTO.setRole(store.getRole());
        nfsTO.setUrl(nfsStore.getUri());
        return nfsTO;
    }
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

          TemplateObjectTO template = (TemplateObjectTO)isoTO;
          DataStoreTO store = template.getDataStore();
          if (!(store instanceof NfsTO)) {
            throw new CloudRuntimeException("unsupported protocol");
          }
          NfsTO nfsStore = (NfsTO)store;
          String isoPath = nfsStore.getUrl() + File.separator + template.getPath();
          OvmDisk.Details iso = new OvmDisk.Details();
          URI path = new URI(isoPath);
          iso.path = path.getHost() + ":" + path.getPath();
          iso.type = OvmDisk.READ;
          iso.isIso = true;
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

            throws LibvirtException, URISyntaxException {
        DataTO data = volume.getData();
        DataStoreTO store = data.getDataStore();

        if (volume.getType() == Volume.Type.ISO && data.getPath() != null) {
            NfsTO nfsStore = (NfsTO)store;
            String isoPath = nfsStore.getUrl() + File.separator + data.getPath();
            int index = isoPath.lastIndexOf("/");
            String path = isoPath.substring(0, index);
            String name = isoPath.substring(index + 1);
            KVMStoragePool secondaryPool = _storagePoolMgr.getStoragePoolByURI(
                    path);
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

        for (DiskTO volume : disks) {
            KVMPhysicalDisk physicalDisk = null;
            KVMStoragePool pool = null;
            DataTO data = volume.getData();
            if (volume.getType() == Volume.Type.ISO && data.getPath() != null) {
                NfsTO nfsStore = (NfsTO)data.getDataStore();
                String volPath = nfsStore.getUrl() + File.separator + data.getPath();
                int index = volPath.lastIndexOf("/");
                String volDir = volPath.substring(0, index);
                String volName = volPath.substring(index + 1);
                KVMStoragePool secondaryStorage = _storagePoolMgr.
                        getStoragePoolByURI(volDir);
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

        } else {
            if (!(store instanceof NfsTO)) {
                s_logger.debug("Can't attach a iso which is not created on nfs: ");
                return new AttachAnswer("Can't attach a iso which is not created on nfs: ");
            }
            NfsTO nfsStore = (NfsTO)store;
            isoURL = nfsStore.getUrl() + File.separator + data.getPath();
        }

        String vmName = cmd.getVmName();
        try {
            Connection conn = this.hypervisorResource.getConnection();
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

        } else {
            if (!(store instanceof NfsTO)) {
                s_logger.debug("Can't attach a iso which is not created on nfs: ");
                return new AttachAnswer("Can't attach a iso which is not created on nfs: ");
            }
            NfsTO nfsStore = (NfsTO)store;
            isoURL = nfsStore.getUrl() + File.separator + data.getPath();
        }

        try {
            Connection conn = this.hypervisorResource.getConnection();
            // Find the VM
View Full Code Here

Examples of com.cloud.agent.api.to.NfsTO

        DataTO destData = cmd.getDestTO();
        int wait = cmd.getWait();
        DataStoreTO srcStore = srcData.getDataStore();
        try {
            if ((srcStore instanceof NfsTO) && (srcData.getObjectType() == DataObjectType.TEMPLATE)) {
                NfsTO srcImageStore = (NfsTO)srcStore;
                TemplateObjectTO srcTemplate = (TemplateObjectTO)srcData;
                String storeUrl = srcImageStore.getUrl();

                URI uri = new URI(storeUrl);
                String tmplpath = uri.getHost() + ":" + uri.getPath() + "/" + srcData.getPath();
                PrimaryDataStoreTO destStore = (PrimaryDataStoreTO)destData.getDataStore();
                String poolName = destStore.getUuid();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.