241 lines
19 KiB
PHP
241 lines
19 KiB
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* SecurityGroupsApiTest
|
||
|
|
* PHP version 7.4
|
||
|
|
*
|
||
|
|
* @category Class
|
||
|
|
* @package OpenAPI\Client
|
||
|
|
* @author OpenAPI Generator team
|
||
|
|
* @link https://openapi-generator.tech
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Instance API
|
||
|
|
*
|
||
|
|
* Scaleway Instances are virtual machines in the cloud. Different [Instance types](https://www.scaleway.com/en/docs/compute/instances/reference-content/choosing-instance-type/) offer different technical specifications in terms of vCPU, RAM, bandwidth and storage. Once you have created your Instance and installed your image of choice (e.g. an operating system), you can [connect to your Instance via SSH](https://www.scaleway.com/en/docs/compute/instances/how-to/connect-to-instance/) to use it as you wish. When you are done using the Instance, you can delete it from your account. (switchcolumn) <Message type=\"tip\"> To retrieve information about the different [images](#path-images) available to install on Scaleway Instances, check out our [Marketplace API](https://www.scaleway.com/en/developers/api/marketplace). </Message> (switchcolumn) ## Concepts Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/compute/instances/concepts/) to find definitions of all concepts and terminology related to Instances. (switchcolumn) (switchcolumn) ## Quickstart 1. Configure your environment variables <Message type=\"note\"> This is an optional step that seeks to simplify your usage of the Instances API. See [Availability Zones](#availability-zones) below for help choosing an Availability Zone. You can find your Project ID in the [Scaleway console](https://console.scaleway.com/project/settings). </Message> ```bash export SCW_SECRET_KEY=\"<API secret key>\" export SCW_DEFAULT_ZONE=\"<Scaleway Availability Zone>\" export SCW_PROJECT_ID=\"<Scaleway Project ID>\" ``` 2. **Create an Instance**: Run the following command to create an Instance. You can customize the details in the payload (name, description, type, tags etc) to your needs: use the information below to adjust the payload as necessary. ```bash curl -X POST \\ -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\ -H \"Content-Type: application/json\" \\ \"https://api.scaleway.com/instance/v1/zones/$SCW_DEFAULT_ZONE/servers\" \\ -d '{ \"name\": \"my-new-instance\", \"project\": \"'\"$SCW_PROJECT_ID\"'\", \"commercial_type\": \"GP1-S\", \"image\": \"ubuntu_noble\", \"enable_ipv6\": true, \"volumes\": { \"0\":{ \"size\": 300000000000, \"volume_type\": \"l_ssd\" } } }' ``` | Parameter | Description | Valid values | | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | A name of your choice for the Instance (string)
|
||
|
|
*
|
||
|
|
* The version of the OpenAPI document: v1
|
||
|
|
* Generated by: https://openapi-generator.tech
|
||
|
|
* Generator version: 7.11.0
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||
|
|
* https://openapi-generator.tech
|
||
|
|
* Please update the test case below to test the endpoint.
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace OpenAPI\Client\Test\Api;
|
||
|
|
|
||
|
|
use \OpenAPI\Client\Configuration;
|
||
|
|
use \OpenAPI\Client\ApiException;
|
||
|
|
use \OpenAPI\Client\ObjectSerializer;
|
||
|
|
use PHPUnit\Framework\TestCase;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* SecurityGroupsApiTest Class Doc Comment
|
||
|
|
*
|
||
|
|
* @category Class
|
||
|
|
* @package OpenAPI\Client
|
||
|
|
* @author OpenAPI Generator team
|
||
|
|
* @link https://openapi-generator.tech
|
||
|
|
*/
|
||
|
|
class SecurityGroupsApiTest extends TestCase
|
||
|
|
{
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Setup before running any test cases
|
||
|
|
*/
|
||
|
|
public static function setUpBeforeClass(): void
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Setup before running each test case
|
||
|
|
*/
|
||
|
|
public function setUp(): void
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Clean up after running each test case
|
||
|
|
*/
|
||
|
|
public function tearDown(): void
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Clean up after running all test cases
|
||
|
|
*/
|
||
|
|
public static function tearDownAfterClass(): void
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for createSecurityGroup
|
||
|
|
*
|
||
|
|
* Create a security group.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testCreateSecurityGroup()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for createSecurityGroupRule
|
||
|
|
*
|
||
|
|
* Create rule.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testCreateSecurityGroupRule()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for deleteSecurityGroup
|
||
|
|
*
|
||
|
|
* Delete a security group.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testDeleteSecurityGroup()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for deleteSecurityGroupRule
|
||
|
|
*
|
||
|
|
* Delete rule.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testDeleteSecurityGroupRule()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for getSecurityGroup
|
||
|
|
*
|
||
|
|
* Get a security group.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testGetSecurityGroup()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for getSecurityGroupRule
|
||
|
|
*
|
||
|
|
* Get rule.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testGetSecurityGroupRule()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for listDefaultSecurityGroupRules
|
||
|
|
*
|
||
|
|
* Get default rules.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testListDefaultSecurityGroupRules()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for listSecurityGroupRules
|
||
|
|
*
|
||
|
|
* List rules.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testListSecurityGroupRules()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for listSecurityGroups
|
||
|
|
*
|
||
|
|
* List security groups.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testListSecurityGroups()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for setSecurityGroup
|
||
|
|
*
|
||
|
|
* Update a security group.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testSetSecurityGroup()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for setSecurityGroupRule
|
||
|
|
*
|
||
|
|
* Set security group rule.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testSetSecurityGroupRule()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for setSecurityGroupRules
|
||
|
|
*
|
||
|
|
* Update all the rules of a security group.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testSetSecurityGroupRules()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for updateSecurityGroup
|
||
|
|
*
|
||
|
|
* Update a security group.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testUpdateSecurityGroup()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test case for updateSecurityGroupRule
|
||
|
|
*
|
||
|
|
* Update security group rule.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function testUpdateSecurityGroupRule()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
}
|