Package com.abiquo.hypervisor.plugin.annotation

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


        // 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();
        }

        if (!areCompatibleInterfaces(plugin))
        {
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();
        }

        // Validate at least one region is retrieved
View Full Code Here

        }

        // Validate at least one region is retrieved
        if (isCloudProvider(plugin))
        {
            for (String type : metadata.type())
            {
                List<Region> regionNames =
                    ((ICloudProvider< ? extends IConnection>) plugin).getRegions(type);
                if (regionNames == null || regionNames.isEmpty())
                {
View Full Code Here

                    ((ICloudProvider< ? extends IConnection>) plugin).getRegions(type);
                if (regionNames == null || regionNames.isEmpty())
                {
                    LOG.error(
                        "The plugin {} extends from ICloudProvider but does not return any region",
                        metadata.type());
                    return Optional.absent();
                }
            }
        }
View Full Code Here

        try
        {
            Class<IConnection> connectionClass = resolveIConnectionData(plugin.getClass());

            Builder<String, LoadedPlugin> builder = ImmutableMap.<String, LoadedPlugin> builder();
            for (String pluginType : metadata.type())
            {
                LoadedPlugin loadedPlugin = new LoadedPlugin(pluginType, connectionClass, plugin);
                builder.put(pluginType, loadedPlugin);
                LOG.debug("Loaded plugin for type {}", pluginType);
            }
View Full Code Here

            }
            return Optional.of(builder.build());
        }
        catch (Exception e)
        {
            LOG.error("Unable to load plugin for 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

        // 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();
        }

        if (!areCompatibleInterfaces(plugin))
        {
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.