Kernel::System::CloudService::Backend::Run - cloud service lib
All functions for cloud service communication.
create a CloudService object. Do not use it directly, instead use:
my $CloudServiceObject = $Kernel::OM->Get('Kernel::System::CloudService::Backend::Run');
perform a cloud service communication and return result data
my $RequestResult = $CloudServiceObject->Request( OTRSIDAuth => { # will be send encoded as JSON OTRSID => '', Password => '', }, UniqueIDAuth => { # will send encoded as JSON UniqueID => '', APIKey => '', }, RequestData => { # this complex structure will be send encoded as JSON CloudServiceTest => [ { InstanceName = 'AnyName', # optional Operation => "ConfigurationSet", Data => { # ... request operation data ... }, }, { Operation => "SomeOperation", Data => { # ... request operation data ... }, }, # ... other entries may follow ... ], FeatureAddonManagement => [ { Operation => "FAOListAssigned", Data => { # ... request operation data ... }, }, { InstanceName = 'InstanceNameOne', # optional Operation => "FAOGet", Data => { # ... request operation data ... }, }, { InstanceName = 'InstanceNameTwo', # optional Operation => "FAOGet", Data => { # ... request operation data ... }, }, # ... other entries may follow ... ], # ... other entries may follow ... }, Timeout => 15, # optional, timeout Proxy => 'proxy.example.com', # optional, proxy );
Returns: $RequestResult { Success => 1, ErrorMessage => '...', # optional Results => { CloudServiceTest => [ { Success => 1, # 1 or 0 ErrorMessage => '...', # optional InstanceName = 'AnyName', # optional Operation => "ConfigurationSet", Data => { # ... response operation data .. }, }, { Success => 0, # 1 or 0 ErrorMessage => '...', # optional Operation => "SomeOperation", Data => { # ... response operation data ... }, }, ],
FeatureAddonManagement => [ { Success => 1, # 1 or 0 ErrorMessage => '...', # optional Operation => "FAOListAssigned", Data => { # ... response operation data .. }, }, { Success => 1, # 1 or 0 ErrorMessage => '...', # optional InstanceName = 'InstanceNameOne', # optional Operation => "FaoGet", Data => { # ... response operation data ... }, }, { Success => 0, # 1 or 0 ErrorMessage => '...', # optional InstanceName = 'InstanceNameTwo', # optional Operation => "FaoGet", Data => { # ... response operation data ... }, }, ], }, };
my $OperationResult = $CloudServiceObject->OperationResultGet( CloudService => 'Test', Operation => 'test', InstanceName => 'AnyName', # optional RequestResult => { Success => 1, Results => { Test => [ { Success => 1, InstanceName => 'AnyName', Operation => 'Test', Data => { # ... response operation data .. }, }, { Success => 0, ErrorMessage => 'some message', Operation => 'SomeOperation', Data => { # ... response operation data ... }, }, ], }, }; );
Returns:
$OperationResult { Success => 1, ErrorMessage => 'a message' # optional InstanceName => 'AnyName', Operation => "Test", Data => { # ... response operation data .. }, },
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.