addBareMetalComputeService
Create and start a bare-metal compute service.
/simulation/{simid}/addBareMetalComputeService
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://wrench-project.org/v1/simulation/{simid}/addBareMetalComputeService"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WRENCHApi;
import java.io.File;
import java.util.*;
public class WRENCHApiExample {
public static void main(String[] args) {
WRENCHApi apiInstance = new WRENCHApi();
Simid_addBareMetalComputeService_body body = ; // Simid_addBareMetalComputeService_body | Input to start a new service.
String simid = simid_example; // String | ID of the simulation
try {
ServiceResponse result = apiInstance.addBareMetalComputeService(body, simid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WRENCHApi#addBareMetalComputeService");
e.printStackTrace();
}
}
}
import io.swagger.client.api.WRENCHApi;
public class WRENCHApiExample {
public static void main(String[] args) {
WRENCHApi apiInstance = new WRENCHApi();
Simid_addBareMetalComputeService_body body = ; // Simid_addBareMetalComputeService_body | Input to start a new service.
String simid = simid_example; // String | ID of the simulation
try {
ServiceResponse result = apiInstance.addBareMetalComputeService(body, simid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WRENCHApi#addBareMetalComputeService");
e.printStackTrace();
}
}
}
Simid_addBareMetalComputeService_body *body = ; // Input to start a new service.
String *simid = simid_example; // ID of the simulation
WRENCHApi *apiInstance = [[WRENCHApi alloc] init];
// Create and start a bare-metal compute service.
[apiInstance addBareMetalComputeServiceWith:body
simid:simid
completionHandler: ^(ServiceResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var WrenchRestApi = require('wrench_rest_api');
var api = new WrenchRestApi.WRENCHApi()
var body = ; // {{Simid_addBareMetalComputeService_body}} Input to start a new service.
var simid = simid_example; // {{String}} ID of the simulation
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addBareMetalComputeService(bodysimid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class addBareMetalComputeServiceExample
{
public void main()
{
var apiInstance = new WRENCHApi();
var body = new Simid_addBareMetalComputeService_body(); // Simid_addBareMetalComputeService_body | Input to start a new service.
var simid = simid_example; // String | ID of the simulation
try
{
// Create and start a bare-metal compute service.
ServiceResponse result = apiInstance.addBareMetalComputeService(body, simid);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WRENCHApi.addBareMetalComputeService: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiWRENCHApi();
$body = ; // Simid_addBareMetalComputeService_body | Input to start a new service.
$simid = simid_example; // String | ID of the simulation
try {
$result = $api_instance->addBareMetalComputeService($body, $simid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WRENCHApi->addBareMetalComputeService: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WRENCHApi;
my $api_instance = WWW::SwaggerClient::WRENCHApi->new();
my $body = WWW::SwaggerClient::Object::Simid_addBareMetalComputeService_body->new(); # Simid_addBareMetalComputeService_body | Input to start a new service.
my $simid = simid_example; # String | ID of the simulation
eval {
my $result = $api_instance->addBareMetalComputeService(body => $body, simid => $simid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling WRENCHApi->addBareMetalComputeService: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.WRENCHApi()
body = # Simid_addBareMetalComputeService_body | Input to start a new service.
simid = simid_example # String | ID of the simulation
try:
# Create and start a bare-metal compute service.
api_response = api_instance.add_bare_metal_compute_service(body, simid)
pprint(api_response)
except ApiException as e:
print("Exception when calling WRENCHApi->addBareMetalComputeService: %s\n" % e)
Parameters
Name | Description |
---|---|
simid* |
String
ID of the simulation
Required
|
Name | Description |
---|---|
body * |