NAME
Net::Silverpeak::Orchestrator - Silverpeak Orchestrator REST API client library
VERSION
version 0.015002
SYNOPSIS
use strict;
use warnings;
use Net::Silverpeak::Orchestrator;
my $orchestrator = Net::Silverpeak::Orchestrator->new(
server => 'https://orchestrator.example.com',
user => 'username',
passwd => '$password',
clientattrs => { timeout => 30 },
);
$orchestrator->login;
# OR
$orchestrator = Net::Silverpeak::Orchestrator->new(
server => 'https://orchestrator.example.com',
api_key => '$api-key',
clientattrs => { timeout => 30 },
);
DESCRIPTION
This module is a client library for the Silverpeak Orchestrator REST API. Currently it is developed and tested against version 9.3.3.
The REST API endpoints have changed with version 9.3 and since version 0.011 this module handles both.
ATTRIBUTES
is_logged_in
Returns true if successfully logged in.
METHODS
login
Logs into the Silverpeak Orchestrator. Only required when using username and password, not for api key.
logout
Logs out of the Silverpeak Orchestrator. Only possible when using username and password, not for api key.
get_version
Returns the Silverpeak Orchestrator version.
list_templategroups
Returns an arrayref of template groups.
get_templategroup
Returns a template group by name.
create_templategroup
Takes a template group name and a hashref with its config.
Returns true on success.
Throws an exception on error.
update_templates_of_templategroup
Takes a template group name and an arrayref of template names.
Returns true on success.
Throws an exception on error.
update_templategroup
Takes a template group name and a hashref of template configs.
Returns true on success.
Throws an exception on error.
delete_templategroup
Takes a template group name.
Returns true on success.
Throws an exception on error.
has_segmentation_enabled
Returns true if segmentation is enabled, else false.
get_vrf_zones_map
Returns a hashref of firewall zones indexed by VRF id and firewall zone id.
get_vrf_by_id
Returns a hashref of VRFs indexed by their id.
get_vrf_security_policies_by_ids
Takes the source and destination vrf ids.
Returns a hashref containing all settings and security policies of a vrf.
update_vrf_security_policies_by_ids
Takes the source and destination vrf ids.
Returns true on success.
Throws an exception on error.
list_appliances
Returns an arrayref of appliances.
get_appliance
Returns an appliance by id.
get_appliance_extrainfo
Takes an appliance id.
Returns a hashref with additional infos about the appliance like its location.
get_ha_groups_by_id
Returns a hashref of HA groups indexed by their id.
list_groups
Returns an arrayref of appliance groups.
get_deployment
Takes an appliance id.
Returns a hashref containing the deployment data.
get_interface_state
Takes an interface id.
Returns a hashref containing the interface state.
get_interface_labels_by_type
Returns a hashref containing the interface labels indexed by LAN/WAN and their id.
get_appliance_ipsla_configs
Takes an appliance id.
Returns a hashref containing all IP SLA configurations.
get_appliance_ipsla_states
Takes an appliance id.
Returns a hashref containing all IP SLA states.
get_appliance_bgp_system_config
Takes an appliance id and an optional hashref with additional query parameters.
Returns a hashref containing the BGP system config.
get_appliance_bgp_system_config_allvrfs
Takes an appliance id and an optional hashref with additional query parameters.
Returns a hashref containing the BGP system config for all VRFs indexed by VRF ID.
get_appliance_bgp_neighbors
Takes an appliance id and an optional hashref with additional query parameters.
Returns a hashref containing all BGP neighbors.
list_template_applianceassociations
Returns a hashref of template to appliances associations.
list_applianceids_by_templategroupname
Returns an arrayref of appliance IDs a templategroup is assigned to.
list_addressgroups
Returns an arrayref of address groups.
list_addressgroup_names
Returns an arrayref of address group names.
get_addressgroup
Returns an address group by name.
create_or_update_addressgroup
Takes an address group name and a hashref of address group config.
Returns true on success.
Throws an exception on error.
update_addressgroup
Takes an address group name and a hashref of address group config.
Returns true on success.
Throws an exception on error.
delete_addressgroup
Takes an address group name.
Returns true on success.
Throws an exception on error.
list_servicegroups
Returns an arrayref of service groups.
list_servicegroup_names
Returns an arrayref of service group names.
get_servicegroup
Returns a service group by name.
create_or_update_servicegroup
Takes a service group name and a hashref of service group config.
Returns true on success.
Throws an exception on error.
update_servicegroup
Takes a service group name and a hashref of service group config.
Returns true on success.
Throws an exception on error.
delete_servicegroup
Takes a service group name.
Returns true on success.
Throws an exception on error.
list_domain_applications
Returns an arrayref of domain name applications for a resource key which defaults to 'userDefined'.
create_or_update_domain_application
Takes a domain name application domain, not name, and a hashref of its config.
Returns true on success.
Throws an exception on error.
delete_domain_application
Takes a domain name, not application name.
Returns true on success.
Throws an exception on error.
list_application_groups
Returns a hashref of application groups indexed by their name for a resource key which defaults to 'userDefined'.
create_or_update_application_group
Takes a application group name, and a hashref of its config.
Returns true on success.
Throws an exception on error.
Because there is no API endpoint for creating or editing a single application group, this method has to load all application groups using list_application_groups, modify and then save them.
delete_application_group
Takes an application group name.
Returns true on success.
Throws an exception on error.
Because there is no API endpoint for deleting a single application group, this method has to load all application groups using list_application_groups, remove the requested application group and then save them.
KNOWN SILVERPEAK ORCHESTRATOR BUGS
- http 500 response on api key authentication
-
Orchestrator versions before version 9.0.4 respond with a http 500 error on every request using an api key that has no expiration date set. The only workaround is to set an expiration date for it.
AUTHOR
Alexander Hartmaier <abraxxa@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by Alexander Hartmaier.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.