Asset

class pytw.asset.Asset(id=None, asset_json=None)[source]

Asset object.

Parameters:
  • asset_json – Asset JSON (which should contain ‘id’ at minimum)
  • id – Specifies the Id for the asset.

Note either parameter should be present.

get_asset_name()[source]

:Returns a string containing the asset name

get_description()[source]

:Returns a string containing the description of the asset

get_id()[source]

:Returns a string containing the Asset ID

get_location()[source]

:Returns the location for the asset

get_notify()[source]

:Returns the notification list for the asset

get_owner()[source]

:Returns a string containing the owner of the asset

get_patches()[source]

:Returns the list of patches for the asset

get_products()[source]

:Returns the list of products for the asset

get_tags()[source]

:Returns the list of tags for the asset

get_type()[source]

:Returns a string containing the type of the asset

is_updated()[source]

:Returns True if asset has been modified

set_asset_name(name)[source]

:Sets the asset name

set_description(description)[source]

:Set the description of the asset

set_location(location)[source]

:Set the location for the asset

set_notify(notify_list)[source]

:Set the notification list for the asset

set_owner(owner)[source]

:Set the owner of the asset

set_patches(patches_list)[source]

:Set the list of patches for the asset

set_products(products_list)[source]

:Set the list of products for the asset

set_tags(tags_list)[source]

:Set the list of tags for the asset

set_type(type)[source]

:Set the type of the asset

to_json()[source]

:Returns JSON representation of the object