99 lines
16 KiB
PHP
99 lines
16 KiB
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* SetVolumeRequestServerTest
|
||
|
|
*
|
||
|
|
* 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 model.
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace OpenAPI\Client\Test\Model;
|
||
|
|
|
||
|
|
use PHPUnit\Framework\TestCase;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* SetVolumeRequestServerTest Class Doc Comment
|
||
|
|
*
|
||
|
|
* @category Class
|
||
|
|
* @description Instance attached to the volume.
|
||
|
|
* @package OpenAPI\Client
|
||
|
|
* @author OpenAPI Generator team
|
||
|
|
* @link https://openapi-generator.tech
|
||
|
|
*/
|
||
|
|
class SetVolumeRequestServerTest extends TestCase
|
||
|
|
{
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Setup before running any test case
|
||
|
|
*/
|
||
|
|
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 "SetVolumeRequestServer"
|
||
|
|
*/
|
||
|
|
public function testSetVolumeRequestServer()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test attribute "id"
|
||
|
|
*/
|
||
|
|
public function testPropertyId()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Test attribute "name"
|
||
|
|
*/
|
||
|
|
public function testPropertyName()
|
||
|
|
{
|
||
|
|
// TODO: implement
|
||
|
|
self::markTestIncomplete('Not implemented');
|
||
|
|
}
|
||
|
|
}
|