opsicommon package¶
Subpackages¶
- opsicommon.client package
- Submodules
- opsicommon.client.jsonrpc module
JSONRPCClient
JSONRPCClient.backend_getInterface()
JSONRPCClient.connect()
JSONRPCClient.disconnect()
JSONRPCClient.execute_rpc()
JSONRPCClient.get()
JSONRPCClient.getInterface()
JSONRPCClient.hostname
JSONRPCClient.interface
JSONRPCClient.new_host_id
JSONRPCClient.new_host_key
JSONRPCClient.no_proxy_addresses
JSONRPCClient.serialization
JSONRPCClient.serverName
JSONRPCClient.serverVersion
JSONRPCClient.server_version
JSONRPCClient.session
JSONRPCClient.session_id
JSONRPCClient.setCompression()
JSONRPCClient.set_compression()
TimeoutHTTPAdapter
no_export()
- opsicommon.client.opsiservice module
BackendManager
CallbackThread
Messagebus
Messagebus.async_send_message()
Messagebus.connect()
Messagebus.connected
Messagebus.disconnect()
Messagebus.jsonrpc()
Messagebus.register_messagebus_listener()
Messagebus.run()
Messagebus.send_message()
Messagebus.stop()
Messagebus.unregister_messagebus_listener()
Messagebus.wait_for_jsonrpc_response_message()
Messagebus.websocket_connected
MessagebusListener
MessagebusListener.expired_message_received()
MessagebusListener.message_received()
MessagebusListener.messagebus_connection_closed()
MessagebusListener.messagebus_connection_established()
MessagebusListener.messagebus_connection_failed()
MessagebusListener.messagebus_connection_open()
MessagebusListener.register()
OpsiCaState
Response
ServiceClient
ServiceClient.add_uib_opsi_ca_to_cert_file()
ServiceClient.base_url
ServiceClient.ca_cert_file
ServiceClient.certs_from_pem()
ServiceClient.connect()
ServiceClient.connect_messagebus()
ServiceClient.connected
ServiceClient.connection()
ServiceClient.create_jsonrpc_methods()
ServiceClient.disconnect()
ServiceClient.disconnect_messagebus()
ServiceClient.fetch_opsi_ca()
ServiceClient.get()
ServiceClient.get_opsi_ca_certs()
ServiceClient.get_opsi_ca_state()
ServiceClient.jsonrpc()
ServiceClient.messagebus
ServiceClient.messagebus_available
ServiceClient.messagebus_connected
ServiceClient.no_proxy_addresses
ServiceClient.password
ServiceClient.post()
ServiceClient.proxy_url
ServiceClient.read_ca_cert_file()
ServiceClient.register_connection_listener()
ServiceClient.request()
ServiceClient.service_is_opsiclientd()
ServiceClient.session_cookie
ServiceClient.set_addresses()
ServiceClient.stop()
ServiceClient.unregister_connection_listener()
ServiceClient.username
ServiceClient.verify
ServiceClient.write_ca_cert_file()
ServiceConnectionListener
ServiceVerificationFlags
get_service_client()
- Module contents
- opsicommon.config package
- opsicommon.logging package
- Submodules
- opsicommon.logging.constants module
- opsicommon.logging.logging module
ContextFilter
ContextSecretFormatter
OPSILogger
ObservableHandler
RichConsoleHandler
SecretFilter
Singleton
add_context_filter_to_logger()
add_context_filter_to_loggers()
get_all_handlers()
get_all_loggers()
get_logger()
handle_log_exception()
init_logging()
init_warnings_capture()
log_context()
logging_config()
logrecord_init()
print_logger_info()
remove_all_handlers()
set_context()
set_filter()
set_filter_from_string()
set_format()
- Module contents
- opsicommon.package package
- Submodules
- opsicommon.package.archive module
- opsicommon.package.associated_files module
- opsicommon.package.control_file_handling module
- opsicommon.package.legacy_control_file module
- opsicommon.package.repo_meta module
RepoMetaMetadataFile
RepoMetaMetadataFileType
RepoMetaPackage
RepoMetaPackage.changelog_url
RepoMetaPackage.compatibility
RepoMetaPackage.description
RepoMetaPackage.from_dict()
RepoMetaPackage.from_package_file()
RepoMetaPackage.icon_url
RepoMetaPackage.md5_hash
RepoMetaPackage.merge()
RepoMetaPackage.name
RepoMetaPackage.package_dependencies
RepoMetaPackage.package_version
RepoMetaPackage.priority
RepoMetaPackage.product_dependencies
RepoMetaPackage.product_id
RepoMetaPackage.product_version
RepoMetaPackage.release_notes_url
RepoMetaPackage.sha256_hash
RepoMetaPackage.size
RepoMetaPackage.url
RepoMetaPackage.version
RepoMetaPackage.zsync_url
RepoMetaPackageCollection
RepoMetaPackageCollection.add_package()
RepoMetaPackageCollection.get_packages()
RepoMetaPackageCollection.limit_versions()
RepoMetaPackageCollection.metadata_files
RepoMetaPackageCollection.packages
RepoMetaPackageCollection.read_metafile()
RepoMetaPackageCollection.read_metafile_data()
RepoMetaPackageCollection.remove_package()
RepoMetaPackageCollection.repository
RepoMetaPackageCollection.scan_packages()
RepoMetaPackageCollection.schema_version
RepoMetaPackageCollection.write_metafile()
RepoMetaPackageCompatibility
RepoMetaPackageDependency
RepoMetaProductDependency
RepoMetaProductDependency.from_dict()
RepoMetaProductDependency.from_product_dependency()
RepoMetaProductDependency.productAction
RepoMetaProductDependency.requiredAction
RepoMetaProductDependency.requiredInstallationStatus
RepoMetaProductDependency.requiredPackageVersion
RepoMetaProductDependency.requiredProductId
RepoMetaProductDependency.requiredProductVersion
RepoMetaProductDependency.requirementType
RepoMetaRepository
- opsicommon.package.wim module
WIMImageInfo
WIMImageInfo.creation_time
WIMImageInfo.description
WIMImageInfo.directory_count
WIMImageInfo.display_description
WIMImageInfo.display_name
WIMImageInfo.file_count
WIMImageInfo.hard_link_bytes
WIMImageInfo.index
WIMImageInfo.last_modification_time
WIMImageInfo.name
WIMImageInfo.total_bytes
WIMImageInfo.wimboot_compatible
WIMImageInfo.windows_info
WIMImageWindowsInfo
WIMImageWindowsInfo.architecture
WIMImageWindowsInfo.build
WIMImageWindowsInfo.default_language
WIMImageWindowsInfo.edition_id
WIMImageWindowsInfo.hal
WIMImageWindowsInfo.installation_type
WIMImageWindowsInfo.languages
WIMImageWindowsInfo.major_version
WIMImageWindowsInfo.minor_version
WIMImageWindowsInfo.product_name
WIMImageWindowsInfo.product_suite
WIMImageWindowsInfo.product_type
WIMImageWindowsInfo.service_pack_build
WIMImageWindowsInfo.service_pack_level
WIMImageWindowsInfo.system_root
WIMInfo
wim_capture()
wim_info()
- Module contents
OpsiPackage
OpsiPackage.create_package_archive()
OpsiPackage.extract_package_archive()
OpsiPackage.find_and_parse_control_file()
OpsiPackage.from_package_archive()
OpsiPackage.generate_control_file()
OpsiPackage.generate_control_file_legacy()
OpsiPackage.get_package_dependencies_as_json()
OpsiPackage.package_archive_name()
OpsiPackage.parse_control_file()
OpsiPackage.parse_control_file_legacy()
OpsiPackage.set_package_dependencies_from_json()
PackageDependency
- opsicommon.server package
- opsicommon.ssl package
- opsicommon.system package
- opsicommon.utils package
Submodules¶
opsicommon.exceptions module¶
OPSI Exceptions.
- opsicommon.exceptions.BackendAuthenticationError¶
alias of
OpsiServiceAuthenticationError
- exception opsicommon.exceptions.BackendBadValueError(message='')¶
Bases:
OpsiError
Exception raised if an invalid value is found.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend bad value error'¶
- exception opsicommon.exceptions.BackendConfigurationError(message='')¶
Bases:
OpsiError
Exception raised if a configuration error occurs in the backend.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend configuration error'¶
- exception opsicommon.exceptions.BackendError(message='')¶
Bases:
OpsiError
Exception raised if there is an error in the backend.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend error'¶
- exception opsicommon.exceptions.BackendIOError(message='')¶
Bases:
OpsiError
Exception raised if there is a read or write error in the backend.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend I/O error'¶
- exception opsicommon.exceptions.BackendMissingDataError(message='')¶
Bases:
OpsiError
Exception raised if expected data not found.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend missing data error'¶
- exception opsicommon.exceptions.BackendModuleDisabledError(message='')¶
Bases:
OpsiError
Exception raised if a needed module is disabled.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend module disabled error'¶
- opsicommon.exceptions.BackendPermissionDeniedError¶
alias of
OpsiServicePermissionError
- exception opsicommon.exceptions.BackendReferentialIntegrityError(message='')¶
Bases:
OpsiError
Exception raised if there is a referential integration error occurs in the backend.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend referential integrity error'¶
- exception opsicommon.exceptions.BackendTemporaryError(message='')¶
Bases:
OpsiError
Exception raised if a temporary error occurs.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend temporary error'¶
- exception opsicommon.exceptions.BackendUnableToConnectError(message='')¶
Bases:
BackendIOError
Exception raised if no connection can be established in the backend.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend I/O error'¶
- exception opsicommon.exceptions.BackendUnaccomplishableError(message='')¶
Bases:
OpsiError
Exception raised if an unaccomplishable situation appears.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Backend unaccomplishable error'¶
- exception opsicommon.exceptions.CanceledException¶
Bases:
Exception
- ExceptionShortDescription = 'CanceledException'¶
- exception opsicommon.exceptions.LicenseConfigurationError(message='')¶
Bases:
OpsiError
Exception raised if a configuration error occurs in the license data base.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'License configuration error'¶
- exception opsicommon.exceptions.LicenseMissingError(message='')¶
Bases:
OpsiError
Exception raised if a license is requested but cannot be found.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'License missing error'¶
- exception opsicommon.exceptions.OpsiBackupBackendNotFound(message='')¶
Bases:
OpsiBackupFileError
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Opsi backend not found in backup'¶
- exception opsicommon.exceptions.OpsiBackupFileError(message='')¶
Bases:
OpsiError
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Opsi backup file error'¶
- exception opsicommon.exceptions.OpsiBackupFileNotFound(message='')¶
Bases:
OpsiBackupFileError
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Opsi backup file not found'¶
- exception opsicommon.exceptions.OpsiBadRpcError(message='')¶
Bases:
OpsiError
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Opsi bad rpc error'¶
- exception opsicommon.exceptions.OpsiError(message='')¶
Bases:
Exception
Base class for OPSI Backend exceptions.
- Parameters:
message (
str
) –
- ExceptionShortDescription = 'Opsi error'¶
- exception opsicommon.exceptions.OpsiProductOrderingError(message='', problematicRequirements=None)¶
Bases:
OpsiError
- Parameters:
message (
str
) –problematicRequirements (
UnionType
[list
[int
],list
[str
],None
]) –
- ExceptionShortDescription = 'A condition for ordering cannot be fulfilled'¶
- exception opsicommon.exceptions.OpsiRpcError(message='', response=None)¶
Bases:
OpsiError
- Parameters:
message (
str
) –response (
Optional
[dict
[str
,Any
]]) –
- ExceptionShortDescription = 'Opsi rpc error'¶
- exception opsicommon.exceptions.OpsiServiceAuthenticationError(message='', status_code=None, content=None)¶
Bases:
OpsiServiceError
- Parameters:
message (
str
) –status_code (
Optional
[int
]) –content (
Optional
[str
]) –
- ExceptionShortDescription = 'Opsi service authentication error'¶
- exception opsicommon.exceptions.OpsiServiceConnectionError(message='', status_code=None, content=None)¶
Bases:
OpsiServiceError
- Parameters:
message (
str
) –status_code (
Optional
[int
]) –content (
Optional
[str
]) –
- ExceptionShortDescription = 'Opsi service connection error'¶
- exception opsicommon.exceptions.OpsiServiceTimeoutError(message='', status_code=None, content=None)¶
Bases:
OpsiServiceConnectionError
- Parameters:
message (
str
) –status_code (
Optional
[int
]) –content (
Optional
[str
]) –
- ExceptionShortDescription = 'Opsi service timeout error'¶
- exception opsicommon.exceptions.OpsiServiceVerificationError(message='', status_code=None, content=None)¶
Bases:
OpsiServiceConnectionError
- Parameters:
message (
str
) –status_code (
Optional
[int
]) –content (
Optional
[str
]) –
- ExceptionShortDescription = 'Opsi service verification error'¶
opsicommon.license module¶
License handling
- class opsicommon.license.OpsiLicense(*, id=_Nothing.NOTHING, type='standard', schema_version=2, opsi_version='4.2', customer_id=None, customer_name, customer_address=None, customer_unit=None, contract_id=None, service_id=None, module_id, client_number, issued_at=_Nothing.NOTHING, valid_from=_Nothing.NOTHING, valid_until, revoked_ids=[], note=None, additional_data=None, signature=None, license_pool=None, checksum=None, cached_state={}, cached_signature_valid=None)¶
Bases:
object
- Parameters:
id (
str
) –type (
str
) –opsi_version (
str
) –customer_id (
str
) –customer_name (
str
) –customer_address (
str
) –customer_unit (
str
) –contract_id (
str
) –service_id (
str
) –module_id (
str
) –issued_at (
str
) –valid_from (
str
) –valid_until (
str
) –revoked_ids (
List
[str
]) –note (
str
) –additional_data (
str
) –signature (
str
) –license_pool (OpsiLicensePool) –
checksum (
str
) –cached_state (
Dict
[str
,str
]) –cached_signature_valid (
Optional
[bool
]) –
-
additional_data:
str
¶
- clear_cache()¶
- Return type:
None
-
client_number:
int
¶
-
contract_id:
str
¶
-
customer_address:
str
¶
-
customer_id:
str
¶
-
customer_name:
str
¶
-
customer_unit:
str
¶
- classmethod from_dict(data_dict)¶
- Parameters:
data_dict (
dict
) –- Return type:
- classmethod from_json(json_data)¶
- Parameters:
json_data (
str
) –- Return type:
- get_checksum(with_signature=True)¶
- Parameters:
with_signature (
bool
) –- Return type:
str
- get_hash(digest=False, hex_digest=False)¶
- Parameters:
digest (
bool
) –hex_digest (
bool
) –
- Return type:
Union
[MD5Hash
,SHA3_512_Hash
,str
,bytes
]
- get_state(test_revoked=True, at_date=None)¶
- Parameters:
test_revoked (
bool
) –at_date (
Optional
[date
]) –
- Return type:
str
-
id:
str
¶
- is_signature_valid()¶
- Return type:
bool
-
issued_at:
date
¶
-
module_id:
str
¶
-
note:
str
¶
-
opsi_version:
str
¶
-
revoked_ids:
List
[str
]¶
-
schema_version:
int
¶
-
service_id:
str
¶
- set_license_pool(license_pool)¶
- Parameters:
license_pool (
OpsiLicensePool
) –- Return type:
None
- sign(private_key)¶
- Parameters:
private_key (
Union
[RsaKey
,str
]) –- Return type:
None
-
signature:
bytes
¶
- to_dict(serializable=False, with_state=False)¶
- Parameters:
serializable (
bool
) –with_state (
bool
) –
- Return type:
dict
- to_json(with_state=False)¶
- Parameters:
with_state (
bool
) –- Return type:
str
-
type:
str
¶
-
valid_from:
date
¶
-
valid_until:
date
¶
- validate_client_number(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- validate_customer_address(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- validate_customer_id(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- validate_customer_name(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- validate_revoked_ids(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- validate_schema_version(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- validate_service_id(attribute, value)¶
- Parameters:
attribute (
str
) –value (
Any
) –
- Return type:
None
- class opsicommon.license.OpsiLicenseFile(filename)¶
Bases:
object
- Parameters:
filename (
Optional
[str
]) –
- add_license(opsi_license)¶
- Parameters:
opsi_license (
OpsiLicense
) –- Return type:
None
- property licenses: List[OpsiLicense]¶
- read()¶
- Return type:
None
- read_string(data)¶
- Parameters:
data (
str
) –- Return type:
None
- write()¶
- Return type:
None
- write_string()¶
- Return type:
str
- class opsicommon.license.OpsiLicensePool(license_file_path=None, modules_file_path=None, client_info=None, client_limit_warning_percent=95, client_limit_warning_absolute=5)¶
Bases:
object
- Parameters:
license_file_path (
Optional
[str
]) –modules_file_path (
Optional
[str
]) –client_info (
Union
[dict
,Callable
,None
]) –client_limit_warning_percent (
Optional
[int
]) –client_limit_warning_absolute (
Optional
[int
]) –
- add_license(*opsi_license)¶
- Parameters:
opsi_license (
OpsiLicense
) –- Return type:
None
- clear_license_state_cache()¶
- Return type:
None
- property client_numbers: Dict[str, int]¶
- property enabled_module_ids: List[str]¶
- get_legacy_modules()¶
- Return type:
Optional
[Dict
[str
,Any
]]
- get_licenses(exclude_ids=None, valid_only=False, test_revoked=True, types=None, at_date=None)¶
- Parameters:
exclude_ids (
Optional
[List
[str
]]) –valid_only (
bool
) –test_revoked (
bool
) –types (
Optional
[List
[str
]]) –at_date (
Optional
[date
]) –
- Return type:
Generator
[OpsiLicense
,None
,None
]
- get_licenses_checksum()¶
- Return type:
str
- get_modules(at_date=None)¶
- Parameters:
at_date (
Optional
[date
]) –- Return type:
Dict
[str
,Any
]
- get_relevant_dates()¶
- Return type:
List
[date
]
- get_revoked_license_ids(at_date=None)¶
- Parameters:
at_date (
Optional
[date
]) –- Return type:
Set
[str
]
- property license_files: List[str]¶
- property licenses: List[OpsiLicense]¶
- load()¶
- Return type:
None
- modified()¶
- Return type:
bool
- property modules_file: str | None¶
- remove_license(*opsi_license)¶
- Parameters:
opsi_license (
OpsiLicense
) –- Return type:
None
- class opsicommon.license.OpsiModulesFile(filename)¶
Bases:
object
- Parameters:
filename (
Union
[Path
,str
]) –
- add_license(opsi_license)¶
- Parameters:
opsi_license (
OpsiLicense
) –- Return type:
None
- property licenses: List[OpsiLicense]¶
- read()¶
- Return type:
None
- opsicommon.license.generate_key_pair(return_pem=False, bits=2048)¶
- Parameters:
return_pem (
bool
) –bits (
int
) –
- Return type:
Union
[Tuple
[str
,str
],Tuple
[RsaKey
,RsaKey
]]
- opsicommon.license.generate_license_id()¶
- Return type:
str
- opsicommon.license.get_default_opsi_license_pool(license_file_path=None, modules_file_path=None, client_info=None, client_limit_warning_percent=95, client_limit_warning_absolute=5)¶
- Parameters:
license_file_path (
Optional
[str
]) –modules_file_path (
Optional
[str
]) –client_info (
Union
[dict
,Callable
,None
]) –client_limit_warning_percent (
Optional
[int
]) –client_limit_warning_absolute (
Optional
[int
]) –
- Return type:
- opsicommon.license.get_signature_public_key(schema_version)¶
- Parameters:
schema_version (
int
) –- Return type:
RsaKey
- opsicommon.license.get_signature_public_key_schema_version_1()¶
- Return type:
RsaKey
- opsicommon.license.get_signature_public_key_schema_version_2()¶
- Return type:
RsaKey
- opsicommon.license.set_default_opsi_license_pool(pool)¶
- Parameters:
pool (
Optional
[OpsiLicensePool
]) –- Return type:
None
opsicommon.messagebus module¶
opsicommon.messagebus
- class opsicommon.messagebus.ChannelSubscriptionEventMessage(*, type='channel_subscription_event', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, error=None, subscribed_channels=<factory>)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –error (
Optional
[Error
]) –subscribed_channels (
list
[str
]) –
-
subscribed_channels:
list
[str
]¶
- class opsicommon.messagebus.ChannelSubscriptionOperation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str
,Enum
- ADD = 'add'¶
- REMOVE = 'remove'¶
- SET = 'set'¶
- class opsicommon.messagebus.ChannelSubscriptionRequestMessage(*, type='channel_subscription_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, channels, operation='set')¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –channels (
list
[str
]) –operation (
str
) –
-
channels:
list
[str
]¶
-
operation:
str
¶
- class opsicommon.messagebus.Error(*, message, code=None, details=None)¶
Bases:
object
- Parameters:
message (
str
) –code (
Optional
[int
]) –details (
Optional
[str
]) –
-
code:
Optional
[int
]¶
-
details:
Optional
[str
]¶
-
message:
str
¶
- class opsicommon.messagebus.EventMessage(*, type='event', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, event, data=<factory>)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –event (
str
) –data (
dict
[str
,Any
]) –
-
data:
dict
[str
,Any
]¶
-
event:
str
¶
- class opsicommon.messagebus.FileChunkMessage(*, type='file_chunk', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, file_id, number, last=False, data)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –file_id (
str
) –number (
int
) –last (
bool
) –data (
bytes
) –
-
data:
bytes
¶
-
file_id:
str
¶
-
last:
bool
¶
-
number:
int
¶
- class opsicommon.messagebus.FileUploadRequestMessage(*, type='file_upload_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, file_id, content_type, name=None, size=None, destination_dir=None, terminal_id=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –file_id (
str
) –content_type (
str
) –name (
Optional
[str
]) –size (
Optional
[int
]) –destination_dir (
Optional
[str
]) –terminal_id (
Optional
[str
]) –
-
content_type:
str
¶
-
destination_dir:
Optional
[str
]¶
-
file_id:
str
¶
-
name:
Optional
[str
]¶
-
size:
Optional
[int
]¶
-
terminal_id:
Optional
[str
]¶
- class opsicommon.messagebus.FileUploadResultMessage(*, type='file_upload_result', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, file_id, error=None, path=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –file_id (
str
) –error (
Optional
[Error
]) –path (
Optional
[str
]) –
-
file_id:
str
¶
-
path:
Optional
[str
]¶
- class opsicommon.messagebus.GeneralErrorMessage(*, type='general_error', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, error)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –error (
Optional
[Error
]) –
- class opsicommon.messagebus.JSONRPCRequestMessage(*, type='jsonrpc_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, api_version='1', rpc_id=<factory>, method, params=())¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –api_version (
str
) –rpc_id (
str
) –method (
str
) –params (
tuple
[Any
,...
]) –
-
api_version:
str
¶
-
method:
str
¶
-
params:
tuple
[Any
,...
]¶
-
rpc_id:
str
¶
- class opsicommon.messagebus.JSONRPCResponseMessage(*, type='jsonrpc_response', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, rpc_id, error=None, result=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –rpc_id (
str
) –error (
Any
) –result (
Any
) –
-
error:
Any
¶
-
result:
Any
¶
-
rpc_id:
str
¶
- class opsicommon.messagebus.Message(*, type, sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None)¶
Bases:
object
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –
-
back_channel:
Optional
[str
]¶
-
channel:
str
¶
-
created:
int
¶
-
expires:
int
¶
- classmethod from_dict(data)¶
- Parameters:
data (
dict
[str
,Any
]) –- Return type:
TypeVar
(MessageT
, bound= Message)
- classmethod from_msgpack(data)¶
- Parameters:
data (
bytes
) –- Return type:
TypeVar
(MessageT
, bound= Message)
-
id:
str
¶
-
ref_id:
Optional
[str
]¶
-
sender:
str
¶
- to_dict(none_values=False)¶
- Parameters:
none_values (
bool
) –- Return type:
dict
[str
,Any
]
- to_msgpack(none_values=False)¶
- Parameters:
none_values (
bool
) –- Return type:
bytes
-
type:
str
¶
- class opsicommon.messagebus.MessageType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str
,Enum
- CHANNEL_SUBSCRIPTION_EVENT = 'channel_subscription_event'¶
- CHANNEL_SUBSCRIPTION_REQUEST = 'channel_subscription_request'¶
- EVENT = 'event'¶
- FILE_CHUNK = 'file_chunk'¶
- FILE_UPLOAD_REQUEST = 'file_upload_request'¶
- FILE_UPLOAD_RESULT = 'file_upload_result'¶
- GENERAL_ERROR = 'general_error'¶
- JSONRPC_REQUEST = 'jsonrpc_request'¶
- JSONRPC_RESPONSE = 'jsonrpc_response'¶
- TERMINAL_CLOSE_EVENT = 'terminal_close_event'¶
- TERMINAL_CLOSE_REQUEST = 'terminal_close_request'¶
- TERMINAL_DATA_READ = 'terminal_data_read'¶
- TERMINAL_DATA_WRITE = 'terminal_data_write'¶
- TERMINAL_OPEN_EVENT = 'terminal_open_event'¶
- TERMINAL_OPEN_REQUEST = 'terminal_open_request'¶
- TERMINAL_RESIZE_EVENT = 'terminal_resize_event'¶
- TERMINAL_RESIZE_REQUEST = 'terminal_resize_request'¶
- TRACE_REQUEST = 'trace_request'¶
- TRACE_RESPONSE = 'trace_response'¶
- class opsicommon.messagebus.TerminalCloseEventMessage(*, type='terminal_close_event', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, error=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –error (
Optional
[Error
]) –
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalCloseRequestMessage(*, type='terminal_close_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalDataReadMessage(*, type='terminal_data_read', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, data)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –data (
bytes
) –
-
data:
bytes
¶
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalDataWriteMessage(*, type='terminal_data_write', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, data)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –data (
bytes
) –
-
data:
bytes
¶
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalOpenEventMessage(*, type='terminal_open_event', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, rows, cols, error=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –rows (
int
) –cols (
int
) –error (
Optional
[Error
]) –
-
cols:
int
¶
-
rows:
int
¶
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalOpenRequestMessage(*, type='terminal_open_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, rows=None, cols=None, shell=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –rows (
Optional
[int
]) –cols (
Optional
[int
]) –shell (
Optional
[str
]) –
-
cols:
Optional
[int
]¶
-
rows:
Optional
[int
]¶
-
shell:
Optional
[str
]¶
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalResizeEventMessage(*, type='terminal_resize_event', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, rows, cols, error=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –rows (
int
) –cols (
int
) –error (
Optional
[Error
]) –
-
cols:
int
¶
-
rows:
int
¶
-
terminal_id:
str
¶
- class opsicommon.messagebus.TerminalResizeRequestMessage(*, type='terminal_resize_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, terminal_id, rows, cols)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –terminal_id (
str
) –rows (
int
) –cols (
int
) –
-
cols:
int
¶
-
rows:
int
¶
-
terminal_id:
str
¶
- class opsicommon.messagebus.TraceRequestMessage(*, type='trace_request', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, trace=<factory>, payload=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –trace (
dict
[str
,Any
]) –payload (
Optional
[bytes
]) –
-
payload:
Optional
[bytes
]¶
-
trace:
dict
[str
,Any
]¶
- class opsicommon.messagebus.TraceResponseMessage(*, type='trace_response', sender, channel, back_channel=None, id=<factory>, created=<factory>, expires=<factory>, ref_id=None, req_trace, trace, payload=None)¶
Bases:
Message
- Parameters:
type (
str
) –sender (
str
) –channel (
str
) –back_channel (
Optional
[str
]) –id (
str
) –created (
int
) –expires (
int
) –ref_id (
Optional
[str
]) –req_trace (
dict
[str
,Any
]) –trace (
dict
[str
,Any
]) –payload (
Optional
[bytes
]) –
-
payload:
Optional
[bytes
]¶
-
req_trace:
dict
[str
,Any
]¶
-
trace:
dict
[str
,Any
]¶
- opsicommon.messagebus.message_id()¶
- Return type:
str
- opsicommon.messagebus.timestamp()¶
- Return type:
int
opsicommon.objects module¶
General classes used in the library.
As an example this contains classes for hosts, products, configurations.
- class opsicommon.objects.AuditHardware(hardwareClass, **kwargs)¶
Bases:
Entity
- Parameters:
hardwareClass (
str
) –kwargs (
Any
) –
- backend_method_prefix = 'auditHardware'¶
-
foreign_id_attributes:
list
[str
] = []¶
- classmethod fromHash(_hash)¶
- Parameters:
_hash (
dict
[str
,Any
]) –- Return type:
- getHardwareClass()¶
- Return type:
str
- getIdentAttributes()¶
- Return type:
tuple
[str
,...
]
-
hardware_attributes:
dict
[str
,dict
[str
,Any
]] = {}¶
- setDefaults()¶
- Return type:
None
- setHardwareClass(hardwareClass)¶
- Parameters:
hardwareClass (
str
) –- Return type:
None
- static setHardwareConfig(hardwareConfig)¶
- Parameters:
hardwareConfig (
list
[dict
[str
,Any
]]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.AuditHardwareOnHost(hardwareClass, hostId, firstseen=None, lastseen=None, state=None, **kwargs)¶
Bases:
Relationship
- Parameters:
hardwareClass (
str
) –hostId (
str
) –firstseen (
Optional
[str
]) –lastseen (
Optional
[str
]) –state (
Optional
[int
]) –kwargs (
Any
) –
- backend_method_prefix = 'auditHardwareOnHost'¶
- classmethod fromHash(_hash)¶
- Parameters:
_hash (
dict
[str
,Any
]) –- Return type:
- getFirstseen()¶
- Return type:
Optional
[str
]
- getHardwareClass()¶
- Return type:
str
- getHostId()¶
- Return type:
str
- getIdentAttributes()¶
- Return type:
tuple
[str
,...
]
- getLastseen()¶
- Return type:
Optional
[str
]
- getState()¶
- Return type:
Optional
[int
]
-
hardware_attributes:
dict
[str
,dict
[str
,Any
]] = {}¶
- setDefaults()¶
- Return type:
None
- setFirstseen(firstseen)¶
- Parameters:
firstseen (
str
) –- Return type:
None
- setHardwareClass(hardwareClass)¶
- Parameters:
hardwareClass (
str
) –- Return type:
None
- static setHardwareConfig(hardwareConfig)¶
- Parameters:
hardwareConfig (
list
[dict
[str
,Any
]]) –- Return type:
None
- setHostId(hostId)¶
- Parameters:
hostId (
str
) –- Return type:
None
- setLastseen(lastseen)¶
- Parameters:
lastseen (
str
) –- Return type:
None
- setState(state)¶
- Parameters:
state (
int
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- toAuditHardware()¶
- Return type:
- class opsicommon.objects.AuditSoftware(name, version, subVersion, language, architecture, windowsSoftwareId=None, windowsDisplayName=None, windowsDisplayVersion=None, installSize=None)¶
Bases:
Entity
- Parameters:
name (
str
) –version (
str
) –subVersion (
str
) –language (
str
) –architecture (
str
) –windowsSoftwareId (
Optional
[str
]) –windowsDisplayName (
Optional
[str
]) –windowsDisplayVersion (
Optional
[str
]) –installSize (
Optional
[int
]) –
- backend_method_prefix = 'auditSoftware'¶
-
foreign_id_attributes:
list
[str
] = []¶
- getArchitecture()¶
- Return type:
str
- getInstallSize()¶
- Return type:
Optional
[int
]
- getLanguage()¶
- Return type:
str
- getName()¶
- Return type:
str
- getSubVersion()¶
- Return type:
str
- getVersion()¶
- Return type:
str
- getWindowsDisplayName()¶
- Return type:
Optional
[str
]
- getWindowsDisplayVersion()¶
- Return type:
Optional
[str
]
- getWindowsSoftwareId()¶
- Return type:
Optional
[str
]
- setArchitecture(architecture)¶
- Parameters:
architecture (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setInstallSize(installSize)¶
- Parameters:
installSize (
int
) –- Return type:
None
- setLanguage(language)¶
- Parameters:
language (
str
) –- Return type:
None
- setName(name)¶
- Parameters:
name (
str
) –- Return type:
None
- setSubVersion(subVersion)¶
- Parameters:
subVersion (
str
) –- Return type:
None
- setVersion(version)¶
- Parameters:
version (
str
) –- Return type:
None
- setWindowsDisplayName(windowsDisplayName)¶
- Parameters:
windowsDisplayName (
str
) –- Return type:
None
- setWindowsDisplayVersion(windowsDisplayVersion)¶
- Parameters:
windowsDisplayVersion (
str
) –- Return type:
None
- setWindowsSoftwareId(windowsSoftwareId)¶
- Parameters:
windowsSoftwareId (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.AuditSoftwareOnClient(name, version, subVersion, language, architecture, clientId, uninstallString=None, binaryName=None, firstseen=None, lastseen=None, state=None, usageFrequency=None, lastUsed=None, licenseKey=None)¶
Bases:
Relationship
- Parameters:
name (
str
) –version (
str
) –subVersion (
str
) –language (
str
) –architecture (
str
) –clientId (
str
) –uninstallString (
Optional
[str
]) –binaryName (
Optional
[str
]) –firstseen (
Optional
[str
]) –lastseen (
Optional
[str
]) –state (
Optional
[int
]) –usageFrequency (
Optional
[int
]) –lastUsed (
Optional
[str
]) –licenseKey (
Optional
[str
]) –
- backend_method_prefix = 'auditSoftwareOnClient'¶
- getArchitecture()¶
- Return type:
str
- getBinaryName()¶
- Return type:
Optional
[str
]
- getClientId()¶
- Return type:
str
- getFirstseen()¶
- Return type:
Optional
[str
]
- getLanguage()¶
- Return type:
str
- getLastUsed()¶
- Return type:
Optional
[str
]
- getLastseen()¶
- Return type:
Optional
[str
]
- getLicenseKey()¶
- Return type:
Optional
[str
]
- getName()¶
- Return type:
str
- getState()¶
- Return type:
Optional
[int
]
- getSubVersion()¶
- Return type:
str
- getUninstallString()¶
- Return type:
Optional
[str
]
- getUsageFrequency()¶
- Return type:
Optional
[int
]
- getVersion()¶
- Return type:
str
- setArchitecture(architecture)¶
- Parameters:
architecture (
str
) –- Return type:
None
- setBinaryName(binaryName)¶
- Parameters:
binaryName (
str
) –- Return type:
None
- setClientId(clientId)¶
- Parameters:
clientId (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setFirstseen(firstseen)¶
- Parameters:
firstseen (
str
) –- Return type:
None
- setLanguage(language)¶
- Parameters:
language (
str
) –- Return type:
None
- setLastUsed(lastUsed)¶
- Parameters:
lastUsed (
str
) –- Return type:
None
- setLastseen(lastseen)¶
- Parameters:
lastseen (
str
) –- Return type:
None
- setLicenseKey(licenseKey)¶
- Parameters:
licenseKey (
str
) –- Return type:
None
- setName(name)¶
- Parameters:
name (
str
) –- Return type:
None
- setState(state)¶
- Parameters:
state (
int
) –- Return type:
None
- setSubVersion(subVersion)¶
- Parameters:
subVersion (
str
) –- Return type:
None
- setUninstallString(uninstallString)¶
- Parameters:
uninstallString (
str
) –- Return type:
None
- setUsageFrequency(usageFrequency)¶
- Parameters:
usageFrequency (
int
) –- Return type:
None
- setVersion(version)¶
- Parameters:
version (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.AuditSoftwareToLicensePool(name, version, subVersion, language, architecture, licensePoolId)¶
Bases:
Relationship
- Parameters:
name (
str
) –version (
str
) –subVersion (
str
) –language (
str
) –architecture (
str
) –licensePoolId (
str
) –
- backend_method_prefix = 'auditSoftwareToLicensePool'¶
- getArchitecture()¶
- Return type:
str
- getLanguage()¶
- Return type:
str
- getLicensePoolId()¶
- Return type:
str
- getName()¶
- Return type:
str
- getSubVersion()¶
- Return type:
str
- getVersion()¶
- Return type:
str
- setArchitecture(architecture)¶
- Parameters:
architecture (
str
) –- Return type:
None
- setLanguage(language)¶
- Parameters:
language (
str
) –- Return type:
None
- setLicensePoolId(licensePoolId)¶
- Parameters:
licensePoolId (
str
) –- Return type:
None
- setName(name)¶
- Parameters:
name (
str
) –- Return type:
None
- setSubVersion(subVersion)¶
- Parameters:
subVersion (
str
) –- Return type:
None
- setVersion(version)¶
- Parameters:
version (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.BaseObject¶
Bases:
object
- backendMethodPrefix = ''¶
- backend_method_prefix = ''¶
- copy_from_hash = False¶
- emptyValues(keepAttributes=None)¶
- Parameters:
keepAttributes (
Optional
[list
[str
]]) –- Return type:
None
- foreignIdAttributes = []¶
-
foreign_id_attributes:
list
[str
] = []¶
- classmethod fromHash(_hash)¶
- Parameters:
_hash (
dict
[str
,Any
]) –- Return type:
TypeVar
(BaseObjectT
, bound= BaseObject)
- classmethod from_json(jsonString)¶
- Parameters:
jsonString (
str
) –- Return type:
Any
- getBackendMethodPrefix()¶
- Return type:
str
- getForeignIdAttributes()¶
- Return type:
list
[str
]
- getIdent(returnType='unicode')¶
- Parameters:
returnType (
str
) –- Return type:
list
[str
] |tuple
[str
,...
] |dict
[str
,str
] |str
- getIdentAttributes()¶
- Return type:
tuple
[str
,...
]
- getType()¶
- Return type:
str
- identSeparator = ';'¶
- ident_separator = ';'¶
- isGeneratedDefault()¶
- Return type:
bool
- serialize()¶
- Return type:
dict
[str
,Any
]
- setDefaults()¶
- Return type:
None
- setGeneratedDefault(flag=True)¶
- Parameters:
flag (
bool
) –- Return type:
None
- subClasses = {'Entity': <class 'opsicommon.objects.Entity'>, 'Relationship': <class 'opsicommon.objects.Relationship'>}¶
-
sub_classes:
dict
[str
,type
] = {'Entity': <class 'opsicommon.objects.Entity'>, 'Relationship': <class 'opsicommon.objects.Relationship'>}¶
- toHash()¶
- Return type:
dict
[str
,Any
]
- toJson()¶
- Return type:
str
- to_hash()¶
- Return type:
dict
[str
,Any
]
- to_json()¶
- Return type:
str
- update(updateObject, updateWithNoneValues=True)¶
- Parameters:
updateObject (
BaseObject
) –updateWithNoneValues (
bool
) –
- Return type:
None
- class opsicommon.objects.BoolConfig(id, description=None, defaultValues=None)¶
Bases:
Config
- Parameters:
id (
str
) –description (
Optional
[str
]) –defaultValues (
Optional
[list
[bool
]]) –
- setDefaultValues(defaultValues)¶
- Parameters:
defaultValues (
list
[bool
]) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setPossibleValues(possibleValues)¶
- Parameters:
possibleValues (
list
[bool
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.BoolProductProperty(productId, productVersion, packageVersion, propertyId, description=None, defaultValues=None)¶
Bases:
ProductProperty
- Parameters:
productId (
str
) –productVersion (
str
) –packageVersion (
str
) –propertyId (
str
) –description (
Optional
[str
]) –defaultValues (
Optional
[list
[Any
]]) –
- setDefaultValues(defaultValues)¶
- Parameters:
defaultValues (
list
[Any
]) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setEditable(editable)¶
- Parameters:
editable (
bool
) –- Return type:
None
- setPossibleValues(possibleValues)¶
- Parameters:
possibleValues (
list
[Any
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.ConcurrentSoftwareLicense(id, licenseContractId, maxInstallations=None, boundToHost=None, expirationDate=None)¶
Bases:
SoftwareLicense
- Parameters:
id (
str
) –licenseContractId (
str
) –maxInstallations (
Optional
[int
]) –boundToHost (
Optional
[str
]) –expirationDate (
Optional
[str
]) –
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.Config(id, description=None, possibleValues=None, defaultValues=None, editable=None, multiValue=None)¶
Bases:
Entity
- Parameters:
id (
str
) –description (
Optional
[str
]) –possibleValues (
Optional
[list
[Any
]]) –defaultValues (
Optional
[list
[Any
]]) –editable (
Optional
[bool
]) –multiValue (
Optional
[bool
]) –
- backend_method_prefix = 'config'¶
-
foreign_id_attributes:
list
[str
] = ['configId']¶
- getDefaultValues()¶
- Return type:
Optional
[list
[Any
]]
- getDescription()¶
- Return type:
Optional
[str
]
- getEditable()¶
- Return type:
Optional
[bool
]
- getId()¶
- Return type:
str
- getMultiValue()¶
- Return type:
Optional
[bool
]
- getPossibleValues()¶
- Return type:
Optional
[list
[Any
]]
- setDefaultValues(defaultValues)¶
- Parameters:
defaultValues (
list
[Any
]) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setDescription(description)¶
- Parameters:
description (
str
) –- Return type:
None
- setEditable(editable)¶
- Parameters:
editable (
bool
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setMultiValue(multiValue)¶
- Parameters:
multiValue (
bool
) –- Return type:
None
- setPossibleValues(possibleValues)¶
- Parameters:
possibleValues (
list
[Any
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'BoolConfig': <class 'opsicommon.objects.BoolConfig'>, 'UnicodeConfig': <class 'opsicommon.objects.UnicodeConfig'>}¶
- class opsicommon.objects.ConfigState(configId, objectId, values=None)¶
Bases:
Relationship
- Parameters:
configId (
str
) –objectId (
str
) –values (
Optional
[list
[Any
]]) –
- backend_method_prefix = 'configState'¶
- getConfigId()¶
- Return type:
str
- getObjectId()¶
- Return type:
str
- getValues()¶
- Return type:
Optional
[list
[Any
]]
- setConfigId(configId)¶
- Parameters:
configId (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setObjectId(objectId)¶
- Parameters:
objectId (
str
) –- Return type:
None
- setValues(values)¶
- Parameters:
values (
list
[Any
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.Entity¶
Bases:
BaseObject
- clone(identOnly=False)¶
- Parameters:
identOnly (
bool
) –- Return type:
Any
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'AuditHardware': <class 'opsicommon.objects.AuditHardware'>, 'AuditSoftware': <class 'opsicommon.objects.AuditSoftware'>, 'Config': <class 'opsicommon.objects.Config'>, 'LicenseContract': <class 'opsicommon.objects.LicenseContract'>, 'LicensePool': <class 'opsicommon.objects.LicensePool'>, 'Object': <class 'opsicommon.objects.Object'>, 'Product': <class 'opsicommon.objects.Product'>, 'ProductProperty': <class 'opsicommon.objects.ProductProperty'>, 'User': <class 'opsicommon.objects.User'>}¶
- class opsicommon.objects.Group(id, description=None, notes=None, parentGroupId=None)¶
Bases:
Object
- Parameters:
id (
str
) –description (
Optional
[str
]) –notes (
Optional
[str
]) –parentGroupId (
Optional
[str
]) –
- backend_method_prefix = 'group'¶
-
foreign_id_attributes:
list
[str
] = ['objectId', 'groupId']¶
- getId()¶
- Return type:
str
- getParentGroupId()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setParentGroupId(parentGroupId)¶
- Parameters:
parentGroupId (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'HostGroup': <class 'opsicommon.objects.HostGroup'>, 'ProductGroup': <class 'opsicommon.objects.ProductGroup'>}¶
- class opsicommon.objects.Host(id, description=None, notes=None, hardwareAddress=None, ipAddress=None, inventoryNumber=None, systemUUID=None)¶
Bases:
Object
- Parameters:
id (
str
) –description (
Optional
[str
]) –notes (
Optional
[str
]) –hardwareAddress (
Optional
[str
]) –ipAddress (
Optional
[str
]) –inventoryNumber (
Optional
[str
]) –systemUUID (
Optional
[str
]) –
- backend_method_prefix = 'host'¶
-
foreign_id_attributes:
list
[str
] = ['objectId', 'hostId']¶
- getHardwareAddress()¶
- Return type:
Optional
[str
]
- getInventoryNumber()¶
- Return type:
Optional
[str
]
- getIpAddress()¶
- Return type:
Optional
[str
]
- getSystemUUID()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setHardwareAddress(hardwareAddress)¶
- Parameters:
hardwareAddress (
str
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setInventoryNumber(inventoryNumber)¶
- Parameters:
inventoryNumber (
str
) –- Return type:
None
- setIpAddress(ipAddress)¶
- Parameters:
ipAddress (
str
) –- Return type:
None
- setSystemUUID(systemUUID)¶
- Parameters:
systemUUID (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'OpsiClient': <class 'opsicommon.objects.OpsiClient'>, 'OpsiConfigserver': <class 'opsicommon.objects.OpsiConfigserver'>, 'OpsiDepotserver': <class 'opsicommon.objects.OpsiDepotserver'>}¶
- class opsicommon.objects.HostGroup(id, description=None, notes=None, parentGroupId=None)¶
Bases:
Group
- Parameters:
id (
str
) –description (
Optional
[str
]) –notes (
Optional
[str
]) –parentGroupId (
Optional
[str
]) –
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.LicenseContract(id, description=None, notes=None, partner=None, conclusionDate=None, notificationDate=None, expirationDate=None)¶
Bases:
Entity
- Parameters:
id (
str
) –description (
Optional
[str
]) –notes (
Optional
[str
]) –partner (
Optional
[str
]) –conclusionDate (
Optional
[str
]) –notificationDate (
Optional
[str
]) –expirationDate (
Optional
[str
]) –
- backend_method_prefix = 'licenseContract'¶
-
foreign_id_attributes:
list
[str
] = ['licenseContractId']¶
- getConclusionDate()¶
- Return type:
Optional
[str
]
- getDescription()¶
- Return type:
Optional
[str
]
- getExpirationDate()¶
- Return type:
Optional
[str
]
- getId()¶
- Return type:
str
- getNotes()¶
- Return type:
Optional
[str
]
- getNotificationDate()¶
- Return type:
Optional
[str
]
- getPartner()¶
- Return type:
Optional
[str
]
- setConclusionDate(conclusionDate)¶
- Parameters:
conclusionDate (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setDescription(description)¶
- Parameters:
description (
str
) –- Return type:
None
- setExpirationDate(expirationDate)¶
- Parameters:
expirationDate (
str
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setNotes(notes)¶
- Parameters:
notes (
str
) –- Return type:
None
- setNotificationDate(notificationDate)¶
- Parameters:
notificationDate (
str
) –- Return type:
None
- setPartner(partner)¶
- Parameters:
partner (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.LicenseOnClient(softwareLicenseId, licensePoolId, clientId, licenseKey=None, notes=None)¶
Bases:
Relationship
- Parameters:
softwareLicenseId (
str
) –licensePoolId (
str
) –clientId (
str
) –licenseKey (
Optional
[str
]) –notes (
Optional
[str
]) –
- backend_method_prefix = 'licenseOnClient'¶
- getClientId()¶
- Return type:
str
- getLicenseKey()¶
- Return type:
Optional
[str
]
- getLicensePoolId()¶
- Return type:
str
- getNotes()¶
- Return type:
Optional
[str
]
- getSoftwareLicenseId()¶
- Return type:
str
- setClientId(clientId)¶
- Parameters:
clientId (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setLicenseKey(licenseKey)¶
- Parameters:
licenseKey (
str
) –- Return type:
None
- setLicensePoolId(licensePoolId)¶
- Parameters:
licensePoolId (
str
) –- Return type:
None
- setNotes(notes)¶
- Parameters:
notes (
str
) –- Return type:
None
- setSoftwareLicenseId(softwareLicenseId)¶
- Parameters:
softwareLicenseId (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.LicensePool(id, description=None, productIds=None)¶
Bases:
Entity
- Parameters:
id (
str
) –description (
Optional
[str
]) –productIds (
Optional
[list
[str
]]) –
- backend_method_prefix = 'licensePool'¶
-
foreign_id_attributes:
list
[str
] = ['licensePoolId']¶
- getDescription()¶
- Return type:
Optional
[str
]
- getId()¶
- Return type:
str
- getProductIds()¶
- Return type:
Optional
[list
[str
]]
- setDefaults()¶
- Return type:
None
- setDescription(description)¶
- Parameters:
description (
str
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setProductIds(productIds)¶
- Parameters:
productIds (
list
[str
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.LocalbootProduct(id, productVersion, packageVersion, name=None, licenseRequired=None, setupScript=None, uninstallScript=None, updateScript=None, alwaysScript=None, onceScript=None, customScript=None, userLoginScript=None, priority=None, description=None, advice=None, changelog=None, productClassIds=None, windowsSoftwareIds=None)¶
Bases:
Product
- Parameters:
id (
str
) –productVersion (
str
) –packageVersion (
str
) –name (
Optional
[str
]) –licenseRequired (
Optional
[bool
]) –setupScript (
Optional
[str
]) –uninstallScript (
Optional
[str
]) –updateScript (
Optional
[str
]) –alwaysScript (
Optional
[str
]) –onceScript (
Optional
[str
]) –customScript (
Optional
[str
]) –userLoginScript (
Optional
[str
]) –priority (
Optional
[int
]) –description (
Optional
[str
]) –advice (
Optional
[str
]) –changelog (
Optional
[str
]) –productClassIds (
Optional
[list
[str
]]) –windowsSoftwareIds (
Optional
[list
[str
]]) –
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.NetbootProduct(id, productVersion, packageVersion, name=None, licenseRequired=None, setupScript=None, uninstallScript=None, updateScript=None, alwaysScript=None, onceScript=None, customScript=None, priority=None, description=None, advice=None, changelog=None, productClassIds=None, windowsSoftwareIds=None, pxeConfigTemplate='')¶
Bases:
Product
- Parameters:
id (
str
) –productVersion (
str
) –packageVersion (
str
) –name (
Optional
[str
]) –licenseRequired (
Optional
[bool
]) –setupScript (
Optional
[str
]) –uninstallScript (
Optional
[str
]) –updateScript (
Optional
[str
]) –alwaysScript (
Optional
[str
]) –onceScript (
Optional
[str
]) –customScript (
Optional
[str
]) –priority (
Optional
[int
]) –description (
Optional
[str
]) –advice (
Optional
[str
]) –changelog (
Optional
[str
]) –productClassIds (
Optional
[list
[str
]]) –windowsSoftwareIds (
Optional
[list
[str
]]) –pxeConfigTemplate (
str
) –
- getPxeConfigTemplate()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setPxeConfigTemplate(pxeConfigTemplate)¶
- Parameters:
pxeConfigTemplate (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.OEMSoftwareLicense(id, licenseContractId, maxInstallations=None, boundToHost=None, expirationDate=None)¶
Bases:
SoftwareLicense
- Parameters:
id (
str
) –licenseContractId (
str
) –maxInstallations (
Optional
[int
]) –boundToHost (
Optional
[str
]) –expirationDate (
Optional
[str
]) –
- setBoundToHost(boundToHost)¶
- Parameters:
boundToHost (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setMaxInstallations(maxInstallations)¶
- Parameters:
maxInstallations (
int
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.Object(id, description=None, notes=None)¶
Bases:
Entity
- Parameters:
id (
str
) –description (
Optional
[str
]) –notes (
Optional
[str
]) –
-
foreign_id_attributes:
list
[str
] = ['objectId']¶
- getDescription()¶
- Return type:
Optional
[str
]
- getId()¶
- Return type:
str
- getNotes()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setDescription(description)¶
- Parameters:
description (
str
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setNotes(notes)¶
- Parameters:
notes (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'Group': <class 'opsicommon.objects.Group'>, 'Host': <class 'opsicommon.objects.Host'>}¶
- class opsicommon.objects.ObjectToGroup(groupType, groupId, objectId)¶
Bases:
Relationship
- Parameters:
groupType (
str
) –groupId (
str
) –objectId (
str
) –
- backend_method_prefix = 'objectToGroup'¶
- getGroupId()¶
- Return type:
str
- getGroupType()¶
- Return type:
str
- getObjectId()¶
- Return type:
str
- setDefaults()¶
- Return type:
None
- setGroupId(groupId)¶
- Parameters:
groupId (
str
) –- Return type:
None
- setGroupType(groupType)¶
- Parameters:
groupType (
str
) –- Return type:
None
- setObjectId(objectId)¶
- Parameters:
objectId (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.OpsiClient(id, opsiHostKey=None, description=None, notes=None, hardwareAddress=None, ipAddress=None, inventoryNumber=None, oneTimePassword=None, created=None, lastSeen=None, systemUUID=None)¶
Bases:
Host
- Parameters:
id (
str
) –opsiHostKey (
Optional
[str
]) –description (
Optional
[str
]) –notes (
Optional
[str
]) –hardwareAddress (
Optional
[str
]) –ipAddress (
Optional
[str
]) –inventoryNumber (
Optional
[str
]) –oneTimePassword (
Optional
[str
]) –created (
Optional
[str
]) –lastSeen (
Optional
[str
]) –systemUUID (
Optional
[str
]) –
-
foreign_id_attributes:
list
[str
] = ['objectId', 'hostId', 'clientId']¶
- getCreated()¶
- Return type:
Optional
[str
]
- getLastSeen()¶
- Return type:
Optional
[str
]
- getOneTimePassword()¶
- Return type:
Optional
[str
]
- getOpsiHostKey()¶
- Return type:
Optional
[str
]
- setCreated(created)¶
- Parameters:
created (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setLastSeen(lastSeen)¶
- Parameters:
lastSeen (
str
) –- Return type:
None
- setOneTimePassword(oneTimePassword)¶
- Parameters:
oneTimePassword (
str
) –- Return type:
None
- setOpsiHostKey(opsiHostKey)¶
- Parameters:
opsiHostKey (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.OpsiConfigserver(id, opsiHostKey=None, depotLocalUrl=None, depotRemoteUrl=None, depotWebdavUrl=None, repositoryLocalUrl=None, repositoryRemoteUrl=None, description=None, notes=None, hardwareAddress=None, ipAddress=None, inventoryNumber=None, networkAddress=None, maxBandwidth=None, isMasterDepot=None, masterDepotId=None, workbenchLocalUrl=None, workbenchRemoteUrl=None, systemUUID=None)¶
Bases:
OpsiDepotserver
- Parameters:
id (
str
) –opsiHostKey (
Optional
[str
]) –depotLocalUrl (
Optional
[str
]) –depotRemoteUrl (
Optional
[str
]) –depotWebdavUrl (
Optional
[str
]) –repositoryLocalUrl (
Optional
[str
]) –repositoryRemoteUrl (
Optional
[str
]) –description (
Optional
[str
]) –notes (
Optional
[str
]) –hardwareAddress (
Optional
[str
]) –ipAddress (
Optional
[str
]) –inventoryNumber (
Optional
[str
]) –networkAddress (
Optional
[str
]) –maxBandwidth (
Optional
[int
]) –isMasterDepot (
Optional
[bool
]) –masterDepotId (
Optional
[str
]) –workbenchLocalUrl (
Optional
[str
]) –workbenchRemoteUrl (
Optional
[str
]) –systemUUID (
Optional
[str
]) –
-
foreign_id_attributes:
list
[str
] = ['objectId', 'hostId', 'depotId', 'serverId']¶
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.OpsiDepotserver(id, opsiHostKey=None, depotLocalUrl=None, depotRemoteUrl=None, depotWebdavUrl=None, repositoryLocalUrl=None, repositoryRemoteUrl=None, description=None, notes=None, hardwareAddress=None, ipAddress=None, inventoryNumber=None, networkAddress=None, maxBandwidth=None, isMasterDepot=None, masterDepotId=None, workbenchLocalUrl=None, workbenchRemoteUrl=None, systemUUID=None)¶
Bases:
Host
- Parameters:
id (
str
) –opsiHostKey (
Optional
[str
]) –depotLocalUrl (
Optional
[str
]) –depotRemoteUrl (
Optional
[str
]) –depotWebdavUrl (
Optional
[str
]) –repositoryLocalUrl (
Optional
[str
]) –repositoryRemoteUrl (
Optional
[str
]) –description (
Optional
[str
]) –notes (
Optional
[str
]) –hardwareAddress (
Optional
[str
]) –ipAddress (
Optional
[str
]) –inventoryNumber (
Optional
[str
]) –networkAddress (
Optional
[str
]) –maxBandwidth (
Optional
[int
]) –isMasterDepot (
Optional
[bool
]) –masterDepotId (
Optional
[str
]) –workbenchLocalUrl (
Optional
[str
]) –workbenchRemoteUrl (
Optional
[str
]) –systemUUID (
Optional
[str
]) –
-
foreign_id_attributes:
list
[str
] = ['objectId', 'hostId', 'depotId']¶
- getDepotLocalUrl()¶
- Return type:
Optional
[str
]
- getDepotRemoteUrl()¶
- Return type:
Optional
[str
]
- getDepotWebdavUrl()¶
- Return type:
Optional
[str
]
- getIsMasterDepot()¶
- Return type:
Optional
[bool
]
- getMasterDepotId()¶
- Return type:
Optional
[str
]
- getMaxBandwidth()¶
- Return type:
Optional
[int
]
- getNetworkAddress()¶
- Return type:
Optional
[str
]
- getOpsiHostKey()¶
- Return type:
Optional
[str
]
- getRepositoryLocalUrl()¶
- Return type:
Optional
[str
]
- getRepositoryRemoteUrl()¶
- Return type:
Optional
[str
]
- getWorkbenchLocalUrl()¶
- Return type:
Optional
[str
]
- getWorkbenchRemoteUrl()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setDepotLocalUrl(depotLocalUrl)¶
- Parameters:
depotLocalUrl (
str
) –- Return type:
None
- setDepotRemoteUrl(depotRemoteUrl)¶
- Parameters:
depotRemoteUrl (
str
) –- Return type:
None
- setDepotWebdavUrl(depotWebdavUrl)¶
- Parameters:
depotWebdavUrl (
str
) –- Return type:
None
- setIsMasterDepot(isMasterDepot)¶
- Parameters:
isMasterDepot (
bool
) –- Return type:
None
- setMasterDepotId(masterDepotId)¶
- Parameters:
masterDepotId (
str
) –- Return type:
None
- setMaxBandwidth(maxBandwidth)¶
- Parameters:
maxBandwidth (
int
) –- Return type:
None
- setNetworkAddress(networkAddress)¶
- Parameters:
networkAddress (
str
) –- Return type:
None
- setOpsiHostKey(opsiHostKey)¶
- Parameters:
opsiHostKey (
str
) –- Return type:
None
- setRepositoryLocalUrl(repositoryLocalUrl)¶
- Parameters:
repositoryLocalUrl (
str
) –- Return type:
None
- setRepositoryRemoteUrl(repositoryRemoteUrl)¶
- Parameters:
repositoryRemoteUrl (
str
) –- Return type:
None
- setWorkbenchLocalUrl(value)¶
- Parameters:
value (
str
) –- Return type:
None
- setWorkbenchRemoteUrl(value)¶
- Parameters:
value (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'OpsiConfigserver': <class 'opsicommon.objects.OpsiConfigserver'>}¶
- class opsicommon.objects.Product(id, productVersion, packageVersion, name=None, licenseRequired=None, setupScript=None, uninstallScript=None, updateScript=None, alwaysScript=None, onceScript=None, customScript=None, userLoginScript=None, priority=None, description=None, advice=None, changelog=None, productClassIds=None, windowsSoftwareIds=None)¶
Bases:
Entity
- Parameters:
id (
str
) –productVersion (
str
) –packageVersion (
str
) –name (
Optional
[str
]) –licenseRequired (
Optional
[bool
]) –setupScript (
Optional
[str
]) –uninstallScript (
Optional
[str
]) –updateScript (
Optional
[str
]) –alwaysScript (
Optional
[str
]) –onceScript (
Optional
[str
]) –customScript (
Optional
[str
]) –userLoginScript (
Optional
[str
]) –priority (
Optional
[int
]) –description (
Optional
[str
]) –advice (
Optional
[str
]) –changelog (
Optional
[str
]) –productClassIds (
Optional
[list
[str
]]) –windowsSoftwareIds (
Optional
[list
[str
]]) –
- backend_method_prefix = 'product'¶
-
foreign_id_attributes:
list
[str
] = ['productId']¶
- getAdvice()¶
- Return type:
Optional
[str
]
- getAlwaysScript()¶
- Return type:
Optional
[str
]
- getChangelog()¶
- Return type:
Optional
[str
]
- getCustomScript()¶
- Return type:
Optional
[str
]
- getDescription()¶
- Return type:
Optional
[str
]
- getId()¶
- Return type:
str
- getLicenseRequired()¶
- Return type:
Optional
[bool
]
- getName()¶
- Return type:
Optional
[str
]
- getOnceScript()¶
- Return type:
Optional
[str
]
- getPackageVersion()¶
- Return type:
str
- getPriority()¶
- Return type:
Optional
[int
]
- getProductClassIds()¶
- Return type:
Optional
[list
[str
]]
- getProductVersion()¶
- Return type:
str
- getSetupScript()¶
- Return type:
Optional
[str
]
- getUninstallScript()¶
- Return type:
Optional
[str
]
- getUpdateScript()¶
- Return type:
Optional
[str
]
- getUserLoginScript()¶
- Return type:
Optional
[str
]
- getWindowsSoftwareIds()¶
- Return type:
Optional
[list
[str
]]
- setAdvice(advice)¶
- Parameters:
advice (
str
) –- Return type:
None
- setAlwaysScript(alwaysScript)¶
- Parameters:
alwaysScript (
str
) –- Return type:
None
- setChangelog(changelog)¶
- Parameters:
changelog (
str
) –- Return type:
None
- setCustomScript(customScript)¶
- Parameters:
customScript (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setDescription(description)¶
- Parameters:
description (
str
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setLicenseRequired(licenseRequired)¶
- Parameters:
licenseRequired (
bool
) –- Return type:
None
- setName(name)¶
- Parameters:
name (
str
) –- Return type:
None
- setOnceScript(onceScript)¶
- Parameters:
onceScript (
str
) –- Return type:
None
- setPackageVersion(packageVersion)¶
- Parameters:
packageVersion (
str
) –- Return type:
None
- setPriority(priority)¶
- Parameters:
priority (
int
) –- Return type:
None
- setProductClassIds(productClassIds)¶
- Parameters:
productClassIds (
list
[str
]) –- Return type:
None
- setProductVersion(productVersion)¶
- Parameters:
productVersion (
str
) –- Return type:
None
- setSetupScript(setupScript)¶
- Parameters:
setupScript (
str
) –- Return type:
None
- setUninstallScript(uninstallScript)¶
- Parameters:
uninstallScript (
str
) –- Return type:
None
- setUpdateScript(updateScript)¶
- Parameters:
updateScript (
str
) –- Return type:
None
- setUserLoginScript(userLoginScript)¶
- Parameters:
userLoginScript (
str
) –- Return type:
None
- setWindowsSoftwareIds(windowsSoftwareIds)¶
- Parameters:
windowsSoftwareIds (
list
[str
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'LocalbootProduct': <class 'opsicommon.objects.LocalbootProduct'>, 'NetbootProduct': <class 'opsicommon.objects.NetbootProduct'>}¶
- property version: str | None¶
- class opsicommon.objects.ProductDependency(productId, productVersion, packageVersion, productAction, requiredProductId, requiredProductVersion=None, requiredPackageVersion=None, requiredAction=None, requiredInstallationStatus=None, requirementType=None)¶
Bases:
Relationship
- Parameters:
productId (
str
) –productVersion (
str
) –packageVersion (
str
) –productAction (
str
) –requiredProductId (
str
) –requiredProductVersion (
Optional
[str
]) –requiredPackageVersion (
Optional
[str
]) –requiredAction (
Optional
[str
]) –requiredInstallationStatus (
Optional
[str
]) –requirementType (
Optional
[str
]) –
- backend_method_prefix = 'productDependency'¶
- getPackageVersion()¶
- Return type:
str
- getProductAction()¶
- Return type:
str
- getProductId()¶
- Return type:
str
- getProductVersion()¶
- Return type:
str
- getRequiredAction()¶
- Return type:
Optional
[str
]
- getRequiredInstallationStatus()¶
- Return type:
Optional
[str
]
- getRequiredPackageVersion()¶
- Return type:
Optional
[str
]
- getRequiredProductId()¶
- Return type:
Optional
[str
]
- getRequiredProductVersion()¶
- Return type:
Optional
[str
]
- getRequirementType()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setPackageVersion(packageVersion)¶
- Parameters:
packageVersion (
str
) –- Return type:
None
- setProductAction(productAction)¶
- Parameters:
productAction (
str
) –- Return type:
None
- setProductId(productId)¶
- Parameters:
productId (
str
) –- Return type:
None
- setProductVersion(productVersion)¶
- Parameters:
productVersion (
str
) –- Return type:
None
- setRequiredAction(requiredAction)¶
- Parameters:
requiredAction (
str
) –- Return type:
None
- setRequiredInstallationStatus(requiredInstallationStatus)¶
- Parameters:
requiredInstallationStatus (
str
) –- Return type:
None
- setRequiredPackageVersion(requiredPackageVersion)¶
- Parameters:
requiredPackageVersion (
str
) –- Return type:
None
- setRequiredProductId(requiredProductId)¶
- Parameters:
requiredProductId (
str
) –- Return type:
None
- setRequiredProductVersion(requiredProductVersion)¶
- Parameters:
requiredProductVersion (
str
) –- Return type:
None
- setRequirementType(requirementType)¶
- Parameters:
requirementType (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.ProductGroup(id, description=None, notes=None, parentGroupId=None)¶
Bases:
Group
- Parameters:
id (
str
) –description (
Optional
[str
]) –notes (
Optional
[str
]) –parentGroupId (
Optional
[str
]) –
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.ProductOnClient(productId, productType, clientId, targetConfiguration=None, installationStatus=None, actionRequest=None, lastAction=None, actionProgress=None, actionResult=None, productVersion=None, packageVersion=None, modificationTime=None, actionSequence=None)¶
Bases:
Relationship
- Parameters:
productId (
str
) –productType (
str
) –clientId (
str
) –targetConfiguration (
Optional
[str
]) –installationStatus (
Optional
[str
]) –actionRequest (
Optional
[str
]) –lastAction (
Optional
[str
]) –actionProgress (
Optional
[str
]) –actionResult (
Optional
[str
]) –productVersion (
Optional
[str
]) –packageVersion (
Optional
[str
]) –modificationTime (
Optional
[str
]) –actionSequence (
Optional
[int
]) –
- backend_method_prefix = 'productOnClient'¶
- getActionProgress()¶
- Return type:
Optional
[str
]
- getActionRequest()¶
- Return type:
Optional
[str
]
- getActionResult()¶
- Return type:
Optional
[str
]
- getActionSequence()¶
- Return type:
Optional
[int
]
- getClientId()¶
- Return type:
str
- getInstallationStatus()¶
- Return type:
Optional
[str
]
- getLastAction()¶
- Return type:
Optional
[str
]
- getModificationTime()¶
- Return type:
Optional
[str
]
- getPackageVersion()¶
- Return type:
Optional
[str
]
- getProductId()¶
- Return type:
str
- getProductType()¶
- Return type:
Optional
[str
]
- getProductVersion()¶
- Return type:
Optional
[str
]
- getTargetConfiguration()¶
- Return type:
Optional
[str
]
- setActionProgress(actionProgress)¶
- Parameters:
actionProgress (
str
) –- Return type:
None
- setActionRequest(actionRequest)¶
- Parameters:
actionRequest (
str
) –- Return type:
None
- setActionResult(actionResult)¶
- Parameters:
actionResult (
str
) –- Return type:
None
- setActionSequence(actionSequence)¶
- Parameters:
actionSequence (
int
) –- Return type:
None
- setClientId(clientId)¶
- Parameters:
clientId (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setInstallationStatus(installationStatus)¶
- Parameters:
installationStatus (
str
) –- Return type:
None
- setLastAction(lastAction)¶
- Parameters:
lastAction (
str
) –- Return type:
None
- setModificationTime(modificationTime)¶
- Parameters:
modificationTime (
str
) –- Return type:
None
- setPackageVersion(packageVersion)¶
- Parameters:
packageVersion (
str
) –- Return type:
None
- setProductId(productId)¶
- Parameters:
productId (
str
) –- Return type:
None
- setProductType(productType)¶
- Parameters:
productType (
str
) –- Return type:
None
- setProductVersion(productVersion)¶
- Parameters:
productVersion (
str
) –- Return type:
None
- setTargetConfiguration(targetConfiguration)¶
- Parameters:
targetConfiguration (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- property version: str¶
- class opsicommon.objects.ProductOnDepot(productId, productType, productVersion, packageVersion, depotId, locked=None)¶
Bases:
Relationship
- Parameters:
productId (
str
) –productType (
str
) –productVersion (
str
) –packageVersion (
str
) –depotId (
str
) –locked (
Optional
[bool
]) –
- backend_method_prefix = 'productOnDepot'¶
- getDepotId()¶
- Return type:
str
- getLocked()¶
- Return type:
Optional
[bool
]
- getPackageVersion()¶
- Return type:
Optional
[str
]
- getProductId()¶
- Return type:
str
- getProductType()¶
- Return type:
Optional
[str
]
- getProductVersion()¶
- Return type:
Optional
[str
]
- setDefaults()¶
- Return type:
None
- setDepotId(depotId)¶
- Parameters:
depotId (
str
) –- Return type:
None
- setLocked(locked)¶
- Parameters:
locked (
bool
) –- Return type:
None
- setPackageVersion(packageVersion)¶
- Parameters:
packageVersion (
str
) –- Return type:
None
- setProductId(productId)¶
- Parameters:
productId (
str
) –- Return type:
None
- setProductType(productType)¶
- Parameters:
productType (
str
) –- Return type:
None
- setProductVersion(productVersion)¶
- Parameters:
productVersion (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- property version: str¶
- class opsicommon.objects.ProductProperty(productId, productVersion, packageVersion, propertyId, description=None, possibleValues=None, defaultValues=None, editable=None, multiValue=None)¶
Bases:
Entity
- Parameters:
productId (
str
) –productVersion (
str
) –packageVersion (
str
) –propertyId (
str
) –description (
Optional
[str
]) –possibleValues (
Optional
[list
[Any
]]) –defaultValues (
Optional
[list
[Any
]]) –editable (
Optional
[bool
]) –multiValue (
Optional
[bool
]) –
- backend_method_prefix = 'productProperty'¶
- getDefaultValues()¶
- Return type:
Optional
[list
[Any
]]
- getDescription()¶
- Return type:
Optional
[str
]
- getEditable()¶
- Return type:
Optional
[bool
]
- getMultiValue()¶
- Return type:
Optional
[bool
]
- getPackageVersion()¶
- Return type:
str
- getPossibleValues()¶
- Return type:
Optional
[list
[Any
]]
- getProductId()¶
- Return type:
str
- getProductVersion()¶
- Return type:
str
- getPropertyId()¶
- Return type:
str
- setDefaultValues(defaultValues)¶
- Parameters:
defaultValues (
list
[Any
]) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setDescription(description)¶
- Parameters:
description (
str
) –- Return type:
None
- setEditable(editable)¶
- Parameters:
editable (
bool
) –- Return type:
None
- setMultiValue(multiValue)¶
- Parameters:
multiValue (
bool
) –- Return type:
None
- setPackageVersion(packageVersion)¶
- Parameters:
packageVersion (
str
) –- Return type:
None
- setPossibleValues(possibleValues)¶
- Parameters:
possibleValues (
list
[Any
]) –- Return type:
None
- setProductId(productId)¶
- Parameters:
productId (
str
) –- Return type:
None
- setProductVersion(productVersion)¶
- Parameters:
productVersion (
str
) –- Return type:
None
- setPropertyId(propertyId)¶
- Parameters:
propertyId (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'BoolProductProperty': <class 'opsicommon.objects.BoolProductProperty'>, 'UnicodeProductProperty': <class 'opsicommon.objects.UnicodeProductProperty'>}¶
- class opsicommon.objects.ProductPropertyState(productId, propertyId, objectId, values=None)¶
Bases:
Relationship
- Parameters:
productId (
str
) –propertyId (
str
) –objectId (
str
) –values (
Optional
[list
[Any
]]) –
- backend_method_prefix = 'productPropertyState'¶
- getObjectId()¶
- Return type:
str
- getProductId()¶
- Return type:
str
- getPropertyId()¶
- Return type:
str
- getValues()¶
- Return type:
Optional
[list
[Any
]]
- setDefaults()¶
- Return type:
None
- setObjectId(objectId)¶
- Parameters:
objectId (
str
) –- Return type:
None
- setProductId(productId)¶
- Parameters:
productId (
str
) –- Return type:
None
- setPropertyId(propertyId)¶
- Parameters:
propertyId (
str
) –- Return type:
None
- setValues(values)¶
- Parameters:
values (
list
[Any
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.Relationship¶
Bases:
BaseObject
- clone(identOnly=False)¶
- Parameters:
identOnly (
bool
) –- Return type:
Any
- serialize()¶
- Return type:
dict
[str
,Any
]
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'AuditHardwareOnHost': <class 'opsicommon.objects.AuditHardwareOnHost'>, 'AuditSoftwareOnClient': <class 'opsicommon.objects.AuditSoftwareOnClient'>, 'AuditSoftwareToLicensePool': <class 'opsicommon.objects.AuditSoftwareToLicensePool'>, 'ConfigState': <class 'opsicommon.objects.ConfigState'>, 'LicenseOnClient': <class 'opsicommon.objects.LicenseOnClient'>, 'ObjectToGroup': <class 'opsicommon.objects.ObjectToGroup'>, 'ProductDependency': <class 'opsicommon.objects.ProductDependency'>, 'ProductOnClient': <class 'opsicommon.objects.ProductOnClient'>, 'ProductOnDepot': <class 'opsicommon.objects.ProductOnDepot'>, 'ProductPropertyState': <class 'opsicommon.objects.ProductPropertyState'>, 'SoftwareLicenseToLicensePool': <class 'opsicommon.objects.SoftwareLicenseToLicensePool'>}¶
- class opsicommon.objects.RetailSoftwareLicense(id, licenseContractId, maxInstallations=None, boundToHost=None, expirationDate=None)¶
Bases:
SoftwareLicense
- Parameters:
id (
str
) –licenseContractId (
str
) –maxInstallations (
Optional
[int
]) –boundToHost (
Optional
[str
]) –expirationDate (
Optional
[str
]) –
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.SoftwareLicense(id, licenseContractId, maxInstallations=None, boundToHost=None, expirationDate=None)¶
Bases:
Entity
- Parameters:
id (
str
) –licenseContractId (
str
) –maxInstallations (
Optional
[int
]) –boundToHost (
Optional
[str
]) –expirationDate (
Optional
[str
]) –
- backend_method_prefix = 'softwareLicense'¶
-
foreign_id_attributes:
list
[str
] = ['softwareLicenseId']¶
- getBoundToHost()¶
- Return type:
Optional
[str
]
- getExpirationDate()¶
- Return type:
Optional
[str
]
- getId()¶
- Return type:
str
- getLicenseContractId()¶
- Return type:
str
- getMaxInstallations()¶
- Return type:
Optional
[int
]
- setBoundToHost(boundToHost)¶
- Parameters:
boundToHost (
str
) –- Return type:
None
- setDefaults()¶
- Return type:
None
- setExpirationDate(expirationDate)¶
- Parameters:
expirationDate (
str
) –- Return type:
None
- setId(id)¶
- Parameters:
id (
str
) –- Return type:
None
- setLicenseContractId(licenseContractId)¶
- Parameters:
licenseContractId (
str
) –- Return type:
None
- setMaxInstallations(maxInstallations)¶
- Parameters:
maxInstallations (
int
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {'ConcurrentSoftwareLicense': <class 'opsicommon.objects.ConcurrentSoftwareLicense'>, 'OEMSoftwareLicense': <class 'opsicommon.objects.OEMSoftwareLicense'>, 'RetailSoftwareLicense': <class 'opsicommon.objects.RetailSoftwareLicense'>, 'VolumeSoftwareLicense': <class 'opsicommon.objects.VolumeSoftwareLicense'>}¶
- class opsicommon.objects.SoftwareLicenseToLicensePool(softwareLicenseId, licensePoolId, licenseKey=None)¶
Bases:
Relationship
- Parameters:
softwareLicenseId (
str
) –licensePoolId (
str
) –licenseKey (
Optional
[str
]) –
- backend_method_prefix = 'softwareLicenseToLicensePool'¶
- getLicenseKey()¶
- Return type:
Optional
[str
]
- getLicensePoolId()¶
- Return type:
str
- getSoftwareLicenseId()¶
- Return type:
str
- setDefaults()¶
- Return type:
None
- setLicenseKey(licenseKey)¶
- Parameters:
licenseKey (
str
) –- Return type:
None
- setLicensePoolId(licensePoolId)¶
- Parameters:
licensePoolId (
str
) –- Return type:
None
- setSoftwareLicenseId(softwareLicenseId)¶
- Parameters:
softwareLicenseId (
str
) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.UnicodeConfig(id, description='', possibleValues=None, defaultValues=None, editable=None, multiValue=None)¶
Bases:
Config
- Parameters:
id (
str
) –description (
str
) –possibleValues (
Optional
[list
[Any
]]) –defaultValues (
Optional
[list
[Any
]]) –editable (
Optional
[bool
]) –multiValue (
Optional
[bool
]) –
- setDefaultValues(defaultValues)¶
- Parameters:
defaultValues (
list
[Any
]) –- Return type:
None
- setPossibleValues(possibleValues)¶
- Parameters:
possibleValues (
list
[Any
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.UnicodeProductProperty(productId, productVersion, packageVersion, propertyId, description=None, possibleValues=None, defaultValues=None, editable=None, multiValue=None)¶
Bases:
ProductProperty
- Parameters:
productId (
str
) –productVersion (
str
) –packageVersion (
str
) –propertyId (
str
) –description (
Optional
[str
]) –possibleValues (
Optional
[list
[Any
]]) –defaultValues (
Optional
[list
[Any
]]) –editable (
Optional
[bool
]) –multiValue (
Optional
[bool
]) –
- setDefaultValues(defaultValues)¶
- Parameters:
defaultValues (
list
[Any
]) –- Return type:
None
- setPossibleValues(possibleValues)¶
- Parameters:
possibleValues (
list
[Any
]) –- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- class opsicommon.objects.VolumeSoftwareLicense(id, licenseContractId, maxInstallations=None, boundToHost=None, expirationDate=None)¶
Bases:
SoftwareLicense
- Parameters:
id (
str
) –licenseContractId (
str
) –maxInstallations (
Optional
[int
]) –boundToHost (
Optional
[str
]) –expirationDate (
Optional
[str
]) –
- setDefaults()¶
- Return type:
None
-
sub_classes:
dict
[str
,type
] = {}¶
- opsicommon.objects.decode_ident(_class, _hash)¶
- Parameters:
_class (
Type
[BaseObject
]) –_hash (
dict
[str
,Any
]) –
- Return type:
dict
[str
,Any
]
- opsicommon.objects.get_backend_method_prefix(_class)¶
- Parameters:
_class (
Type
[BaseObject
]) –- Return type:
Any
- opsicommon.objects.get_foreign_id_attributes(_class)¶
- Parameters:
_class (
Type
[BaseObject
]) –- Return type:
Any
- opsicommon.objects.get_ident_attributes(_class)¶
- Parameters:
_class (
Type
[BaseObject
]) –- Return type:
tuple
[str
,...
]
- opsicommon.objects.get_possible_class_attributes(_class)¶
Returns the possible attributes of a class.
- Parameters:
_class (
Type
[BaseObject
]) –- Return type:
set
[str
]
- opsicommon.objects.mandatory_constructor_args(_class)¶
- Parameters:
_class (
Type
[BaseObject
]) –- Return type:
list
[str
]
- opsicommon.objects.objects_differ(obj1, obj2, exclude_attributes=None)¶
- Parameters:
obj1 (
Any
) –obj2 (
Any
) –exclude_attributes (
Optional
[list
[str
]]) –
- Return type:
bool
opsicommon.types module¶
Type forcing features.
This module contains various methods to ensure force a special type on an object.
- opsicommon.types.args(*vars, **typeVars)¶
Function to populate an object with passed on keyword args. This is intended to be used as a decorator. Classes using this decorator must explicitly inherit from object or a subclass of object.
@args() #works class Foo(object): pass @args() #works class Bar(Foo): pass @args() #does not work class Foo(): pass @args() #does not work class Foo: pass
- Parameters:
vars (
Any
) –typeVars (
Any
) –
- Return type:
Callable
- opsicommon.types.forceActionProgress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceActionRequest(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceActionRequestList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceActionResult(var)¶
- Parameters:
var (
Any
) –- Return type:
Optional
[str
]
- opsicommon.types.forceArchitecture(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceArchitectureList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceAuditState(var)¶
- Parameters:
var (
Any
) –- Return type:
int
- opsicommon.types.forceBool(var)¶
- Parameters:
var (
Any
) –- Return type:
bool
- opsicommon.types.forceBoolList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[bool
]
- opsicommon.types.forceConfigId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceDict(var)¶
- Parameters:
var (
Any
) –- Return type:
dict
- opsicommon.types.forceDictList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[dict
]
- opsicommon.types.forceDomain(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceEmailAddress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceFilename(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceFloat(var)¶
- Parameters:
var (
Any
) –- Return type:
float
- opsicommon.types.forceFqdn(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceGroupId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceGroupIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceGroupType(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceGroupTypeList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceHardwareAddress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceHardwareDeviceId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceHardwareVendorId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceHostAddress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceHostId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceHostIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceHostname(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceIPAddress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceInstallationStatus(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceInt(var)¶
- Parameters:
var (
Any
) –- Return type:
int
- opsicommon.types.forceIntList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[int
]
- opsicommon.types.forceIpAddress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceLanguageCode(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceLanguageCodeList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceLicenseContractId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceLicenseContractIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceLicensePoolId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceLicensePoolIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[Any
]
- opsicommon.types.forceNetmask(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceNetworkAddress(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceObjectClass(var, objectClass)¶
- Parameters:
var (
Any
) –objectClass (
Type
[TypeVar
(BaseObjectT
, bound= BaseObject)]) –
- Return type:
TypeVar
(BaseObjectT
, bound= BaseObject)
- opsicommon.types.forceObjectClassList(var, objectClass)¶
- Parameters:
var (
Any
) –objectClass (
Type
[TypeVar
(BaseObjectT
, bound= BaseObject)]) –
- Return type:
list
[TypeVar
(BaseObjectT
, bound= BaseObject)]
- opsicommon.types.forceObjectId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceObjectIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceOct(var)¶
- Parameters:
var (
Any
) –- Return type:
int
- opsicommon.types.forceOpsiHostKey(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceOpsiTimestamp(var)¶
Make var an opsi-compatible timestamp.
This is a string with the format “YYYY-MM-DD HH:MM:SS”.
If a conversion is not possible a ValueError will be raised.
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forcePackageCustomName(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forcePackageVersion(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forcePackageVersionList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceProductId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceProductIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceProductPriority(var)¶
- Parameters:
var (
Any
) –- Return type:
int
- opsicommon.types.forceProductPropertyId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceProductPropertyType(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceProductTargetConfiguration(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceProductType(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceProductVersion(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceProductVersionList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceRequirementType(var)¶
- Parameters:
var (
Any
) –- Return type:
Optional
[str
]
- opsicommon.types.forceSoftwareLicenseId(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceSoftwareLicenseIdList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceTime(var)¶
Convert var to a time.struct_time.
If no conversion is possible a ValueError will be raised.
- Parameters:
var (
Any
) –- Return type:
Union
[struct_time
,datetime
]
- opsicommon.types.forceUnicode(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceUnicodeList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceUnicodeLower(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceUnicodeLowerList(var)¶
- Parameters:
var (
Any
) –- Return type:
list
[str
]
- opsicommon.types.forceUnicodeUpper(var)¶
- Parameters:
var (
Any
) –- Return type:
str
- opsicommon.types.forceUniqueList(_list)¶
- Parameters:
_list (
list
[Any
]) –- Return type:
list
[Any
]
- opsicommon.types.forceUnsignedInt(var)¶
- Parameters:
var (
Any
) –- Return type:
int
- opsicommon.types.forceUrl(var)¶
Forces
var
to be an valid URL.- Return type:
str
- Parameters:
var (
Any
) –
Module contents¶
This file is part of opsi - https://www.opsi.org