component_submitter package¶
Subpackages¶
- component_submitter.abstracts package
- component_submitter.adaptors package
- component_submitter.tests package
Submodules¶
component_submitter.api module¶
-
class
component_submitter.api.ExecSubmitterThread(q, *args, **kwargs)[source]¶ Bases:
threading.Thread-
run()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
-
exception
component_submitter.api.RequestError(message, status_code=None, payload=None)[source]¶ Bases:
Exception-
status_code= 400¶
-
-
component_submitter.api.launch()[source]¶ API functions to launch a application
Params intput: path to the file wanted Params params: dictionary with the update of input.
-
component_submitter.api.list_thread()[source]¶ API call to query the info on the thread being executed
component_submitter.command_line_interface module¶
MiCADO Command Line Interface¶
Component to create the command line interface that will talk to the submitter to launch, update, undeploy the application
component_submitter.micado_parser module¶
-
class
component_submitter.micado_parser.MiCADOParser[source]¶ Bases:
objectMiCADO class that is going to take care of parsing the topology template, check if the file is correct and Readable by MiCADO submitter. The set_template method is returning the topology template object.
-
set_template(path, parsed_params=None)[source]¶ set_template is the method that will parse the tosca template and return the object topology object.
Params: path, parsed_params Type: string, dictionary Returns: template Raises: Exception parsed_params: dictionary containing the input to changepath: local or remote path to the file to parse (it needs to be reachable.)
-
component_submitter.micado_validator module¶
MiCADO Submission Engine TOSCA Validator¶
Validate ToscaTemplate objects to ensure syntactic and semantic compatibility with custom defined and TOSCA normative types.
Further validates a ToscaTemplate which has already passed validation steps set out by the OpenStack ToscaParser. Currently validation checks exist for repositories and the requirements and relationships of custom defined types.
-
exception
component_submitter.micado_validator.MultiError(error_set, msg=None)[source]¶ Bases:
component_submitter.micado_validator.ValidationErrorErrors occured during validation…
-
exception
component_submitter.micado_validator.ValidationError[source]¶ Bases:
ExceptionBase error for validation
-
component_submitter.micado_validator.validate_relationship_properties(node)[source]¶ Validate relationship properties
Checks that relationships defined properties required by their definition in TOSCA normative or custom types. Returns errors if not.
-
component_submitter.micado_validator.validate_relationships(node)[source]¶ Validate relationships
Checks that relationships used in node definitions correctly reference relationships defined in TOSCA normative or custom types. Returns errors if not.
-
component_submitter.micado_validator.validate_repositories(node, repositories)[source]¶ Validate repository names
Checks to see if repositories have been defined at the top level, and if nodes reference those repositories correctly. Returns errors if not.
-
component_submitter.micado_validator.validate_requirements(node)[source]¶ Validate requirements and their syntax
Checks that requirements in custom_types and in node definitions are defined as one-item lists and that node definition requirements correctly reference requirements defined in custom_types. Returns errors if not.
-
component_submitter.micado_validator.validation(tpl)[source]¶ The validation process
Runs validation steps on the given TOSCA Template, and builds an error list. Raises a MultiError on failed validation. On success, says so.
Parameters: tpl (ToscaTemplate <toscaparser.tosca_template.ToscaTemplate>) – The ToscaTemplate to validate Raises: TypeError, MultiError - Usage:
>>> from micado_validator import Validator
Successful validation:>>> Validator().validation(<toscaparser.tosca_template.ToscaTemplate>) 'ToscaTemplate passed compatibility validation'
Errors during validation:>>> Validator(<toscaparser.tosca_template.ToscaTemplate>) micado_validator.MultiError: ---- (...list of errors...)
component_submitter.plugins_gestion module¶
component_submitter.submitter_config module¶
MiCADO Submitter Engine Submitter Config¶
A module allowing the configuration of the whole submitter
-
class
component_submitter.submitter_config.SubmitterConfig(testing=None)[source]¶ Bases:
objectThis is the SubmitterConfig, in charge of the configuration of the whole submitter. It has
__init__(),get_list_adaptors(),_retrieve_custom_type(),_reading_config(),_check_re(),_list_for_re(),mapping(),_look_through_template(),_find_get_input(),_contains_inputs(),get_SubmitterConfig(),get_dict()andget_node_from_type().Optional testing parameter can be passed to __init__ to define which key_config files to take for test purposes.
component_submitter.submitter_engine module¶
-
class
component_submitter.submitter_engine.SubmitterEngine[source]¶ Bases:
objectSubmitterEngine class that is the main one that is used to treat with the application.
-
launch(path_to_file, id_app, parsed_params=None)[source]¶ Launch method, that will call the in-method egine to execute the application Creating empty list for the whole class adaptor and executed adaptor :params: path_to_file, parsed_params :types: string, dictionary .. note:
For the time being we only have one "workflow engine" but we could extend this launch method to accept another parameter to be able to choose which engine to launch
-
undeploy(id_app, force=False)[source]¶ Undeploy method will remove the application from the infrastructure. :params: id :type: string
-
update(id_app, path_to_file, parsed_params=None)[source]¶ Update method that will be updating the application we want to update.
Params id: id of the application we want to update Params type: string Params path_to_file: path to the template file Params type: string Params parse_params: dictionary containing the value we want to use as the value of the input section Params type: dictionary
-
-
component_submitter.submitter_engine.logger= <Logger submitter.component_submitter.submitter_engine (INFO)>¶ define the Handler which write message to sys.stderr
component_submitter.utils module¶
-
component_submitter.utils.dump_order_yaml(data, path)[source]¶ Dump the dictionary to a Docker-Compose file