From 4bc8e9737caba5f00d833d7e824a2bec3c7fb1b9 Mon Sep 17 00:00:00 2001 From: Andrea Franchini <hello@andreafranchini.com> Date: Fri, 3 Mar 2023 15:36:12 +0100 Subject: [PATCH] Remove support for DOML 2.1 and 2.1.1 --- mc_openapi/assets/doml_meta_v2.1.1.yaml | 541 ------------------ mc_openapi/assets/doml_v2.1.1.ecore | 419 -------------- mc_openapi/doml_mc/common_reqs.py | 29 +- .../doml_mc/intermediate_model/metamodel.py | 11 +- .../doml_mc/xmi_parser/special_parsers.py | 10 +- 5 files changed, 33 insertions(+), 977 deletions(-) delete mode 100644 mc_openapi/assets/doml_meta_v2.1.1.yaml delete mode 100644 mc_openapi/assets/doml_v2.1.1.ecore diff --git a/mc_openapi/assets/doml_meta_v2.1.1.yaml b/mc_openapi/assets/doml_meta_v2.1.1.yaml deleted file mode 100644 index df4d72d..0000000 --- a/mc_openapi/assets/doml_meta_v2.1.1.yaml +++ /dev/null @@ -1,541 +0,0 @@ -commons: - DOMLElement: - attributes: - name: - type: String - multiplicity: "0..1" - description: - type: String - multiplicity: "0..1" - associations: - annotations: - class: commons_Property - multiplicity: "0..*" - Property: - attributes: - key: - type: String - multiplicity: "0..1" - associations: - reference: - class: commons_DOMLElement - multiplicity: "0..1" - IProperty: - superclass: commons_Property - attributes: - value: - type: Integer - multiplicity: "0..1" - SProperty: - superclass: commons_Property - attributes: - value: - type: String - multiplicity: "0..1" - FProperty: - superclass: commons_Property - attributes: - value: - type: String - multiplicity: "0..1" - BProperty: - superclass: commons_Property - attributes: - value: - type: Boolean - multiplicity: "0..1" - Configuration: - superclass: commons_DOMLElement - associations: - deployments: - class: commons_Deployment - multiplicity: "0..*" - Credentials: - abstract: true - superclass: commons_DOMLElement - DeployableElement: - abstract: true - superclass: commons_DOMLElement # It's not present in the ECore, but without it breaks. - Deployment: - associations: - component: - class: commons_DeployableElement - multiplicity: "1" - node: - class: infrastructure_InfrastructureElement - multiplicity: "1" - KeyPair: - superclass: commons_Credentials - attributes: - user: - type: String - multiplicity: "0..1" - keyfile: - type: String - multiplicity: "0..1" - algorithm: - type: String - multiplicity: "0..1" - bits: - type: Integer - multiplicity: "0..1" - UserPass: - superclass: commons_Credentials - attributes: - user: - type: String - multiplicity: "0..1" - password: - type: String - multiplicity: "0..1" - Source: - superclass: commons_DOMLElement - attributes: - engine: - type: String - multiplicity: "0..*" - uri: - type: String - multiplicity: "0..*" - entry: - type: String - multiplicity: "0..*" - backend: - type: String - multiplicity: "0..*" - associations: - credential: - class: commons_Credentials -application: - ApplicationLayer: - superclass: commons_DOMLElement - associations: - components: - class: application_ApplicationComponent - multiplicity: "0..*" - ApplicationComponent: - superclass: commons_DOMLElement - SoftwareComponent: - superclass: application_ApplicationComponent # and commons_DeployableElement, but we can't handle multiple parent classes, can't we? - attributes: - isPersistent: - type: Boolean - multiplicity: "1" - default: false - licenseCost: - type: String - multiplicity: "0..1" - associations: - exposedInterfaces: - class: application_SoftwareInterface - multiplicity: "0..*" - consumedInterfaces: - class: application_SoftwareInterface - multiplicity: "0..*" - src: - class: commons_Source - multiplicity: "0..1" - SaaS: - superclass: application_ApplicationComponent - attributes: - licenseCost: - type: String - multiplicity: "0..1" - associations: - exposedInterfaces: - class: application_SoftwareInterface - multiplicity: "0..*" - SoftwareInterface: - superclass: application_ApplicationComponent - attributes: - endPoint: - type: String - multiplicity: "0..1" - DBMS: - superclass: application_SoftwareComponent - SaaSDBMS: - superclass: application_SaaS - -infrastructure: - InfrastructureLayer: - superclass: commons_DOMLElement - associations: - nodes: - class: infrastructure_ComputingNode - multiplicity: "0..*" - generators: - class: infrastructure_ComputingNodeGenerator - multiplicity: "0..*" - storages: - class: infrastructure_Storage - multiplicity: "0..*" - faas: - class: infrastructure_FunctionAsAService - multiplicity: "0..*" - credentials: - class: commons_Credentials - multiplicity: "0..*" - groups: - class: infrastructure_ComputingGroup - multiplicity: "0..*" - securityGroups: - class: infrastructure_SecurityGroup - multiplicity: "0..*" - networks: - class: infrastructure_Network - multiplicity: "0..*" - rules: - class: infrastructure_MonitoringRule - multiplicity: "0..*" - MonitoringRule: - superclass: commons_DOMLElement - attributes: - condition: - type: String - multiplicity: "1" - strategy: - type: String - multiplicity: "1" - strategyConfigurationString: - type: String - multiplicity: "0..1" - InfrastructureElement: - superclass: commons_DeployableElement - ComputingNode: - superclass: infrastructure_InfrastructureElement - attributes: - architecture: - type: String - multiplicity: "0..1" - os: - type: String - multiplicity: "0..1" - memory_mb: - type: Integer - multiplicity: "0..1" - memory_kb: # Missing in official Ecore, added by parser - type: Integer - multiplicity: "0..1" - storage: - type: String - multiplicity: "0..1" - cpu_count: - type: Integer - multiplicity: "0..1" - cost: - type: Integer # in cents - multiplicity: "0..1" - disabledMonitorings: - type: String - multiplicity: "0..1" - associations: - ifaces: - class: infrastructure_NetworkInterface - multiplicity: "0..*" - location: - class: infrastructure_Location - multiplicity: "0..1" - credentials: - class: commons_Credentials - multiplicity: "0..1" - group: - class: infrastructure_ComputingGroup - multiplicity: "0..1" - inverse_of: infrastructure_ComputingGroup::groupedNodes - PhysicalComputingNode: - superclass: infrastructure_ComputingNode - VirtualMachine: - superclass: infrastructure_ComputingNode - attributes: - sizeDescription: - type: String - multiplicity: "0..1" - associations: - generatedFrom: - class: infrastructure_VMImage - multiplicity: "0..1" - Location: - superclass: commons_DOMLElement - attributes: - region: - type: String - multiplicity: "0..1" - zone: - type: String - multiplicity: "0..1" - ContainerConfig: - superclass: commons_DOMLElement - attributes: - container_port: - type: Integer - multiplicity: "0..1" - vm_port: - type: Integer - multiplicity: "0..1" - associations: - host: - class: infrastructure_ComputingNode - multiplicity: "0..1" - iface: - class: infrastructure_NetworkInterface - multiplicity: "0..1" - Container: - superclass: infrastructure_ComputingNode - associations: - generatedFrom: - class: infrastructure_ContainerImage - multiplicity: "0..1" - configs: - class: infrastructure_ContainerConfig - multiplicity: "0..*" - ComputingNodeGenerator: - superclass: commons_DOMLElement - attributes: - uri: - type: String - multiplicity: "0..1" - kind: - type: GeneratorKind # enum { SCRIPT, IMAGE } - VMImage: - superclass: infrastructure_ComputingNodeGenerator - associations: - generatedVMs: - class: infrastructure_VirtualMachine - multiplicity: "0..*" - inverse_of: infrastructure_VirtualMachine::generatedFrom - ContainerImage: - superclass: infrastructure_ComputingNodeGenerator - associations: - generatedContainers: - class: infrastructure_Container - multiplicity: "0..*" - inverse_of: infrastructure_Container::generatedFrom - AutoScalingGroup: - superclass: infrastructure_ComputingGroup - attributes: - min: - type: Integer - multiplicity: "0..1" - max: - type: Integer - multiplicity: "0..1" - loadBalancer: - type: String - multiplicity: "0..1" - associations: - machineDefinition: - class: infrastructure_VirtualMachine - multiplicity: "1" - securityGroup: - class: infrastructure_SecurityGroup - multiplicity: "0..1" - Storage: - superclass: infrastructure_InfrastructureElement - attributes: - label: - type: String - multiplicity: "0..1" - size_gb: - type: Integer # in GBs - multiplicity: "0..1" - cost: - type: Integer # in cents - multiplicity: "0..1" - associations: - ifaces: - class: infrastructure_NetworkInterface - multiplicity: "0..*" - FunctionAsAService: - superclass: infrastructure_InfrastructureElement - attributes: - cost: - type: Integer # in cents - multiplicity: "0..1" - associations: - ifaces: - class: infrastructure_NetworkInterface - multiplicity: "0..*" - Network: - superclass: commons_DOMLElement - attributes: - protocol: - type: String - multiplicity: "0..1" - addressRange: - type: String - multiplicity: "0..1" - cidr: - type: Integer - multiplicity: "0..1" - associations: - connectedIfaces: - class: infrastructure_NetworkInterface - multiplicity: "0..*" - inverse_of: infrastructure_NetworkInterface::belongsTo - igws: - class: infrastructure_InternetGateway - multiplicity: "0..*" - subnets: - class: infrastructure_Subnet - multiplicity: "0..*" - Subnet: - superclass: infrastructure_Network - associations: - connectedTo: - class: infrastructure_Network - multiplicity: "0..1" - NetworkInterface: - superclass: infrastructure_InfrastructureElement - attributes: - endPoint: - type: Integer - multiplicity: "0..1" - speed: - type: String - multiplicity: "0..1" - associations: - belongsTo: - class: infrastructure_Network - multiplicity: "0..1" # This should be "1", but it would break InternetGateway - associated: - class: infrastructure_SecurityGroup - multiplicity: "0..1" # TODO: try putting this to 1 and see why it fails - InternetGateway: - superclass: infrastructure_NetworkInterface - ComputingGroup: - superclass: commons_DOMLElement - associations: - groupedNodes: - class: infrastructure_ComputingNode - multiplicity: "0..*" - inverse_of: infrastructure_ComputingNode::group - SecurityGroup: - superclass: commons_DOMLElement - associations: - rules: - class: infrastructure_Rule - multiplicity: "0..*" - ifaces: - class: infrastructure_NetworkInterface - multiplicity: "0..*" - inverse_of: infrastructure_NetworkInterface::associated - Rule: - superclass: commons_DOMLElement - attributes: - kind: - type: String - multiplicity: "1" - protocol: - type: String - multiplicity: "1" - fromPort: - type: Integer - multiplicity: "1" - toPort: - type: Integer - multiplicity: "1" - cidr: - type: String - multiplicity: "0..*" - SwarmRole: - superclass: commons_DOMLElement - attributes: - kind: - type: String - multiplicity: "1" - associations: - nodes: - class: infrastructure_ComputingNode - multiplicity: "0..*" - Swarm: - superclass: infrastructure_ComputingGroup - associations: - roles: - class: infrastructure_SwarmRole - multiplicity: "0..*" - ExtInfrastructureElement: - superclass: infrastructure_InfrastructureElement - -concrete: - ConcreteInfrastructure: - superclass: commons_DOMLElement - associations: - providers: - class: concrete_RuntimeProvider - multiplicity: "0..*" - ConcreteElement: - superclass: commons_DOMLElement - attributes: - configurationScript: - type: String - multiplicity: "0..1" - preexisting: - multiplicity: "1" - type: Boolean - default: false - RuntimeProvider: - superclass: commons_DOMLElement - associations: - vms: - class: concrete_VirtualMachine - multiplicity: "0..*" - vmImages: - class: concrete_VMImage - multiplicity: "0..*" - containerImages: - class: concrete_ContainerImage - multiplicity: "0..*" - networks: - class: concrete_Network - multiplicity: "0..*" - storages: - class: concrete_Storage - multiplicity: "0..*" - faas: - class: concrete_FunctionAsAService - multiplicity: "0..*" - group: - class: concrete_ComputingGroup - multiplicity: "0..*" - VirtualMachine: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_VirtualMachine - multiplicity: "0..1" - VMImage: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_VMImage - multiplicity: "0..1" - ContainerImage: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_ContainerImage - multiplicity: "0..1" - Network: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_Network - multiplicity: "0..1" - Storage: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_Storage - multiplicity: "0..1" - FunctionAsAService: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_FunctionAsAService - multiplicity: "0..1" - ComputingGroup: - superclass: concrete_ConcreteElement - associations: - maps: - class: infrastructure_ComputingGroup - multiplicity: "1" diff --git a/mc_openapi/assets/doml_v2.1.1.ecore b/mc_openapi/assets/doml_v2.1.1.ecore deleted file mode 100644 index a60a074..0000000 --- a/mc_openapi/assets/doml_v2.1.1.ecore +++ /dev/null @@ -1,419 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="doml" nsURI="http://www.piacere-project.eu/doml" nsPrefix="doml"> - <eAnnotations source="emf.gen"> - <details key="basePackage" value="eu.piacere.doml"/> - <details key="fileExtensions" value="domlx"/> - <details key="complianceLevel" value="JDK80"/> - </eAnnotations> - <eSubpackages name="commons" nsURI="http://www.piacere-project.eu/doml/commons" - nsPrefix="commons"> - <eClassifiers xsi:type="ecore:EClass" name="DOMLModel" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" - defaultValueLiteral="2.1.1"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="application" eType="#//application/ApplicationLayer" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="infrastructure" eType="#//infrastructure/InfrastructureLayer" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="concretizations" upperBound="-1" - eType="#//concrete/ConcreteInfrastructure" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="optimization" eType="#//optimization/OptimizationLayer" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="configurations" upperBound="-1" - eType="#//commons/Configuration" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="activeConfiguration" - eType="#//commons/Configuration"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="activeInfrastructure" - eType="#//concrete/ConcreteInfrastructure"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="functionalRequirements" - upperBound="-1" eType="#//commons/Requirement" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Property" abstract="true"> - <eOperations name="getValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="reference" eType="#//commons/DOMLElement"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="IProperty" eSuperTypes="#//commons/Property"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SProperty" eSuperTypes="#//commons/Property"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="FProperty" eSuperTypes="#//commons/Property"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="BProperty" eSuperTypes="#//commons/Property"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ExtensionElement" abstract="true"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="metaclassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DOMLElement" abstract="true"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1" - eType="#//commons/Property" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="contributesTo" upperBound="-1" - eType="#//commons/Requirement" eOpposite="#//commons/Requirement/predicatesOn"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Configuration" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="deployments" upperBound="-1" - eType="#//commons/Deployment" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DeployableElement" abstract="true"/> - <eClassifiers xsi:type="ecore:EClass" name="Deployment"> - <eStructuralFeatures xsi:type="ecore:EReference" name="component" lowerBound="1" - eType="#//commons/DeployableElement"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="node" lowerBound="1" - eType="#//infrastructure/InfrastructureElement"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Requirement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="predicatesOn" upperBound="-1" - eType="#//commons/DOMLElement" eOpposite="#//commons/DOMLElement/contributesTo"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="RangedRequirement" eSuperTypes="#//commons/Requirement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="min" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="max" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="EnumeratedRequirement" eSuperTypes="#//commons/Requirement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="values" upperBound="-1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DeploymentRequirement" abstract="true" - eSuperTypes="#//commons/Requirement"/> - <eClassifiers xsi:type="ecore:EClass" name="DeploymentToNodeTypeRequirement" eSuperTypes="#//commons/DeploymentRequirement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="validTypes" upperBound="-1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DeploymentToNodeWithPropertyRequirement" - eSuperTypes="#//commons/DeploymentRequirement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="min" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="max" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="values" upperBound="-1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DeploymentToSpecificNodeRequirement" - eSuperTypes="#//commons/DeploymentRequirement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="validElements" upperBound="-1" - eType="#//infrastructure/InfrastructureElement"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Credentials" abstract="true" eSuperTypes="#//commons/DOMLElement"/> - <eClassifiers xsi:type="ecore:EClass" name="KeyPair" eSuperTypes="#//commons/Credentials"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="user" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyfile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="algorithm" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="bits" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="UserPass" eSuperTypes="#//commons/Credentials"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="username" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="password" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Source" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="engine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="entry" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="backend" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="credential" eType="#//commons/Credentials" - containment="true"/> - </eClassifiers> - </eSubpackages> - <eSubpackages name="application" nsURI="http://www.piacere-project.eu/doml/application" - nsPrefix="app"> - <eClassifiers xsi:type="ecore:EClass" name="ApplicationLayer" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="components" upperBound="-1" - eType="#//application/ApplicationComponent" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ApplicationComponent" abstract="true" - eSuperTypes="#//commons/DOMLElement #//commons/DeployableElement"/> - <eClassifiers xsi:type="ecore:EClass" name="SoftwareComponent" eSuperTypes="#//application/ApplicationComponent"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="isPersistent" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject" - defaultValueLiteral="false"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="licenseCost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="exposedInterfaces" upperBound="-1" - eType="#//application/SoftwareInterface" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="consumedInterfaces" upperBound="-1" - eType="#//application/SoftwareInterface"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="src" eType="#//commons/Source" - containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DBMS" eSuperTypes="#//application/SoftwareComponent"/> - <eClassifiers xsi:type="ecore:EClass" name="SaaS" eSuperTypes="#//application/ApplicationComponent"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="licenseCost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="exposedInterfaces" upperBound="-1" - eType="#//application/SoftwareInterface" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SaaSDBMS" eSuperTypes="#//application/SaaS"/> - <eClassifiers xsi:type="ecore:EClass" name="SoftwareInterface" eSuperTypes="#//application/ApplicationComponent"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="endPoint" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ExtApplicationComponent" eSuperTypes="#//application/ApplicationComponent #//commons/ExtensionElement"/> - </eSubpackages> - <eSubpackages name="infrastructure" nsURI="http://www.piacere-project.eu/doml/infrastructure" - nsPrefix="infra"> - <eClassifiers xsi:type="ecore:EClass" name="InfrastructureLayer" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1" - eType="#//infrastructure/ComputingNode" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="generators" upperBound="-1" - eType="#//infrastructure/ComputingNodeGenerator" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="storages" upperBound="-1" - eType="#//infrastructure/Storage" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="faas" upperBound="-1" - eType="#//infrastructure/FunctionAsAService" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="credentials" upperBound="-1" - eType="#//commons/Credentials" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1" - eType="#//infrastructure/ComputingGroup" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="securityGroups" upperBound="-1" - eType="#//infrastructure/SecurityGroup" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="networks" upperBound="-1" - eType="#//infrastructure/Network" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1" - eType="#//infrastructure/MonitoringRule" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="MonitoringRule" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="condition" lowerBound="1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="strategy" lowerBound="1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="strategyConfigurationString" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ComputingGroup" abstract="true" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="groupedNodes" upperBound="-1" - eType="#//infrastructure/ComputingNode" eOpposite="#//infrastructure/ComputingNode/group"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="AutoScalingGroup" eSuperTypes="#//infrastructure/ComputingGroup"> - <eStructuralFeatures xsi:type="ecore:EReference" name="machineDefinition" lowerBound="1" - eType="#//infrastructure/VirtualMachine" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="min" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject" - defaultValueLiteral="1"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="max" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject" - defaultValueLiteral="1"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="securityGroup" eType="#//infrastructure/SecurityGroup" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="loadBalancer" eType="#//infrastructure/LoadBalancerKind" - defaultValueLiteral="DEFAULT"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EEnum" name="LoadBalancerKind"> - <eLiterals name="DEFAULT"/> - <eLiterals name="INTERNAL" value="1"/> - <eLiterals name="EXTERNAL" value="2"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Rule" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//infrastructure/RuleKind"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="protocol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="fromPort" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="toPort" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="cidr" upperBound="-1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EEnum" name="RuleKind"> - <eLiterals name="EGRESS"/> - <eLiterals name="INGRESS" value="1"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SecurityGroup" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1" - eType="#//infrastructure/Rule" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="ifaces" upperBound="-1" - eType="#//infrastructure/NetworkInterface" eOpposite="#//infrastructure/NetworkInterface/associated"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="AvailabilityGroup" eSuperTypes="#//infrastructure/ComputingGroup"/> - <eClassifiers xsi:type="ecore:EClass" name="InfrastructureElement" abstract="true" - eSuperTypes="#//commons/DOMLElement #//commons/DeployableElement"/> - <eClassifiers xsi:type="ecore:EClass" name="ComputingNode" abstract="true" eSuperTypes="#//infrastructure/InfrastructureElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="architecture" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="os" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="memory_mb" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="storage" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="cpu_count" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="cost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="ifaces" upperBound="-1" - eType="#//infrastructure/NetworkInterface" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="location" eType="#//infrastructure/Location" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="credentials" eType="#//commons/Credentials"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="group" eType="#//infrastructure/ComputingGroup" - eOpposite="#//infrastructure/ComputingGroup/groupedNodes"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="disabledMonitorings" - upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ComputingNodeGenerator" abstract="true" - eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//infrastructure/GeneratorKind"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EEnum" name="GeneratorKind"> - <eLiterals name="SCRIPT"/> - <eLiterals name="IMAGE" value="1"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="VMImage" eSuperTypes="#//infrastructure/ComputingNodeGenerator"> - <eStructuralFeatures xsi:type="ecore:EReference" name="generatedVMs" upperBound="-1" - eType="#//infrastructure/VirtualMachine" eOpposite="#//infrastructure/VirtualMachine/generatedFrom"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ContainerImage" eSuperTypes="#//infrastructure/ComputingNodeGenerator"> - <eStructuralFeatures xsi:type="ecore:EReference" name="generatedContainers" - upperBound="-1" eType="#//infrastructure/Container" eOpposite="#//infrastructure/Container/generatedFrom"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="PhysicalComputingNode" eSuperTypes="#//infrastructure/ComputingNode"/> - <eClassifiers xsi:type="ecore:EClass" name="VirtualMachine" eSuperTypes="#//infrastructure/ComputingNode"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="sizeDescription" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="generatedFrom" eType="#//infrastructure/VMImage" - eOpposite="#//infrastructure/VMImage/generatedVMs"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Location" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="region" lowerBound="1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="zone" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ContainerConfig" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="container_port" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="vm_port" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="host" eType="#//infrastructure/ComputingNode"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="iface" eType="#//infrastructure/NetworkInterface"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Container" eSuperTypes="#//infrastructure/ComputingNode"> - <eStructuralFeatures xsi:type="ecore:EReference" name="generatedFrom" eType="#//infrastructure/ContainerImage" - eOpposite="#//infrastructure/ContainerImage/generatedContainers"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="configs" upperBound="-1" - eType="#//infrastructure/ContainerConfig" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Network" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="protocol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="addressRange" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="connectedIfaces" upperBound="-1" - eType="#//infrastructure/NetworkInterface" eOpposite="#//infrastructure/NetworkInterface/belongsTo"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="igws" upperBound="-1" - eType="#//infrastructure/InternetGateway" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="subnets" upperBound="-1" - eType="#//infrastructure/Subnet" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Subnet" eSuperTypes="#//infrastructure/Network"> - <eStructuralFeatures xsi:type="ecore:EReference" name="connectedTo" upperBound="-1" - eType="#//infrastructure/Subnet"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="NetworkInterface" eSuperTypes="#//infrastructure/InfrastructureElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="speed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="endPoint" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="belongsTo" eType="#//infrastructure/Network" - eOpposite="#//infrastructure/Network/connectedIfaces"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="associated" eType="#//infrastructure/SecurityGroup" - eOpposite="#//infrastructure/SecurityGroup/ifaces"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="InternetGateway" eSuperTypes="#//infrastructure/NetworkInterface"/> - <eClassifiers xsi:type="ecore:EClass" name="Storage" eSuperTypes="#//infrastructure/InfrastructureElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="size_gb" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="cost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="ifaces" upperBound="-1" - eType="#//infrastructure/NetworkInterface" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="FunctionAsAService" eSuperTypes="#//infrastructure/InfrastructureElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="cost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="ifaces" upperBound="-1" - eType="#//infrastructure/NetworkInterface" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EEnum" name="RoleKind"> - <eLiterals name="NONE"/> - <eLiterals name="MANAGER" value="1"/> - <eLiterals name="WORKER" value="2"/> - <eLiterals name="MASTER" value="3"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SwarmRole" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//infrastructure/RoleKind"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1" - eType="#//infrastructure/ComputingNode" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Swarm" eSuperTypes="#//infrastructure/ComputingGroup"> - <eStructuralFeatures xsi:type="ecore:EReference" name="roles" upperBound="-1" - eType="#//infrastructure/SwarmRole" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ExtInfrastructureElement" eSuperTypes="#//infrastructure/InfrastructureElement #//commons/ExtensionElement"/> - </eSubpackages> - <eSubpackages name="concrete" nsURI="http://www.piacere-project.eu/doml/concrete" - nsPrefix="concrete"> - <eClassifiers xsi:type="ecore:EClass" name="ConcreteInfrastructure" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="providers" upperBound="-1" - eType="#//concrete/RuntimeProvider" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="RuntimeProvider" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="vms" upperBound="-1" - eType="#//concrete/VirtualMachine" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="vmImages" upperBound="-1" - eType="#//concrete/VMImage" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="containerImages" upperBound="-1" - eType="#//concrete/ContainerImage" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="networks" upperBound="-1" - eType="#//concrete/Network" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="storages" upperBound="-1" - eType="#//concrete/Storage" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="faas" upperBound="-1" - eType="#//concrete/FunctionAsAService" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="group" upperBound="-1" - eType="#//concrete/ComputingGroup" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ConcreteElement" abstract="true" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="configurationScript" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="preexisting" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject" - defaultValueLiteral="false"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="VirtualMachine" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/VirtualMachine"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="VMImage" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/VMImage"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ContainerImage" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/ContainerImage"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Network" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/Network"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Storage" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/Storage"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="FunctionAsAService" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/FunctionAsAService"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ComputingGroup" eSuperTypes="#//concrete/ConcreteElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="maps" eType="#//infrastructure/ComputingGroup"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ExtConcreteElement" eSuperTypes="#//concrete/ConcreteElement #//commons/ExtensionElement"/> - </eSubpackages> - <eSubpackages name="optimization" nsURI="http://www.piacere-project.eu/doml/optimization" - nsPrefix="optimization"> - <eClassifiers xsi:type="ecore:EClass" name="OptimizationLayer" eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="startingHint" eType="#//commons/Configuration"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="solutions" upperBound="-1" - eType="#//optimization/OptimizationSolution" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="objectives" upperBound="-1" - eType="#//optimization/OptimizationObjective" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="nonfunctionalRequirements" - upperBound="-1" eType="#//commons/Requirement" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ObjectiveValue"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="cost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="availability" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="performance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloatObject"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="OptimizationSolution" eSuperTypes="#//commons/Configuration"> - <eStructuralFeatures xsi:type="ecore:EReference" name="objectives" eType="#//optimization/ObjectiveValue" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="decisions" upperBound="-1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="OptimizationObjective" abstract="true" - eSuperTypes="#//commons/DOMLElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" - defaultValueLiteral="Max"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="CountObjective" eSuperTypes="#//optimization/OptimizationObjective"/> - <eClassifiers xsi:type="ecore:EClass" name="MeasurableObjective" eSuperTypes="#//optimization/OptimizationObjective"/> - <eClassifiers xsi:type="ecore:EClass" name="ExtOptimizationObjective" eSuperTypes="#//optimization/OptimizationObjective #//commons/ExtensionElement"/> - </eSubpackages> -</ecore:EPackage> diff --git a/mc_openapi/doml_mc/common_reqs.py b/mc_openapi/doml_mc/common_reqs.py index d64a0bd..6b3a251 100644 --- a/mc_openapi/doml_mc/common_reqs.py +++ b/mc_openapi/doml_mc/common_reqs.py @@ -426,14 +426,14 @@ def ed_external_services_must_have_https(solver: Solver, smtsorts: SMTSorts, int return "A Security Group doesn't have a rule to access an external service (SaaS) through HTTPS (port 443)." RequirementLists = { - DOMLVersion.V1_0: [ - (vm_iface, "vm_iface", "All virtual machines must be connected to at least one network interface.", ed_vm_iface), - (software_package_iface_net, "software_package_iface_net", "All software packages can see the interfaces they need through a common network.", ed_software_package_iface_net), - (iface_uniq, "iface_uniq", "There are no duplicated interfaces.", ed_iface_uniq), - (all_SoftwareComponents_deployed, "all_SoftwareComponents_deployed", "All software components have been deployed to some node.", ed_all_SoftwareComponents_deployed), - (all_infrastructure_elements_deployed, "all_infrastructure_elements_deployed", "All abstract infrastructure elements are mapped to an element in the active concretization.", ed_all_infrastructure_elements_deployed), - (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something) - ], + # DOMLVersion.V1_0: [ + # (vm_iface, "vm_iface", "All virtual machines must be connected to at least one network interface.", ed_vm_iface), + # (software_package_iface_net, "software_package_iface_net", "All software packages can see the interfaces they need through a common network.", ed_software_package_iface_net), + # (iface_uniq, "iface_uniq", "There are no duplicated interfaces.", ed_iface_uniq), + # (all_SoftwareComponents_deployed, "all_SoftwareComponents_deployed", "All software components have been deployed to some node.", ed_all_SoftwareComponents_deployed), + # (all_infrastructure_elements_deployed, "all_infrastructure_elements_deployed", "All abstract infrastructure elements are mapped to an element in the active concretization.", ed_all_infrastructure_elements_deployed), + # (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something) + # ], DOMLVersion.V2_0: [ (vm_iface, "vm_iface", "All virtual machines must be connected to at least one network interface.", ed_vm_iface), (software_package_iface_net, "software_package_iface_net", "All software packages can see the interfaces they need through a common network.", ed_software_package_iface_net), @@ -442,7 +442,8 @@ RequirementLists = { (all_infrastructure_elements_deployed, "all_infrastructure_elements_deployed", "All abstract infrastructure elements are mapped to an element in the active concretization.", ed_all_infrastructure_elements_deployed), (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something), (security_group_must_have_iface, "security_group_must_have_iface", "All security group should be a associated to a network interface", ed_security_group_must_have_iface), - (external_services_must_have_https, "external_services_must_have_https", "All external SaaS should be accessed through HTTPS.", ed_external_services_must_have_https) + # TODO: Fix rule + # (external_services_must_have_https, "external_services_must_have_https", "All external SaaS should be accessed through HTTPS.", ed_external_services_must_have_https) ], DOMLVersion.V2_1: [ (vm_iface, "vm_iface", "All virtual machines must be connected to at least one network interface.", ed_vm_iface), @@ -450,7 +451,10 @@ RequirementLists = { (iface_uniq, "iface_uniq", "There are no duplicated interfaces.", ed_iface_uniq), (all_SoftwareComponents_deployed, "all_SoftwareComponents_deployed", "All software components have been deployed to some node.", ed_all_SoftwareComponents_deployed), (all_infrastructure_elements_deployed, "all_infrastructure_elements_deployed", "All abstract infrastructure elements are mapped to an element in the active concretization.", ed_all_infrastructure_elements_deployed), - (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something) + (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something), + (security_group_must_have_iface, "security_group_must_have_iface", "All security group should be a associated to a network interface", ed_security_group_must_have_iface), + # TODO: Fix rule + # (external_services_must_have_https, "external_services_must_have_https", "All external SaaS should be accessed through HTTPS.", ed_external_services_must_have_https) ], DOMLVersion.V2_2: [ (vm_iface, "vm_iface", "All virtual machines must be connected to at least one network interface.", ed_vm_iface), @@ -458,7 +462,10 @@ RequirementLists = { (iface_uniq, "iface_uniq", "There are no duplicated interfaces.", ed_iface_uniq), (all_SoftwareComponents_deployed, "all_SoftwareComponents_deployed", "All software components have been deployed to some node.", ed_all_SoftwareComponents_deployed), (all_infrastructure_elements_deployed, "all_infrastructure_elements_deployed", "All abstract infrastructure elements are mapped to an element in the active concretization.", ed_all_infrastructure_elements_deployed), - (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something) + (all_concrete_map_something, "all_concrete_map_something", "All elements in the active concretization are mapped to some abstract infrastructure element.", ed_all_concrete_map_something), + (security_group_must_have_iface, "security_group_must_have_iface", "All security group should be a associated to a network interface", ed_security_group_must_have_iface), + # TODO: Fix rule + # (external_services_must_have_https, "external_services_must_have_https", "All external SaaS should be accessed through HTTPS.", ed_external_services_must_have_https) ], } diff --git a/mc_openapi/doml_mc/intermediate_model/metamodel.py b/mc_openapi/doml_mc/intermediate_model/metamodel.py index a10a505..5b7f312 100644 --- a/mc_openapi/doml_mc/intermediate_model/metamodel.py +++ b/mc_openapi/doml_mc/intermediate_model/metamodel.py @@ -10,11 +10,20 @@ from ... import assets from ..utils import merge_dicts class DOMLVersion(Enum): - V1_0 = "v1.0" + # V1_0 = "v1.0" V2_0 = "v2.0" V2_1 = "v2.1" V2_2 = "v2.2" + def get(v: str): + """Retrieve DOML version from string. + Try to be less pedantic about versions + e.g.: 2.0 becomes V2_0""" + doml_ver = v.replace(".", "_") + if doml_ver[0] != "V": + doml_ver = "V" + doml_ver + return DOMLVersion[doml_ver] + Multiplicity = tuple[Literal["0", "1"], Literal["1", "*"]] diff --git a/mc_openapi/doml_mc/xmi_parser/special_parsers.py b/mc_openapi/doml_mc/xmi_parser/special_parsers.py index 2b700e9..c215cee 100644 --- a/mc_openapi/doml_mc/xmi_parser/special_parsers.py +++ b/mc_openapi/doml_mc/xmi_parser/special_parsers.py @@ -43,11 +43,11 @@ def init_special_parsers(): assert len(MetaModels) > 0 attribute_parsers = { - DOMLVersion.V1_0: { - ("infrastructure_Network", "addressRange"): parse_network_address_range, - ("infrastructure_NetworkInterface", "endPoint"): parse_iface_address, - ("commons_FProperty", "value"): parse_fproperty, - }, + # DOMLVersion.1_0: { + # ("infrastructure_Network", "addressRange"): parse_network_address_range, + # ("infrastructure_NetworkInterface", "endPoint"): parse_iface_address, + # ("commons_FProperty", "value"): parse_fproperty, + # }, DOMLVersion.V2_0: { ("infrastructure_Network", "addressRange"): parse_network_address_range, ("infrastructure_NetworkInterface", "endPoint"): parse_iface_address, -- GitLab