Examples of HostStorageSystemMO


Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        final List<Exception> exceptions = new ArrayList<Exception>();

        for (Pair<ManagedObjectReference, String> hostPair : lstHosts) {
            HostMO host = new HostMO(context, hostPair.first());
            HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

            boolean iScsiHbaConfigured = false;

            for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                if (hba instanceof HostInternetScsiHba) {
                    // just finding an instance of HostInternetScsiHba means that we have found at least one configured iSCSI HBA
                    // at least one iSCSI HBA must be configured before a CloudStack user can use this host for iSCSI storage
                    iScsiHbaConfigured = true;

                    final String iScsiHbaDevice = hba.getDevice();

                    final HostStorageSystemMO hss = hostStorageSystem;

                    executorService.submit(new Thread() {
                        @Override
                        public void run() {
                            try {
                                if (add) {
                                    hss.addInternetScsiStaticTargets(iScsiHbaDevice, lstTargets);
                                }
                                else {
                                    hss.removeInternetScsiStaticTargets(iScsiHbaDevice, lstTargets);
                                }

                                hss.rescanHba(iScsiHbaDevice);
                                hss.rescanVmfs();
                            }
                            catch (Exception ex) {
                                synchronized (exceptions) {
                                    exceptions.add(ex);
                                }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        final List<Exception> exceptions = new ArrayList<Exception>();

        for (Pair<ManagedObjectReference, String> hostPair : lstHosts) {
            HostMO host = new HostMO(context, hostPair.first());
            HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

            boolean iScsiHbaConfigured = false;

            for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                if (hba instanceof HostInternetScsiHba) {
                    // just finding an instance of HostInternetScsiHba means that we have found at least one configured iSCSI HBA
                    // at least one iSCSI HBA must be configured before a CloudStack user can use this host for iSCSI storage
                    iScsiHbaConfigured = true;

                    final String iScsiHbaDevice = hba.getDevice();

                    final HostStorageSystemMO hss = hostStorageSystem;

                    executorService.submit(new Thread() {
                        @Override
                        public void run() {
                            try {
                                hss.rescanHba(iScsiHbaDevice);
                                hss.rescanVmfs();
                            }
                            catch (Exception ex) {
                                synchronized (exceptions) {
                                    exceptions.add(ex);
                                }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

            return morDs;
        }

        rescanAllHosts(lstHosts);

        HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();
        List<HostScsiDisk> lstHostScsiDisks = hostDatastoreSystem.queryAvailableDisksForVmfs();

        HostScsiDisk hostScsiDisk = getHostScsiDisk(hostStorageSystem.getStorageDeviceInfo().getScsiTopology(), lstHostScsiDisks, iqn);

        if (hostScsiDisk == null) {
            // check to see if the datastore actually does exist already
            morDs = hostDatastoreSystem.findDatastoreByName(datastoreName);
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        VmwareHypervisorHost hyperHost = getHyperHost(context);
        ManagedObjectReference morCluster = hyperHost.getHyperHostCluster();
        ClusterMO cluster = new ClusterMO(context, morCluster);
        List<Pair<ManagedObjectReference, String>> lstHosts = cluster.getClusterHosts();
        HostMO host = new HostMO(context, lstHosts.get(0).first());
        HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

        for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
            if (hba instanceof HostInternetScsiHba) {
                List<HostInternetScsiHbaStaticTarget> lstTargets = ((HostInternetScsiHba)hba).getConfiguredStaticTarget();

                if (lstTargets != null) {
                    for (HostInternetScsiHbaStaticTarget target : lstTargets) {
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        final List<Exception> exceptions = new ArrayList<Exception>();

        for (Pair<ManagedObjectReference, String> hostPair : lstHosts) {
            HostMO host = new HostMO(context, hostPair.first());
            HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

            boolean iScsiHbaConfigured = false;

            for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                if (hba instanceof HostInternetScsiHba) {
                    // just finding an instance of HostInternetScsiHba means that we have found at least one configured iSCSI HBA
                    // at least one iSCSI HBA must be configured before a CloudStack user can use this host for iSCSI storage
                    iScsiHbaConfigured = true;

                    final String iScsiHbaDevice = hba.getDevice();

                    final HostStorageSystemMO hss = hostStorageSystem;

                    executorService.submit(new Thread() {
                        @Override
                        public void run() {
                            try {
                                if (add) {
                                    hss.addInternetScsiStaticTargets(iScsiHbaDevice, lstTargets);
                                }
                                else {
                                    hss.removeInternetScsiStaticTargets(iScsiHbaDevice, lstTargets);
                                }

                                hss.rescanHba(iScsiHbaDevice);
                                hss.rescanVmfs();
                            }
                            catch (Exception ex) {
                                synchronized (exceptions) {
                                    exceptions.add(ex);
                                }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        final List<Exception> exceptions = new ArrayList<Exception>();

        for (Pair<ManagedObjectReference, String> hostPair : lstHosts) {
            HostMO host = new HostMO(context, hostPair.first());
            HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

            boolean iScsiHbaConfigured = false;

            for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                if (hba instanceof HostInternetScsiHba) {
                    // just finding an instance of HostInternetScsiHba means that we have found at least one configured iSCSI HBA
                    // at least one iSCSI HBA must be configured before a CloudStack user can use this host for iSCSI storage
                    iScsiHbaConfigured = true;

                    final String iScsiHbaDevice = hba.getDevice();

                    final HostStorageSystemMO hss = hostStorageSystem;

                    executorService.submit(new Thread() {
                        @Override
                        public void run() {
                            try {
                                hss.rescanHba(iScsiHbaDevice);
                                hss.rescanVmfs();
                            }
                            catch (Exception ex) {
                                synchronized (exceptions) {
                                    exceptions.add(ex);
                                }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

            return morDs;
        }

        rescanAllHosts(lstHosts);

        HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();
        List<HostScsiDisk> lstHostScsiDisks = hostDatastoreSystem.queryAvailableDisksForVmfs();

        HostScsiDisk hostScsiDisk = getHostScsiDisk(hostStorageSystem.getStorageDeviceInfo().getScsiTopology(), lstHostScsiDisks, iqn);

        if (hostScsiDisk == null) {
            // check to see if the datastore actually does exist already
            morDs = hostDatastoreSystem.findDatastoreByName(datastoreName);
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        try {
            VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext());

            if (hyperHost instanceof HostMO) {
                HostMO host = (HostMO)hyperHost;
                HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

                for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                    if (hba instanceof HostInternetScsiHba) {
                        return ((HostInternetScsiHba)hba).getIScsiName();
                    }
                }
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        try {
            VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext());

            if (hyperHost instanceof HostMO) {
                HostMO host = (HostMO)hyperHost;
                HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

                for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                    if (hba instanceof HostInternetScsiHba) {
                        return ((HostInternetScsiHba)hba).getIScsiName();
                    }
                }
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.HostStorageSystemMO

        final List<Exception> exceptions = new ArrayList<Exception>();

        for (Pair<ManagedObjectReference, String> hostPair : lstHosts) {
            HostMO host = new HostMO(context, hostPair.first());
            HostStorageSystemMO hostStorageSystem = host.getHostStorageSystemMO();

            boolean iScsiHbaConfigured = false;

            for (HostHostBusAdapter hba : hostStorageSystem.getStorageDeviceInfo().getHostBusAdapter()) {
                if (hba instanceof HostInternetScsiHba) {
                    // just finding an instance of HostInternetScsiHba means that we have found at least one configured iSCSI HBA
                    // at least one iSCSI HBA must be configured before a CloudStack user can use this host for iSCSI storage
                    iScsiHbaConfigured = true;

                    final String iScsiHbaDevice = hba.getDevice();

                    final HostStorageSystemMO hss = hostStorageSystem;

                    executorService.submit(new Thread() {
                        @Override
                        public void run() {
                            try {
                                if (add) {
                                    hss.addInternetScsiStaticTargets(iScsiHbaDevice, lstTargets);
                                }
                                else {
                                    hss.removeInternetScsiStaticTargets(iScsiHbaDevice, lstTargets);
                                }

                                hss.rescanHba(iScsiHbaDevice);
                                hss.rescanVmfs();
                            }
                            catch (Exception ex) {
                                synchronized (exceptions) {
                                    exceptions.add(ex);
                                }
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.