Package com.abiquo.hypervisor.plugin.annotation

Examples of com.abiquo.hypervisor.plugin.annotation.HypervisorMetadata.type()


        HypervisorMetadata metadata = optionalMetadata.get();
        final List<DiskFormatType> diskFormatTypes = Arrays.asList(DiskFormatType.values());
        List<DiskFormatType> compatibleTypes = Arrays.asList(metadata.compatibleDiskFormatTypes());

        // Hypervisor type must be informed
        if (isNullOrEmpty(metadata.type()))
        {
            LOG.error("The type of the plugin {} is null or empty. Ignoring this plugin",
                new Object[] {plugin.getClass().getName()});
            return Optional.absent();
        }
View Full Code Here


        // Hypervisor friendly name must be informed
        if (isNullOrEmpty(metadata.friendlyName()))
        {
            LOG.error("The friendly name of the plugin {} is null or empty. Ignoring this plugin",
                new Object[] {metadata.type()});
            return Optional.absent();
        }

        // All compatible types must be in DiskFormatType otherwise we don't load this plugin
        boolean allContained = Iterables.any(compatibleTypes, new Predicate<DiskFormatType>()
View Full Code Here

        if (!allContained)
        {
            LOG.error(
                "The plugin {} has invalid configuration compatibles disk format type is not a known disk format types (is not in DiskFormatTypes). Ignoring this plugin",
                metadata.type());
            return Optional.absent();
        }

        // Base format must be in compatible formats otherwise we don't load this plugin
        if (!compatibleTypes.contains(metadata.baseDiskFormatType()))
View Full Code Here

        // Base format must be in compatible formats otherwise we don't load this plugin
        if (!compatibleTypes.contains(metadata.baseDiskFormatType()))
        {
            LOG.error(
                "The plugin {} has invalid configuration base disk format type is not in compatible disk format types. {} is not in compatibleDiskFormatTypes. Ignoring this plugin",
                new Object[] {metadata.type(), metadata.baseDiskFormatType()});
            return Optional.absent();
        }

        // Validate specific plugin configuration
        try
View Full Code Here

        {
            plugin.validateConfiguration();
        }
        catch (IllegalStateException e)
        {
            LOG.error("The plugin {} has invalid configuration: {}", new Object[] {metadata.type(),
            e.getMessage()});
            return Optional.absent();
        }

        try
View Full Code Here

            LoadedPlugin loadedPlugin = new LoadedPlugin(connectionClass, plugin);
            loadedPlugin.unsupportedOperations = copyOf(getUnsupportedOperations(plugin));
            loadedPlugin.constraints = copyOf(loadConstraints(plugin));

            LOG.info("Loaded plugin for hypervisor type {}", metadata.type());
            return Optional.of(loadedPlugin);
        }
        catch (Exception e)
        {
            LOG.error("Unable to load plugin for hypervisor type {}", metadata.type(), e);
View Full Code Here

            LOG.info("Loaded plugin for hypervisor type {}", metadata.type());
            return Optional.of(loadedPlugin);
        }
        catch (Exception e)
        {
            LOG.error("Unable to load plugin for hypervisor type {}", metadata.type(), e);
        }

        return Optional.absent();
    }
View Full Code Here

        final List<DiskFormatType> diskFormatTypes = Arrays.asList(DiskFormatType.values());

        List<DiskFormatType> compatibleTypes = Arrays.asList(metadata.compatibleDiskFormatTypes());

        // Computable type must be informed
        if (metadata.type().length == 0)
        {
            LOG.error("The type of the plugin {} is null or empty. Ignoring this plugin",
                new Object[] {plugin.getClass().getName()});
            return Optional.absent();
        }
View Full Code Here

        // Computable friendly name must be informed
        if (metadata.friendlyName().length == 0)
        {
            LOG.error("The friendly name of the plugin {} is null or empty. Ignoring this plugin",
                new Object[] {metadata.type()});
            return Optional.absent();
        }

        // All compatible types must be in DiskFormatType otherwise we don't load this plugin
        boolean allContained = Iterables.any(compatibleTypes, new Predicate<DiskFormatType>()
View Full Code Here

        if (!allContained)
        {
            LOG.error(
                "The plugin {} has invalid configuration compatibles disk format type is not a known disk format types (is not in DiskFormatTypes). Ignoring this plugin",
                metadata.type());
            return Optional.absent();
        }

        // Base format must be in compatible formats otherwise we don't load this plugin
        if (!compatibleTypes.contains(metadata.baseDiskFormatType()))
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.