csle_rest_api.resources.create_emulation package

Submodules

csle_rest_api.resources.create_emulation.routes module

Routes and sub-resources for the /create-emulation resource

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_beats_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.beats_config.BeatsConfig[source]

Converts the json emulation data to the beats config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the beats configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_containers_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.containers_config.ContainersConfig[source]

Converts the json emulation data to a containers configuration object.

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the ContainersConfig of the emulation

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_docker_stats_manager_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.docker_stats_manager_config.DockerStatsManagerConfig[source]

Converts the json emulation data to the docker stats manager configuration

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the docker stats manager configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_elk_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.elk_config.ElkConfig[source]

Converts the json emulation data to the default ELK configuration

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the ELK configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_emulation_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.emulation_env_config.EmulationEnvConfig[source]

Converts the json emulation data to an emulation environment configuration object.

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the emulation environment configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_flags_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.flags_config.FlagsConfig[source]

Converts the json emulation data to a flags configuration object.

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

The flags confguration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_host_manager_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.host_manager_config.HostManagerConfig[source]

Converts the json emulation data to the host manager configuration

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the host manager configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_kafka_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.kafka_config.KafkaConfig[source]

Converts the json emulation data to the kafka configuration

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the kafka configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_ossec_ids_manager_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.ossec_ids_manager_config.OSSECIDSManagerConfig[source]

Converts the json emulation data to the OSSEC IDS manager configuration

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the OSSEC IDS manager configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_ovs_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.ovs_config.OVSConfig[source]

Converts the json emulation data to the OVS config

Parameters

emulation_data – the emulation data in JSON format received from front-end

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_resource_constraints_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.resources_config.ResourcesConfig[source]

Converts the json emulation data to the resource constraints config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

generates the ResourcesConfig

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_sdn_controller_config(emulation_data: Dict[str, Any]) Union[None, csle_common.dao.emulation_config.sdn_controller_config.SDNControllerConfig][source]

Generates the Converts the json emulation data to the SDN controller config

Parameters

emulation_data – the emulation data in JSON format received from front-end

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_services_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.services_config.ServicesConfig[source]

Converts the json emulation data to the services config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

The services configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_snort_ids_manager_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.snort_ids_manager_config.SnortIDSManagerConfig[source]

Converts the json emulation data to the Snort IDS manager configuration

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the Snort IDS manager configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_static_attacker_sequences(subnet_masks: List[str]) Dict[str, List[csle_common.dao.emulation_action.attacker.emulation_attacker_action.EmulationAttackerAction]][source]

Generates Converts the json emulation data to the attacker sequences config

Parameters

subnetmasks – list of subnet masks for the emulation

Returns

the default static attacker sequences configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_topology_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.topology_config.TopologyConfig[source]

Converts the json emulation data to the topology config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the Topology configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_traffic_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.traffic_config.TrafficConfig[source]

Converts the json emulation data to the traffic config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the traffic configuration

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_users_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.users_config.UsersConfig[source]

Converts the json emulation data to the users config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

generates the UsersConfig

csle_rest_api.resources.create_emulation.routes.convert_json_data_to_vulns_config(emulation_data: Dict[str, Any]) csle_common.dao.emulation_config.vulnerabilities_config.VulnerabilitiesConfig[source]

Converts the json emulation data to the vulnerabilities config

Parameters

emulation_data – the emulation data in JSON format received from front-end

Returns

the vulnerability config

csle_rest_api.resources.create_emulation.routes.create_emulation() Tuple[flask.wrappers.Response, int][source]

The /create-emulation resource.

Returns

The given policy or deletes the policy

Module contents