Module index
Contents
Module index¶
Indices and tables¶
mosp¶
Models¶
- class mosp.models.schema.Schema(**kwargs)¶
Represent a JSON schema.
- class mosp.models.jsonobject.JsonObject(**kwargs)¶
Represent a JSON object.
- create_new_version(obj=None)¶
Create a new Version object from the JsonObject given in parameter or from the current object (self). Returns the new Version object.
- Return type
- restore_from_version(version)¶
Update the current JsonObject (self) with the specified Version object.
- class mosp.models.collection.Collection(**kwargs)¶
Represent a collection.
- class mosp.models.version.Version(**kwargs)¶
Represent a version of an object (only the fields ‘name’, ‘description’, ‘json_object’ and ‘last_updated’ are versioned).
- class mosp.models.user.User(**kwargs)¶
Represent a user. Logins and api keys are unique, emails addresses are not.
- check_password(password)¶
Check the password of the user.
- Return type
bool
- get_id()¶
Return the id of the user.
- Return type
int
- class mosp.models.organization.Organization(**kwargs)¶
Represent an organization.
- class mosp.models.event.Event(**kwargs)¶
Represent an event.
Lib¶
This file contains functions useful with collections.
- mosp.lib.collections_utils.generate_collections_atom_feed()¶
Generates an ATOM feed with the recent updated collections.
- mosp.lib.misc_utils.get_redirect_target()¶
Looks at various hints to find the redirect target.
- mosp.lib.misc_utils.is_safe_url(target)¶
Ensures that a redirect target will lead to the same server.
This file contains functions useful with JsonObject objects.
- mosp.lib.objects_utils.check_duplicates(json_object)¶
Check for duplicates, by UUID, of the object given in parameter.
- mosp.lib.objects_utils.generate_diff(version_before, version_after)¶
Generate a diff HTML table between two revisions of an object.
- mosp.lib.objects_utils.generate_misp_galaxy_cluster(json_object)¶
Generates a MISP galaxy and cluster from an object.
- mosp.lib.objects_utils.generate_objects_atom_feed()¶
Generates an ATOM feed with the recent updated objects.
- mosp.lib.objects_utils.generate_tar_gz_archive(galaxy, cluster)¶
Generates a tar.gz archive from a MISP galaxy (galaxy and a cluster).