diff --git a/pom.xml b/pom.xml
index 6ef4a32..cb4b47c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,11 +27,14 @@
3.1.0
3.1.0
3.0.0
+ 1.0.0
1.10.19
1.0.9
+ 1.8
+ 1.8
diff --git a/src/main/java/alien4cloud/paas/yorc/YorcPluginFactory.java b/src/main/java/alien4cloud/paas/yorc/YorcPluginFactory.java
index 6070d88..81bce5e 100644
--- a/src/main/java/alien4cloud/paas/yorc/YorcPluginFactory.java
+++ b/src/main/java/alien4cloud/paas/yorc/YorcPluginFactory.java
@@ -37,6 +37,7 @@ public class YorcPluginFactory implements IOrchestratorPluginFactory getResourcesTypes() {
+ return getAllResourcesTypes();
+ }
+
+ @Override
+ public Map getMatchingConfigurations() {
+ return getMatchingConfigurations("maas/resources-matching-config.yml");
+ }
+
+ @Override
+ protected String[] getLocationArchivePaths() {
+ return new String[]{"maas/resources"};
+ }
+
+}
diff --git a/src/main/resources/maas/resources-matching-config.yml b/src/main/resources/maas/resources-matching-config.yml
new file mode 100644
index 0000000..8855fa1
--- /dev/null
+++ b/src/main/resources/maas/resources-matching-config.yml
@@ -0,0 +1,16 @@
+
+matching_configurations:
+ # yorc.nodes.aws.Compute:
+ # capabilities:
+ # - host:
+ # properties:
+ # - num_cpus: { less_or_equal: 0 } # we match if the template value is less or equal that the location resource value
+ # - cpu_frequency: { less_or_equal: 0 Hz }
+ # - mem_size: { less_or_equal: 0 B }
+ # - disk_size: { less_or_equal: 0 B }
+ # - os:
+ # properties:
+ # - architecture: { equal: "" }
+ # - type: { equal: "" }
+ # - distribution: { equal: "" }
+ # - version: { less_or_equal: "" }
diff --git a/src/main/resources/maas/resources/resources.yaml b/src/main/resources/maas/resources/resources.yaml
new file mode 100644
index 0000000..82363a3
--- /dev/null
+++ b/src/main/resources/maas/resources/resources.yaml
@@ -0,0 +1,74 @@
+tosca_definitions_version: ${alien4cloud.dsl.version}
+
+template_name: yorc-maas-types
+template_author: Yorc
+template_version: ${yorc.hp.types.version}
+
+
+# Note: If we reference a dependency using project.version then this component should
+# be versioned as project.version too otherwise we will have issues on snapshots
+# versions (our type not snapshot referencing a snapshot version)
+imports:
+ - tosca-normative-types:${tosca.normative.types.version}
+ - yorc-types:${yorc.types.version}
+
+node_types:
+ yorc.nodes.maas.Compute:
+ derived_from: yorc.nodes.Compute
+ properties:
+ distro_series:
+ type: string
+ required: false
+ description: If present, this parameter specifies the OS the machine will use. Else the MASS default OS will be use.
+ arch :
+ type: string
+ required: false
+ description: Architecture of the returned machine (e.g. 'i386/generic', 'amd64', 'armhf/highbank', etc.).
+ erase:
+ type: boolean
+ required: false
+ description: Erase the disk when undeploying. if neither secure_erase nor quick_erase are specified, MAAS will overwrite the whole disk with null bytes. This can be very slow.
+ secure_erase:
+ type: boolean
+ required: false
+ description: Use the drive's secure erase feature if available. In some cases, this can be much faster than overwriting the drive. Some drives implement secure erasure by overwriting themselves so this could still be slow.
+ quick_erase:
+ type: boolean
+ required: false
+ description: Wipe 2MiB at the start and at the end of the drive to make data recovery inconvenient and unlikely to happen by accident. This is not secure.
+ tags:
+ type: string
+ required: false
+ description: Comma separated list of tags that the machine must match in order to be acquired. If multiple tag names are specified, the machine must be tagged with all of them.
+ not_tags:
+ type: string
+ required: false
+ description: Comma separated list of tags that the machine must NOT match. If multiple tag names are specified, the machine must NOT be tagged with ANY of them.
+ capabilities:
+ host:
+ type: tosca.capabilities.Container
+
+ ##############################################
+ # Abstract resources used for auto-config
+ ##############################################
+ yorc.nodes.maas.Image:
+ abstract: true
+ derived_from: tosca.nodes.Root
+ description: MAAS OS image available
+ properties:
+ id:
+ type: string
+ capabilities:
+ os:
+ type: tosca.capabilities.OperatingSystem
+
+ yorc.nodes.maas.Machines:
+ abstract: true
+ derived_from: tosca.nodes.Root
+ description: MAAS machines description. (cpu_frequency is not handled by MAAS for now)
+ properties:
+ id:
+ type: string
+ capabilities:
+ host:
+ type: tosca.capabilities.Container