-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mykola Vuy
authored and
Mykola Vuy
committed
Sep 8, 2020
1 parent
54d0950
commit 47f5448
Showing
338 changed files
with
1,818 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?php | ||
|
||
/** | ||
* AccelerationDashboard SummaryCharts | ||
* | ||
* @category API wrapper | ||
* @package OnApp | ||
* @author Mykola Vuy | ||
* @copyright © 2020 OnApp | ||
*/ | ||
|
||
/** | ||
* AccelerationDashboard_SummaryCharts | ||
* | ||
* Use the following API calls to view, assign and delete virtual server recipes in your cloud. | ||
* | ||
* The OnApp_NSX_Edges class uses the following basic method: | ||
* {@link getList}. | ||
* | ||
* @example: $obj->getList(null, ['start_date' => '2020-03-16', 'end_date' => '2020-03-31', 'frequency' => '1']) | ||
* | ||
* For full fields reference and curl request details visit: ( http://help.onapp.com/manual.php?m=2 ) | ||
*/ | ||
class OnApp_AccelerationDashboard_SummaryCharts extends OnApp { | ||
/** | ||
* root tag used in the API request | ||
* | ||
* @var string | ||
*/ | ||
var $_tagRoot = 'summary_chart'; | ||
/** | ||
* alias processing the object data | ||
* | ||
* @var string | ||
*/ | ||
var $_resource = 'acceleration_dashboard/summary_charts'; | ||
/** | ||
* API Fields description | ||
* | ||
* @param string|float $version OnApp API version | ||
* @param string $className current class' name | ||
* | ||
* @return array | ||
*/ | ||
public function initFields( $version = null, $className = '' ) { | ||
switch ( $version ) { | ||
case 6.3: | ||
$this->fields = array( | ||
'timestamp' => array( | ||
ONAPP_FIELD_MAP => '_timestamp', | ||
ONAPP_FIELD_TYPE => 'integer', | ||
), | ||
'website_count' => array( | ||
ONAPP_FIELD_MAP => '_website_count', | ||
ONAPP_FIELD_TYPE => 'integer', | ||
), | ||
); | ||
break; | ||
} | ||
|
||
parent::initFields( $version, __CLASS__ ); | ||
|
||
return $this->fields; | ||
} | ||
|
||
/** | ||
* Returns the URL Alias of the API Class that inherits the OnApp class | ||
* | ||
* @param string $action action name | ||
* | ||
* @return string API resource | ||
* @access public | ||
*/ | ||
public function getResource( $action = ONAPP_GETRESOURCE_DEFAULT ) { | ||
switch ( $action ) { | ||
case ONAPP_GETRESOURCE_DEFAULT: | ||
/** | ||
* ROUTE : | ||
* | ||
* @name Get Summary Charts | ||
* @method GET | ||
* @alias /acceleration_dashboard/summary_charts(.:format) | ||
* @format {:controller=>"AccelerationDashboard_SummaryCharts", :action=>"index"} | ||
*/ | ||
|
||
$resource = $this->_resource; | ||
$this->logger->debug( 'getResource( ' . $action . ' ): return ' . $resource ); | ||
break; | ||
|
||
default: | ||
$resource = parent::getResource( $action ); | ||
break; | ||
} | ||
|
||
return $resource; | ||
} | ||
|
||
/** | ||
* Activates action performed with object | ||
* | ||
* @param string $action_name the name of action | ||
* | ||
* @access public | ||
*/ | ||
public function activateCheck( $action_name ) { | ||
switch ( $action_name ) { | ||
case ONAPP_ACTIVATE_LOAD: | ||
case ONAPP_ACTIVATE_SAVE: | ||
case ONAPP_ACTIVATE_DELETE: | ||
exit( 'Call to undefined method ' . __CLASS__ . '::' . $action_name . '()' ); | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?php | ||
|
||
/** | ||
* AccelerationDashboard SummaryMetrics | ||
* | ||
* @category API wrapper | ||
* @package OnApp | ||
* @author Mykola Vuy | ||
* @copyright © 2020 OnApp | ||
*/ | ||
|
||
/** | ||
* AccelerationDashboard_SummaryMetrics | ||
* | ||
* Use the following API calls to view, assign and delete virtual server recipes in your cloud. | ||
* | ||
* The OnApp_NSX_Edges class uses the following basic method: | ||
* {@link getList}. | ||
* | ||
* @example: $obj->getList(null, ['start_date' => '2020-03-16', 'end_date' => '2020-03-31', 'frequency' => '1']) | ||
* | ||
* For full fields reference and curl request details visit: ( http://help.onapp.com/manual.php?m=2 ) | ||
*/ | ||
class OnApp_AccelerationDashboard_SummaryMetrics extends OnApp { | ||
/** | ||
* root tag used in the API request | ||
* | ||
* @var string | ||
*/ | ||
var $_tagRoot = 'summary_metrics'; | ||
/** | ||
* alias processing the object data | ||
* | ||
* @var string | ||
*/ | ||
var $_resource = 'acceleration_dashboard/summary_metrics'; | ||
/** | ||
* API Fields description | ||
* | ||
* @param string|float $version OnApp API version | ||
* @param string $className current class' name | ||
* | ||
* @return array | ||
*/ | ||
public function initFields( $version = null, $className = '' ) { | ||
switch ( $version ) { | ||
case 6.3: | ||
$this->fields = array( | ||
'highest_cdn_bandwidth' => array( | ||
ONAPP_FIELD_MAP => '_highest_cdn_bandwidth', | ||
ONAPP_FIELD_TYPE => 'string', | ||
), | ||
'highest_origin_bandwidth' => array( | ||
ONAPP_FIELD_MAP => '_highest_origin_bandwidth', | ||
ONAPP_FIELD_TYPE => 'string', | ||
), | ||
); | ||
break; | ||
} | ||
|
||
parent::initFields( $version, __CLASS__ ); | ||
|
||
return $this->fields; | ||
} | ||
|
||
/** | ||
* Returns the URL Alias of the API Class that inherits the OnApp class | ||
* | ||
* @param string $action action name | ||
* | ||
* @return string API resource | ||
* @access public | ||
*/ | ||
function getResource( $action = ONAPP_GETRESOURCE_DEFAULT ) { | ||
switch ( $action ) { | ||
case ONAPP_GETRESOURCE_DEFAULT: | ||
/** | ||
* ROUTE : | ||
* | ||
* @name Get Summary Metrics | ||
* @method GET | ||
* @alias /acceleration_dashboard/summary_metrics(.:format) | ||
* @format {:controller=>"AccelerationDashboard_SummaryMetrics", :action=>"index"} | ||
*/ | ||
|
||
$resource = $this->_resource; | ||
$this->logger->debug( 'getResource( ' . $action . ' ): return ' . $resource ); | ||
break; | ||
|
||
default: | ||
$resource = parent::getResource( $action ); | ||
break; | ||
} | ||
|
||
return $resource; | ||
} | ||
|
||
/** | ||
* Activates action performed with object | ||
* | ||
* @param string $action_name the name of action | ||
* | ||
* @access public | ||
*/ | ||
function activateCheck( $action_name ) { | ||
switch ( $action_name ) { | ||
case ONAPP_ACTIVATE_LOAD: | ||
case ONAPP_ACTIVATE_SAVE: | ||
case ONAPP_ACTIVATE_DELETE: | ||
exit( 'Call to undefined method ' . __CLASS__ . '::' . $action_name . '()' ); | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.