cloud_scanner_generic.services package¶
Submodules¶
cloud_scanner_generic.services.elastic_search module¶
- 
class cloud_scanner_generic.services.elastic_search.ElasticSearch(config: cloud_scanner_generic.config.elastic_search_config.ElasticSearchConfig)¶
- Bases: - cloud_scanner.contracts.table_storage.TableStorage- ElasticSearch provider for TableStorage. - 
static create()¶
- Initialize ElasticSearch service. - Returns: - ElasticSearch service object 
 - 
delete(partition_key, row_key)¶
- Delete entry with specified partition and row keys. - Parameters: - partition_key – Partition key for entry
- row_key – Row key for entry
 - Returns: - None 
 - 
query(partition_key, row_key)¶
- Get entry with specified partition and row keys. - Parameters: - partition_key – Partition key for entry
- row_key – Row key for entry
 - Returns: - Entity if found, None otherwise 
 - 
query_list()¶
- Get entities from table. - Returns: - List of entities from table 
 - 
write(resource)¶
- Write resource to table. - Parameters: - resource – Expecting Resource object (see Common.Contracts.Resource) - Returns: - None 
 
- 
static 
cloud_scanner_generic.services.errors module¶
- 
exception cloud_scanner_generic.services.errors.NotSupportedError¶
- Bases: - Exception- Raised when operation is not supported 
cloud_scanner_generic.services.mysql_resource_storage module¶
- 
class cloud_scanner_generic.services.mysql_resource_storage.MySqlResourceStorage(config: cloud_scanner_generic.config.mysql_config.MySqlConfig)¶
- Bases: - cloud_scanner.contracts.table_storage.TableStorage- 
check_entry_exists(entry)¶
 - 
static create()¶
 - 
delete(partition_key, row_key)¶
- Delete specific entry in Table Storage Not implemented in this class. 
 - 
query(partition_key, row_key)¶
- Query Table Storage for specific entry Not implemented in this class. 
 - 
query_list() → list¶
- Get list of all entries in table storage Not implemented in this class. 
 - 
write(resource)¶
- Write entry to Table Storage Not implemented in this class. 
 
- 
cloud_scanner_generic.services.request_helper module¶
- 
class cloud_scanner_generic.services.request_helper.RequestHelper¶
- Bases: - object- Http request helper uses underlying Session object to pool http connections. - 
static post(url, **kwargs) → requests.models.Response¶
- Creates a Session object if it does not already exist and performs an Http post on the object. - Parameters: - url – The URL to send HTTP post request
- kwargs – Additional args to set
 - Returns: - The Http Response 
 
- 
static 
cloud_scanner_generic.services.rest_storage_service module¶
- 
class cloud_scanner_generic.services.rest_storage_service.RestStorageService(url)¶
- Bases: - cloud_scanner.contracts.table_storage.TableStorage- 
check_entry_exists(entry)¶
 - 
static create()¶
 - 
delete(partition_key, row_key)¶
- Delete specific entry in Table Storage Not implemented in this class. 
 - 
query(partition_key, row_key)¶
- Query Table Storage for specific entry Not implemented in this class. 
 - 
query_list()¶
- Get list of all entries in table storage Not implemented in this class. 
 - 
write(resource: cloud_scanner.contracts.resource.Resource)¶
- Write entry to Table Storage Not implemented in this class. 
 - 
write_entries(resource_list)¶
- Write collection of entries to Table Storage Not implemented in this class. 
 
-