46
FUJITSU Cloud Service K5 SF Reference Guide Version 1.0 FUJITSU LIMITED Aug 19, 2016

FUJITSU Cloud Service K5 SF Reference Guide · This is a YAML format file that describes the name, version, ... FUJITSU Cloud Service K5 SF Reference Guide description. FUJITSU Cloud

Embed Size (px)

Citation preview

FUJITSU Cloud Service K5 SFReference Guide

Version 1.0

FUJITSU LIMITEDAug 19, 2016

FUJITSU Cloud Service K5 SFReference Guide

Contents

1 Preface 41.1 Purpose of This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Intended Readers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Structure of the Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Abbreviations in this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.6 Export Administration Regulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.7 Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 WL-PKG 62.1 WL-PKG Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.1 WL-PKG Source Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.2 Built WL-PKG Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 WL-PKG Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.1 Supported Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.2 Basic Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

File Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Usable Character Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Basic Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2.3 WL-PKG Definition Parameter Specifications . . . . . . . . . . . . . . . . . . . . . 8workload_package_definition_version . . . . . . . . . . . . . . . . . . . . . . . . . . 8workload_package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8software_stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10system_configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2.4 The Parameter Provided for HOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.5 WL-PKG Definition Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 API Reference 143.1 API Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.2 API Call Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3 API List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.4 API Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.4.1 Get definition list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.4.2 Get definition desc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.4.3 Put template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.4.4 Get template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.4.5 Get template list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.4.6 Prepare&pkgbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.4.7 Put wlpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.4.8 Get wlpkg list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.4.9 Delete wlpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.4.10 Backup bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.4.11 Restore bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.4.12 Create wlinstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.13 List wlinstances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.4.14 Show wlinstance details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.4.15 Delete wlinstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.5 Request Parameter Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.5.1 Get definition list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

.git_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

.git_pass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

.git_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

1 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

.git_branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.5.2 Get definition desc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

.git_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

.git_pass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

.git_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

.git_branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31pkgbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.5.3 Put template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.aname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.uf_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.uf_pass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.5.4 Get template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.aname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.aid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.uf_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.uf_pass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.5.5 Get template list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.5.6 Prepare&pkgbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

.git_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

.git_branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

.pkgbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.5.7 Put wlpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

pkgbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34.pkgver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.5.8 Get wlpkg list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.5.9 Delete wlpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

pkgbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34.pkgver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.5.10 Backup bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.5.11 Restore bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

.file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.5.12 Create wlinstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

.name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

.wlpackage.name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

.wlpackage.version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

.wlpackage.release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

.credentials.username . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

.credentials.password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

.credentials.project_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

.credentials.domain_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

.parameters.<Parameter name> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Value specified in .parameters.<Parameter name> . . . . . . . . . . . . . . . . . . . . 38

3.5.13 List wlinstances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383.5.14 Show wlinstance details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

wlinstance_id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383.5.15 Delete wlinstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

wlinstance_id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39.credentials.username . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39.credentials.password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39.credentials.project_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39.credentials.domain_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4 Error Reference 404.1 Common Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.2 Error Information Output Using outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.2.1 Empty request parameter is not allowed. . . . . . . . . . . . . . . . . . . . . . . . . 404.2.2 Too few request parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.2.3 Git authentication failed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.4 Invalid Git Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.5 Git project not found. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.6 Connection to GitLab failed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.7 Git submodule required. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.8 Prepare WL-PKG materials failed. . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.9 Authentication in software stack definition service failed. . . . . . . . . . . . . . . . 414.2.10 Connection to software stack definition service failed. . . . . . . . . . . . . . . . . . 41

2 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

4.2.11 WL-PKG name in wlpkg_def.yaml differs from GitLab project. . . . . . . . . . . . 424.2.12 The wlpkg_def.yaml not found. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.2.13 Software stack definition in wlpkg_def.yaml not found. . . . . . . . . . . . . . . . . 424.2.14 System configuration definition in wlpkg_def.yaml not found. . . . . . . . . . . . . 424.2.15 WL-PKG not found. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.3 Error Information Output Using error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.3.1 WLMInvalidRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.2 WLMResourceNotFound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.3 WLMInvalidWLPackageDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.4 WLMStackCreationRequestFailed . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.5 WLMStackDeletionRequestFailed . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.6 WLMParseError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.7 WLMUnauthorized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.8 WLMMethodNotAllowed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.3.9 WLMNotAcceptable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.10 WLMOperationConflict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.11 WLMUnsupportedMediaType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.12 WLMStackStatusFailed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.13 WLMStackStatusCheckTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.14 WLMHttpError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5 Revision History 45

3 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Chapter 1

Preface

1.1 Purpose of This Document

This document contains information on the specifications of the WL-PKGs, REST API, and error informationdefined in FUJITSU Cloud Service K5 SF (hereinafter “SF”) for users.

1.2 Intended Readers

It is assumed that readers have the following knowledge:

• Basic knowledge regarding the FUJITSU Cloud Service K5 IaaS (hereinafter “K5 IaaS”)

• Basic knowledge regarding Linux

• Basic knowledge regarding web browsers

• Basic knowledge regarding HTTP/1.1

• Basic knowledge regarding RESTful web services

• Basic knowledge regarding JSON (JavaScript Object Notation)

1.3 Structure of the Guides

Please read the following related guides based on your purpose and usage.

Table 1.1: Structure of the GuidesGuide Name ContentStartup Guide Contains information that is useful to know when starting to use SF.User Guide [WL-PKGDevelopers]

Contains information and tutorials regarding development of WL-PKGs.

User Guide [WL-PKGUsers]

Explains how to use WL-PKGs to automatically configure systems, and how tomanage and control such systems.

Reference Guide Contains information on the specifications of the WL-PKGs, REST API, anderror information as defined in SF.

Restrictions / AdvisoryNotes

Explains restrictions and advisory notes regarding the use of SF.

4 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

1.4 Abbreviations in this Document

Table 1.2: AbbreviationsProper Name AbbreviationFUJITSU Cloud Service K5 SF SFFUJITSU Cloud Service K5 IaaS K5 IaaS

1.5 Trademarks

• Linux®is a registered trademark of Linus Torvalds in the United States and other countries.

• CentOS is a registered trademark of Red Hat, Inc.

• Windows is a registered trademark of Microsoft Corporation in the United States and other countries

• Mozilla Firefox is a registered trademark or trademark of the Mozilla Foundation in the United Statesand other countries.

• Google Chrome is a registered trademark or trademark of Google Inc.

• Other names are registered trademarks or trademarks of their respective owners.

• Proper nouns such as corporate names and product names are trade names, registered trademarks, ortrademarks of their respective owners.

• Company names, system names, and product names may not be followed by trademark symbols (™or®) in this document.

1.6 Export Administration Regulations

Exportation/release of this document may require necessary procedures in accordance with the regulations ofyour resident country and/or US export control laws, and permission from the Minister of Economy, Trade andIndustry.

1.7 Notices

• The contents of this guide are subject to change without notice.

• The contents of this guide shall not be reproduced without express written permission from FUJITSULIMITED.

• The Fujitsu group is not liable for any infringement of third party patents or other rights resulting fromthe use of data contained in this document.

5 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Chapter 2

WL-PKG

A WL-PKG is a single package (in the RPM format) of the specifications of VMs constituting the system andthe software stack structures of the various VMs.

2.1 WL-PKG Components

A WL-PKG consists of the following three definition files.

1. WL-PKG DefinitionThis is a YAML format file that describes the name, version, and components of a WL-PKG.

2. Software Stack DefinitionThis is a definition file that contains a combination of the appliance template for virtual appliance gener-ation and the configuration information of software.

3. System Configuration DefinitionThis is a FUJITSU Cloud Service K5 Heat template (HOT) format file (FUJITSU Cloud Service K5 IaaSHeat Template Guide) that describes the system structure based on network resources, VMs, etc.

For details on these definitions, please refer to the relevant specifications.

2.1.1 WL-PKG Source Directory Structure

The WL-PKG source directory structure is as follows.

<GIT Root Directory>|---- system_configuration/| └-- <System Configuration Definition>└-- wlpkg_def.yaml # WL-PKG Definition

2.1.2 Built WL-PKG Directory Structure

The directory structure after a WL-PKG is built is as follows.

workload_package|---- software_stack/| └-- <Software Stack Definition>.tar.gz|---- system_configuration/| └-- <System Configuration Definition>└-- wlpkg_def.yaml # WL-PKG Definition

6 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

2.2 WL-PKG Definition

Based on the service specifications of the system, this file describes the system name and various definitions(software stack definitions and system structure definitions) in the YAML format.

2.2.1 Supported Version

This specification document supports WL-PKGs whose workload_package_definition_versionvalue in the WL-PKG Definition is 2016-02-05 .

2.2.2 Basic Information

File Name

wlpkg_def.yaml

The file name is fixed and cannot be changed.

Usable Character Code

ASCII

Basic Syntax

The description format is in compliance with the YAML format.

workload_package_definition_version: ${definition_version}

workload_package:name: ${name}version: ${version}release: ${release}description: ${description}

software_stack:${software_stack_name}:

description: ${description}

system_configuration:${system_configuration_name}:

target: fujitsu_k5source: ${system_configuration_filename}description: ${description}

• workload_package_definition_version

Describe the WL-PKG definition version.

• workload_package

Describe WL-PKG related information.

• software_stack

Describe software stack definition related information.

• system_configuration

Describe system configuration definition related information.

7 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

2.2.3 WL-PKG Definition Parameter Specifications

Details on the method for describing various definitions are as follows.“Symbols included in pattern” as usable characters do not include metacharacters for searching in regularexpressions.For example, if the pattern is ^[abc][123][,.]$ , usable symbols are , and . .The default values for WL-PKG definition parameters are used if values are not specified in wlpkg_def.yaml.For parameters without default values, values must be specified.

workload_package_definition_version

workload_package_definition_version: ${definition_version}

• ${definition_version} : WL-PKG definition format version

Specify 2016-02-05 .Describe the WL-PKG definition format version.This must be described in the first row.This item identifies the WL-PKG definition format version and specification is required.

• Path: /workload_package_definition_version

• Explanation: WL-PKG definition format version

• Specification required: TRUE

• Default value: None

• Example: workload_package_definition_version: 2016-02-05

workload_package

workload_package:

This section describes the WL-PKG definition information section.One must be described.

name

name: ${name}

• ${name} : WL-PKG name

Describe the WL-PKG name.One must be described.This should be a unique name, different from the names of other WL-PKGs.

• Path: /workload_package/name

• Explanation: WL-PKG name

• Specification required: TRUE

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_]*$

• Default value: None

• Example: name: imsystem

8 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

version

version: ${version}

• ${version} : WL-PKG version

Describe the WL-PKG version.One must be described.The order relationship between versions must be explicit in this description.The description format of ${version} is as follows.

${version} : ${principal-release}OR ${version} ${post-subrelease}

${principal-release} : ${relnum}${post-subrelease} : . ${relnum}${relnum} : [0-9]+

Example:The assessment results are as follows.“1” < “1.0” < “1.1” < “1.1.1” < “1.1.2” < “1.2” < “1.11”

• Path: /workload_package/version

• Explanation: WL-PKG version

• Specification required: TRUE

• Number of characters: 1 - 32

• Usable characters: Numbers and symbols included in pattern

• Pattern: ^[0-9]+(\.[0-9]+)*$

• Default value: None

• Example: version: 0.7

release

release: ${release}

• ${release} : Release number for the version of a WL-PKG

Describe the release number for the version of a WL-PKG.One must be described.

• Path: /workload_package/release

• Explanation: Release number for the version of a WL-PKG

• Specification required: TRUE

• Number of characters: 1 - 32

• Usable characters: Numbers

• Pattern: ^[1-9][0-9]*$

• Default value: None

• Example: release: 2

description

description: ${description}

• ${description} : The description of the WL-PKG

Provide a description of the WL-PKG.Description is optional, and only one can be described.

9 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Path: /workload_package/description

• Explanation: The description of the WL-PKG

• Specification required: FALSE

• Number of characters: 1 - 2048

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z`~!@#$%^&*()_\-+={}[\]|:;"'<>,.?/ \n]+$

• Default value: WL-PKG name

• Example: description: This package provides Item Management System(imsystem)

software_stack

software_stack:

This section describes the software stack definition section.One must be described.

software_stack_name${software_stack_name}:

• ${software_stack_name} : Software stack definition name

Describe the appliance template name for the software stack definition name.Describe one or more within the software stack definition section.

• Path: /software_stack/<software_stack_name>

• Explanation: Software stack definition name

• Specification required: TRUE

• Number of characters: 1 - 32

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_]*$

• Default value: None

• Uniqueness restriction: Must be unique within the <software_stack> section of the WL-PKGdefinition

• Example: webap

descriptiondescription: ${description}

• ${description} : The description of the software stack definition

Provide a description of the software stack definition.

• Path: /software_stack/<software_stack_name>/description

• Explanation: A description of a software stack definition

• Specification required: FALSE

• Number of characters: 1 - 2048

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z`~!@#$%^&*()_\-+={}[\]|:;"'<>,.?/ \n]+$

10 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Default value: None

• Example: description: WEB and AP server

system_configuration

system_configuration:

This section describes the system configuration definition section.One must be described.

system_configuration_name${system_configuration_name}:

• ${system_configuration_name} : System configuration definition name

Describe the system configuration definition name.Describe one within the system configuration definition section.

• Path: /system_configuration/<system_configuration_name>

• Explanation: System configuration definition name

• Specification required: TRUE

• Number of characters: 1 - 32

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_]*$

• Default value: None

• Example: my_system:

targettarget: ${iaas_type}

• ${iaas_type} : Stack creation destination IaaS type

Specify fujitsu_k5 .

• Path: /system_configuration/<system_configuration_name>/target

• Explanation: Stack creation destination IaaS type

• Specification required: TRUE

• Default value: None

• Example: target: fujitsu_k5

sourcesource: ${system_configuration_filename}

• ${system_configuration_filename} : File name of the system configuration definition fileconfiguring the stack

Describe the system configuration definition file name.The file name described here should be selected from those stored in the WL-PKGsystem_configuration directory.For system configuration definitions, please pay specific attention to the description of TheParameter Provided for HOT .

• Path: /system_configuration/<system_configuration_name>/source

• Explanation: HOT file name

11 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Specification required: TRUE

• Number of characters: 1 - 32

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_\-.]*$

• Default value: None

• Example: source: server_with_cinder_volume.yaml

descriptiondescription: ${description}

• ${description} : The description of the system configuration definition

Provide a description of the system configuration definition.

• Path: /system_configuration/<system_configuration_name>/description

• Explanation: The description of the system configuration definition

• Specification required: FALSE

• Number of characters: 1 - 2048

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z`~!@#$%^&*()_\-+={}[\]|:;"'<>,.?/ \n]+$

• Default value: None

• Example: description: My System

2.2.4 The Parameter Provided for HOT

During stack creation, when the HOT specified for “source” in the system_configuration section is used tocreate stacks, the following information is provided as a parameter.

Parameter Name Value<software_stack_name>in the software_stack section

The resource ID used when registering the image created from theappliance template specified in <software_stack_name> with K5IaaS

Therefore, the HOT must have a configuration in which each <software_stack_name> is received as aparameter and it is used as an image ID.

Example Excerpt of Description of a System Configuration Definition

parameters:

web_server_appliance:type: string

resources:

web_server_volume:type: OS::Cinder::Volumeproperties:

image: { get_param: web_server_appliance }

web_server:type: OS::Nova::Serverproperties:

block_device_mapping:- volume_id: { get_resource: web_server_volume }

12 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

2.2.5 WL-PKG Definition Example

wlpkg_def.yaml

workload_package_definition_version: 2016-02-05

workload_package:name: imsystemversion: 1.0release: 1description: This package provides Item Management System (imsystem)

software_stack:webap:

description: WEB and AP serverdb:

description: DB server

system_configuration:my_system:

target: fujitsu_k5source: server_with_cinder_volume.yamldescription: My System

13 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Chapter 3

API Reference

3.1 API Calls

• The URI scheme of HTTP requests is https .

• The body of an HTTP request conforms to the JSON format, and specify Content-Type:application/json in the header. For the Restore bundle described later, specifyContent-Type: multipart/form-data in the header.

• The body of an HTTP response conforms to the JSON format, and specify Accept:application/json in the request header.

• In an HTTP request, specify the user name and password for Basic authentication.

• An example of issuing an HTTP request is as follows.

$ curl -X POST \-H 'Content-Type: application/json' \-H 'Accept: application/json' \-u user:pass \-d '{"key": "value"}' \'https://sf_service/path'

• If using curl as an http client, use curl 7.35.0 or later.

3.2 API Call Parameters

1. The “style” of HTTP request and response parameters refers to the following meanings.

URI: Parameter included in the URI of the API endpointplain: Parameter included in the request body or the response bodyquery: Query parameter

2. A parameter with the hyphen ( - ) prefixed to the “element name” means a nested parameter of theprevious element with no hyphen attached.

14 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

3.3 API List

Section API Name Explanation1 Get definition list Acquires a list of WL-PKG definitions.2 Get definition desc Acquires details of the specified WL-PKG definition.3 Put template Enables modification of software stack definitions in SF.4 Get template Saves software stack definitions created or modified in SF.5 Get template list Acquires a list of software stack definitions.6 Prepare&pkgbuild Aggregates materials required for WL-PKG creation and builds a

WL-PKG.7 Put wlpkg Registers a built WL-PKG.8 Get wlpkg list Acquires a list of WL-PKGs.9 Delete wlpkg Deletes the specified WL-PKG.10 Backup bundle Backs up (downloads) software stack bundled contents.11 Restore bundle Restores (uploads) software stack bundled contents.12 Create wlinstance Creates a stack in a K5 IaaS project.13 List wlinstances Acquires a list of stacks managed by SF.14 Show wlinstance

detailsAcquires detailed information of stacks managed by SF.

15 Delete wlinstance Deletes a stack managed by SF.

3.4 API Details

3.4.1 Get definition list

API name: Get definition listResource: WL-PKG DefinitionOperation: List acquisitionExplanation: Acquires a list of WL-PKG definitions.Request:

• HTTP method: GET

• Path: /build/v1/definitions

• Parameters:Element Name Explanation Style Data

Typegit_user SF user name plain Stringgit_pass SF password plain Stringgit_group Group name in the Source Code Management

Serviceplain String

git_branch(Optional)

Branch name in the Source Code ManagementService

plain String

• Body example:

{"git_user": "USERNAME","git_pass": "PASSWORD","git_group": "service-plan","git_branch": "master"

}

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:

15 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Element Name Explanation Style Data Typedefinitions Array to store defini-

tion attributesplain Array

• name WL-PKG definitionname

plain String

outputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"definitions": [

{"name": "imsystem"

}],"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.2 Get definition desc

API name: Get definition descResource: WL-PKG DefinitionOperation: Details acquisitionExplanation: Acquires details of the specified WL-PKG definition.Request:

• HTTP method: GET

• Path: /build/v1/definitions/{pkgbase}

• Parameters:Element Name Explanation Style Data

Typegit_user SF user name plain Stringgit_pass SF password plain Stringgit_group Group name in the Source Code Management

Serviceplain String

git_branch(Optional)

Branch name in the Source Code ManagementService

plain String

pkgbase WL-PKG name URI String

• Body example:

{"git_user": "USERNAME","git_pass": "PASSWORD","git_group": "service-plan","git_branch": "master"

}

Response (Normal):

• Status code: 200

• Reason phrase: OK

16 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Parameters:Element Name Explanation Style Data Typedefinitions Array to store defini-

tion detailsplain Array

• wlpkg_nameWL-PKG name plain String

• wlpkg_versionWL-PKG version plain String

• descriptionWL-PKG description plain String

• software_stackArray to store the soft-ware stack definitionname

plain Array

outputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

If description is not specified in the WL-PKG definition, description shows the WL-PKG name.

• Body example:

{"definitions": [{

"wlpkg_name": "imsystem","wlpkg_version": "1.0","description": "This package provides Item Management System (imsystem)","software_stack": ["webap","db"

]}

],"outputs": [{

"return_code": 0,"message": "Complete."

}]

}

3.4.3 Put template

API name: Put templateResource: Software Stack DefinitionOperation: ImportExplanation: Enables modification of software stack definitions in SF.Request:

• HTTP method: PUT

• Path: /build/v1/templates

• Parameters:Element Name Explanation Style Data Typeaname Appliance template name plain Stringuf_user SF user name plain Stringuf_pass SF password plain String

17 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Body example:

{"aname": "webap","uf_user": "USERNAME","uf_pass": "PASSWORD"

}

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typetemplates Array to store software

stack definition infor-mation

plain Array

• aname Appliance templatename

plain String

• aidAppliance template ID plain String

outputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"template": [

{"aname": "webap","aid": "999"

}],"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.4 Get template

API name: Get templateResource: Software Stack DefinitionOperation: RegistrationExplanation: Saves software stack definitions created or modified in SF.Request:

• HTTP method: POST

• Path: /build/v1/templates

• Parameters:

18 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Element Name Explanation Style Data Typeaname Appliance template name plain Stringaid Appliance template ID plain Stringuf_user SF user name plain Stringuf_pass SF password plain String

• Body example:

{"aname": "webap","aid": "999","uf_user": "USERNAME","uf_pass": "PASSWORD"

}

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typeoutputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.5 Get template list

API name: Get template listResource: Software Stack DefinitionOperation: List acquisitionExplanation: Acquires a list of software stack definitions.Request:

• HTTP method: GET

• Path: /build/v1/templates

• Parameters: None

• Body example: None

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:

19 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Element Name Explanation Style Data Typetemplates Array to store the soft-

ware stack definitionname

plain Array

• name Software stack defini-tion name

plain String

outputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"templates": [

{"name": "db"

},{"name": "webap"

}],"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.6 Prepare&pkgbuild

API name: Prepare&pkgbuildResource: WL-PKGOperation: Creation (build)Explanation: Aggregates materials required for WL-PKG creation and builds a WL-PKG.Request:

• HTTP method: POST

• Path: /build/v1/wlpkgs

• Parameters:Element Name Explanation Style Data

Typegit_group Group name in the Source Code Management

Serviceplain String

git_branch(Optional)

Branch name in the Source Code ManagementService

plain String

pkgbase WL-PKG name plain String

• Body example:

{"git_group": "service-plan","git_branch": "master","pkgbase": "imsystem"

}

Response (Normal):

• Status code: 201

20 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Reason phrase: Created

• Parameters:Element Name Explanation Style Data TypeRPM WL-PKG (RPM) file

nameplain String

outputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"RPM": "imsystem-0.8-5.el6.noarch.rpm","outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.7 Put wlpkg

API name: Put wlpkgResource: WL-PKGOperation: TransferExplanation: Registers a built WL-PKG.Request:

• HTTP method: POST

• Path: /build/v1/wlpkgs/{pkgbase}

• Parameters:Element Name Explanation Style Data Typepkgbase WL-PKG name URI Stringpkgver WL-PKG version plain String

• Body example:

{"pkgver": "0.6-4"

}

Response (Normal):

• Status code: 201

• Reason phrase: Created

• Parameters:Element Name Explanation Style Data Typeoutputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

21 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

{"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.8 Get wlpkg list

API name: Get wlpkg listResource: WL-PKGOperation: List acquisitionExplanation: Acquires a list of WL-PKGs.Request:

• HTTP method: GET

• Path: /build/v1/wlpkgs

• Parameters: None

• Body example: None

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typewlpkgs Array to store the WL-

PKG file nameplain Array

• name WL-PKG file name plain String

outputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"wlpkgs": [

{"name": "imsystem-0.6-4.el6.noarch.rpm"

},{"name": "imsystem-0.7-9.el6.noarch.rpm"

},{"name": "imsystem-0.8-5.el6.noarch.rpm"

}],"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

22 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

3.4.9 Delete wlpkg

API name: Delete wlpkgResource: WL-PKGOperation: DeletionExplanation: Deletes the specified WL-PKG.Request:

• HTTP method: DELETE

• Path: /build/v1/wlpkgs/{pkgbase}

• Parameters:Element Name Explanation Style Data Typepkgbase WL-PKG name URI Stringpkgver WL-PKG version plain String

• Body example:

{"pkgver": "0.8-5"

}

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typeoutputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

{"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.10 Backup bundle

API name: Backup bundleResource: BundlesOperation: BackupExplanation: Backs up (downloads) software stack bundled contents.Request:

• HTTP method: GET

• Path: /build/v1/bundles

• Parameters: None

• Body example: None

23 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

This API is based on the assumption that it is executed with curl. With curl specify the -J -O options.

Response (Normal):

• Header: Content-Type: application/octet-stream

• Status code: 200

• Reason phrase: OK

• Parameters:ElementName

Explanation Style DataType

file Software stack bundled contents (file name is fixed asbundles.tar.gz )

plain File

• Body example:

curl: Saved to filename ‘ bundles.tar.gz ’

Software stack bundled contents are downloaded.

3.4.11 Restore bundle

API name: Restore bundleResource: BundlesOperation: RestorationExplanation: Restores (uploads) software stack bundled contents.Request:

• HTTP method: PUT

• Path: /build/v1/bundles

• Header: Content-Type: multipart/form-data

• Parameters:ElementName

Explanation Style DataType

file Software stack bundled contents (file name is fixed asbundles.tar.gz )

plain File

• Body example:

[email protected]

This API is based on the assumption that it is executed with curl. Specify Content-Type:multipart/form-data in the header, and specify the value shown in the body example above with the-F option.

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typeoutputs Array to store output plain Array

• return_codeReturn value (API exitstatus. 0 if successful,1 if failed)

plain Integer

• message Completion message plain String

• Body example:

24 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

{"outputs": [

{"return_code": 0,"message": "Complete."

}]

}

3.4.12 Create wlinstance

API name: Create wlinstanceResource: StackOperation: CreationExplanation: Creates a stack in a K5 IaaS project.Request:

• HTTP method: POST

• Path: /wl/v1/wlinstances

• Parameters:Element Name Explanation Style Data Typename Stack name plain Stringwlpackage WL-PKG information plain JSON

• name WL-PKG name plain String

• versionWL-PKG version plain String

• release (Op-tional)

WL-PKG release num-ber

plain String

credentials Authentication infor-mation for the stackcreation destination K5IaaS project

plain JSON

• username User name for the stackcreation destination K5IaaS project

plain String

• passwordUser password for thestack creation destina-tion K5 IaaS project

plain String

• project_nameProject name for thestack creation destina-tion K5 IaaS project

plain String

• domain_nameStack creation destina-tion K5 IaaS projectdomain name

plain String

parameters (Optional) System configurationdefinition (HOT) pa-rameter (Parametername and value pair)(*)

plain JSON

* Note: Specify the parameter and value pair defined in the parameters section ofHOT with a JSON value (key and value string). However, the parameter correspondingto the software stack definition name is excluded.

• Body example:

25 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

{"name": "wlinstance_01","wlpackage": {

"name": "wlpackage_01","version": "0.1","release": "1"

},"credentials": {

"username": "my_name","password": "my_password","project_name": "my_project","domain_name": "my_domain"

},"parameters": {

"public_net": "13f92772-299f-4d29-9857-448a123d45c0","availability_zone": "jp-east-1a"

}}

Response (Normal):

• Status code: 201

• Reason phrase: Created

• Parameters:Element Name Explanation Style Data Typewlinstance Information of the cre-

ated stackplain JSON

• idStack ID (unique iden-tifier assigned by SF)

plain String

• name Stack name (specifiedin the request body)

plain String

• status Specific informationthat represents the sta-tus of a stack createdor deleted by SF

plain String

• status_detailStatus message plain String

• Body example:

{"wlinstance": {

"id": "1","name": "wlinstance_01","status": "ACTIVE","status_detail": "WLInstance successfully created."

}}

3.4.13 List wlinstances

API name: List wlinstancesResource: StackOperation: List acquisitionExplanation: Acquires a list of stacks managed by SF.Request:

• HTTP method: GET

• Path: /wl/v1/wlinstances

• Parameters: None

26 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Body example: None

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typewlinstances Stack list plain Array

• idStack ID (unique iden-tifier assigned by SF)

plain String

• name Stack name plain String

• status Specific informationthat represents the sta-tus of a stack createdor deleted by SF

plain String

• status_detailStatus message plain String

• Body example:

{"wlinstances": [

{"id": "1","name": "wlinstance_01","status": "ACTIVE","status_detail": "WLInstance successfully created."

},{

"id": "2","name": "wlinstance_02","status": "ERROR","status_detail": "Unexpected exception occurred."

},{

"id": "3","name": "wlinstance_03","status": "CREATING","status_detail": "WLInstance creating."

}]

}

3.4.14 Show wlinstance details

API name: Show wlinstance detailsResource: StackOperation: Detailed information acquisitionExplanation: Acquires detailed information of a stack managed by SF.Request:

• HTTP method: GET

• Path: /wl/v1/wlinstances/{wlinstance_id}

• Parameters:Element Name Explanation Style Data

Typewlinstance_id ID of the stack whose detailed information is

acquiredURI String

27 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Body example: None

Response (Normal):

• Status code: 200

• Reason phrase: OK

• Parameters:Element Name Explanation Style Data Typewlinstance Detailed stack infor-

mationplain JSON

• idStack ID (unique iden-tifier assigned by SF)

plain String

• name Stack name plain String

• status Specific informationthat represents the sta-tus of a stack createdor deleted by SF

plain String

• status_detailStatus message plain String

• Body example:

{"wlinstance": {

"id": "1","name": "wlinstance_01","status": "ACTIVE","status_detail": "WLInstance successfully created."

}}

3.4.15 Delete wlinstance

API name: Delete wlinstanceResource: StackOperation: DeletionExplanation: Deletes a stack managed by SF.Request:

• HTTP method: DELETE

• Path: /wl/v1/wlinstances/{wlinstance_id}

• Parameters:

28 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Element Name Explanation Style Data Typewlinstance_id ID of the stack to be

deletedURI String

credentials Authentication infor-mation for the K5 IaaSproject containing thedeletion target stack

plain JSON

• username User name for the K5IaaS project contain-ing the deletion targetstack

plain String

• passwordUser password for theK5 IaaS project con-taining the deletion tar-get stack

plain String

• project_nameName of the K5 IaaSproject containing thedeletion target stack

plain String

• domain_nameDomain name of theK5 IaaS project con-taining the deletion tar-get stack

plain String

• Body example:

{"credentials": {

"username": "my_name","password": "my_password","project_name": "my_project","domain_name": "my_domain"

}}

Response (Normal):

• Status code: 204

• Reason phrase: No Content

• Parameters: None

• Body example: None

3.5 Request Parameter Specifications

Parameters specified in the request body (JSON)

{"foo": {

"bar": "value_1","baz": {

"qux": "value_x"}

}}

Describe the parameter names corresponding to the JSON keys above as follows.

• .foo• .foo.bar• .foo.baz.qux

Parameters specified in the URIDescribe the parameter names directly.

29 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

“Symbols included in pattern” as usable characters do not include metacharacters for searching in regularexpressions.For example, if the pattern is ^[abc][123][,.]$ , usable symbols are , and . .

3.5.1 Get definition list

.git_user

SF user name

• Data type: String

• Number of characters: 4 - 31

• Usable characters: Dependent on the characters that can be used for the SF user name

• Pattern: Dependent on the pattern that can be used for the SF user name

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: user01

.git_pass

SF password

• Data type: String

• Number of characters: 16 - 64

• Usable characters: Dependent on the characters that can be used for the SF password

• Pattern: Dependent on the pattern that can be used for the SF password

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: None

• Input example: user_pass0123456

.git_group

Group name in the Source Code Management Service

• Data type: String

• Number of characters: 1 - 255

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z_][0-9A-Za-z_\-]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: service-plan

30 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

.git_branch

Branch name in the Source Code Management Service

• Data type: String

• Number of characters: 1 - 39

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z_][0-9A-Za-z_\-.]*[0-9A-Za-z_\-]+$

• Specification required: FALSE

• Default value: master

• Uniqueness restriction: Must be unique within the project in the Source Code Management Service

• Input example: develop

3.5.2 Get definition desc

.git_user

SF user name

Refer to .git_user in Get definition list.

.git_pass

SF password

Refer to .git_pass in Get definition list.

.git_group

Group name in the Source Code Management Service

Refer to .git_group in Get definition list.

.git_branch

Branch name in the Source Code Management Service

Refer to .git_branch in Get definition list.

pkgbase

WL-PKG name (project name in the Source Code Management Service)

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: imsystem

31 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

3.5.3 Put template

.aname

Appliance template name (directory name stored in the templates project in the Source Code ManagementService)

• Data type: String

• Number of characters: 1 - 32

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Z_a-z][0-9A-Za-z_]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: webap

.uf_user

SF user name

• Data type: String

• Number of characters: 4 - 31

• Usable characters: Dependent on the characters that can be used for the SF user name

• Pattern: Dependent on the pattern that can be used for the SF user name

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: user01

.uf_pass

SF password

• Data type: String

• Number of characters: 16 - 64

• Usable characters: Dependent on the characters that can be used for the SF password

• Pattern: Dependent on the pattern that can be used for the SF password

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: None

• Input example: user_pass0123456

32 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

3.5.4 Get template

.aname

Appliance template name (directory name stored in the templates project in the Source Code ManagementService)

Refer to .aname in Put template.

.aid

Appliance template ID

• Data type: String

• Number of characters: 1 - 8

• Usable characters: Numbers

• Pattern: ^[1-9][0-9]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: 999

.uf_user

SF user name

Refer to .uf_user in Put template.

.uf_pass

SF password

Refer to .uf_pass in Put template.

3.5.5 Get template list

No request parameters

3.5.6 Prepare&pkgbuild

.git_group

Group name in the Source Code Management Service

Refer to .git_group in Get definition list.

.git_branch

Branch name in the Source Code Management Service

Refer to .git_branch in Get definition list.

33 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

.pkgbase

WL-PKG name (project name in the Source Code Management Service)

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: imsystem

3.5.7 Put wlpkg

pkgbase

WL-PKG name (project name in the Source Code Management Service)

Refer to pkgbase in Get definition desc.

.pkgver

WL-PKG version

Describe the version, including the release number.

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Numbers and symbols included in pattern

• Pattern: ^[0-9]+\.[0-9]+\-[1-9][0-9]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the same WL-PKG

• Input example: 1.0-1

3.5.8 Get wlpkg list

No request parameters

3.5.9 Delete wlpkg

pkgbase

WL-PKG name (project name in the Source Code Management Service)

Refer to pkgbase in Get definition desc.

34 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

.pkgver

WL-PKG version

Refer to .pkgver in Put wlpkg.

3.5.10 Backup bundle

No request parameters

During execution, specify the -J -O options with curl.

3.5.11 Restore bundle

.file

File name of Software Stack Bundled Contents

Specify just “bundles.tar.gz”.

Specify this in the format of multipart/form-data. During execution, specify the -F option with curl.

• Data type: file

• Number of characters: 14

• Usable characters: Alphabet (lowercase), symbols included in pattern

• Pattern: ^bundles\.tar\.gz$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: None

• Input example: bundles.tar.gz

3.5.12 Create wlinstance

.name

Stack name

• Data type: String

• Number of characters: 1 - 32

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_\-]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: wl_instance-01

35 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

.wlpackage.name

WL-PKG name

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[A-Za-z][0-9A-Za-z_]*$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique as a WL-PKG name and version pair, within the environmentallocated to SF.

• Input example: ITEM_MANAGEMENT_SYSTEM

.wlpackage.version

WL-PKG version

• Data type: String

• Number of characters: 1 - 32

• Usable characters: Numbers and symbols included in pattern

• Pattern: ^[0-9]+(\.[0-9]+)?$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique as a WL-PKG name and version pair, within the environmentallocated to SF.

• Input example: 0.7

.wlpackage.release

WL-PKG release number

• Data type: String

• Number of characters: 1 - 32

• Usable characters: Numbers

• Pattern: ^[1-9][0-9]*$

• Specification required: FALSE

• Default value: Latest release number

• Uniqueness restriction: Must be unique as a WL-PKG name and version pair, within the environmentallocated to SF.

• Input example: 10

.credentials.username

User name for the stack creation destination K5 IaaS project

• Data type: String

• Number of characters: 1 - 255

36 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z_\-.@]+$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the K5 IaaS user’s domain

• Input example: sfs_user

.credentials.password

User password for the stack creation destination K5 IaaS project

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]+$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: None

• Input example: ohn9ex\u9Oovei6o

.credentials.project_name

Name of the stack creation destination K5 IaaS project

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z_\-.+=,@]+$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within K5 IaaS users

• Input example: sfs_project

.credentials.domain_name

Domain name of the stack creation destination K5 IaaS project

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Alphabet (uppercase and lowercase), numbers, symbols included in pattern

• Pattern: ^[0-9A-Za-z_\-.+=,@]+$

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within K5 IaaS users

• Input example: sfs_domain

37 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

.parameters.<Parameter name>

System configuration definition parameter name

• Data type: String

• Number of characters: 1 - 64

• Usable characters: Dependent on HOT

• Pattern: Dependent on HOT

• Specification required: TRUE

• Default value: Parameter name specified in HOT

• Uniqueness restriction: Must be unique within HOT

• Input example: public_net

Value specified in .parameters.<Parameter name>

System configuration definition parameter value

• Data type: String

• Number of characters: 1 - 255

• Usable characters: Dependent on HOT

• Pattern: Dependent on HOT

• Specification required: TRUE

• Default value: Default value of the parameter specified in HOT

• Uniqueness restriction: None

• Input example: 13f92772-299f-4d29-9857-448a123d45c0

3.5.13 List wlinstances

No input parameters.

3.5.14 Show wlinstance details

wlinstance_id

ID of the stack whose detailed information is acquired (specified in the URI)

• Data type: String

• Number of characters: 1 - 10

• Usable characters: Numbers

• Pattern: String that represents an integer in the range of 1 to 2147483647

• Specification required: TRUE

• Default value: None

• Uniqueness restriction: Must be unique within the environment allocated to SF

• Input example: 1234

38 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

3.5.15 Delete wlinstance

wlinstance_id

ID of the stack to be deleted

Refer to wlinstance_id in Show wlinstance details.

.credentials.username

User name for the K5 IaaS project containing the deletion target stack

Refer to .credentials.username in Create wlinstance.

.credentials.password

User password for the K5 IaaS project containing the deletion target stack

Refer to .credentials.password in Create wlinstance.

.credentials.project_name

Name of the K5 IaaS project containing the deletion target stack

Refer to .credentials.project_name in Create wlinstance.

.credentials.domain_name

Domain name of the K5 IaaS project containing the deletion target stack

Refer to .credentials.domain_name in Create wlinstance.

39 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Chapter 4

Error Reference

4.1 Common Information

If an error not described in this reference occurs, please contact the developer for information if necessary. Inthat event, please provide the following information.

• Information related to the executed operation (the execution time, the name of the API, request details,etc.)

• Information related to the error that occurred (the occurrence time, response details, etc.)

4.2 Error Information Output Using outputs

As shown in the following response body, if the return_code value under outputs is 1, an error hasoccurred.In this event, the description value provides error information.

{"outputs": [{

"return_code": 1,"message": "Failed.","description": "<Error information>"

}]

}

Error information, the corresponding explanations, and the corrective actions are as follows.

4.2.1 Empty request parameter is not allowed.

Description: A required HTTP request parameter is an empty stringCorrective action: Input a value in the required HTTP request parameter.HTTP Status Code: 400 Bad Request

4.2.2 Too few request parameters.

Description: Specified required HTTP request parameters (included in the body or header) are insufficientCorrective action: Specify all required HTTP request parameters (included in the body or header).HTTP Status Code: 400 Bad Request

40 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

4.2.3 Git authentication failed.

Description: Authentication error in the Source Code Management ServiceCorrective action: Check whether the authentication information is correct.HTTP Status Code: 401 Unauthorized

4.2.4 Invalid Git Group.

Description: Invalid group name in the Source Code Management ServiceCorrective action: Check whether the HTTP request body is correct. Confirm that the GitLab group exists. Ifthe GitLab Group name and Group path are different, specify the value set for the Group path.HTTP Status Code: 400 Bad Request

4.2.5 Git project not found.

Description: No project in the Source Code Management ServiceCorrective action: Check whether the HTTP request parameters are correct. In addition, check whether theSource Code Management Service has an existing project and if its Visibility Level is public.HTTP Status Code: 404 Not Found

4.2.6 Connection to GitLab failed.

Description: SF internal connection errorCorrective action: Check whether the HTTP request parameters are correct. In addition, check whether loginto the Source Code Management Service is possible, and if the Visibility Level of the project is public.HTTP Status Code: 400 Bad Request

4.2.7 Git submodule required.

Description: WL-PKG project configuration error in the Source Code Management ServiceCorrective action: When using “commitid” in the building of a WL-PKG, check whether the WL-PKG projectis in a Git submodule configuration.HTTP Status Code: 404 Not Found

4.2.8 Prepare WL-PKG materials failed.

Description: Failed to prepare for build executionCorrective action: When using “commitid” in the building of a WL-PKG, check whether the HTTP requestparameter “commitid” is correct.HTTP Status Code: 400 Bad Request

4.2.9 Authentication in software stack definition service failed.

Description: SF internal authentication errorCorrective action: Check whether the authentication information is correct.HTTP Status Code: 401 Unauthorized

4.2.10 Connection to software stack definition service failed.

Description: SF internal connection errorCorrective action: Contact the support desk.

41 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

HTTP Status Code: 500 Internal Server Error

4.2.11 WL-PKG name in wlpkg_def.yaml differs from GitLab project.

Description: Inconsistency between the WL-PKG name described in the WL-PKG definition and theWL-PKG project name described in GitLabCorrective action: Specify the WL-PKG project name for the WL-PKG name described in the WL-PKGdefinition.HTTP Status Code: 409 Conflict

4.2.12 The wlpkg_def.yaml not found.

Description: No WL-PKG definition foundCorrective action: Check whether a WL-PKG definition exists in the WL-PKG project.HTTP Status Code: 404 Not Found

4.2.13 Software stack definition in wlpkg_def.yaml not found.

Description: The software stack definition described in the WL-PKG definition was not foundCorrective action: Check whether the software stack definition described in the WL-PKG definition exists inthe templates project.HTTP Status Code: 404 Not Found

4.2.14 System configuration definition in wlpkg_def.yaml not found.

Description: The system configuration definition described in the WL-PKG definition was not foundCorrective action: Check whether the system configuration definition described in the WL-PKG definitionexists in the WL-PKG project.HTTP Status Code: 404 Not Found

4.2.15 WL-PKG not found.

Description: The WL-PKG was not foundCorrective action: Check whether the request parameters are correct.HTTP Status Code: 404 Not Found

4.3 Error Information Output Using error

As shown in the following response body, if error is present, an error has occurred.In this event, the error values provide error information (the error type and the error message).

{"error": {

"type": "<Error type>","message": "<Error message>"

}}

Error information, the corresponding explanations, and the responses are as follows.

42 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

4.3.1 WLMInvalidRequest

Description: The HTTP request format is incorrectCorrective action: Check the content of the error message and correct the HTTP request format.HTTP Status Code: 400 Bad Request

4.3.2 WLMResourceNotFound

Description: A resource managed by SF was not foundCorrective action: Confirm the presence of resources and specify an existing resource.HTTP Status Code: 404 Not Found

4.3.3 WLMInvalidWLPackageDefinition

Description: WL-PKG definition content is incorrectCorrective action: Ask the WL-PKG developer for information.HTTP Status Code: 400 Bad Request

4.3.4 WLMStackCreationRequestFailed

Description: Invalid stack creation requestCorrective action: Confirm the request body and ask the WL-PKG developer for WL-PKG systemconfiguration definitions.HTTP Status Code: 400 Bad Request

4.3.5 WLMStackDeletionRequestFailed

Description: Invalid stack deletion requestCorrective action: Confirm the HTTP request body.HTTP Status Code: 400 Bad Request

4.3.6 WLMParseError

Description: The HTTP request body format is incorrectCorrective action: Confirm that it is in correct JSON format.HTTP Status Code: 400 Bad Request

4.3.7 WLMUnauthorized

Description: Authentication failedCorrective action: Check whether the authentication information input in the request body is correct.HTTP Status Code: 401 Unauthorized

4.3.8 WLMMethodNotAllowed

Description: The HTTP method is incorrectCorrective action: Refer to the API reference and specify the correct HTTP method.HTTP Status Code: 405 Method Not Allowed

43 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

4.3.9 WLMNotAcceptable

Description: The ‘Accept’ header value in the HTTP request is incorrectCorrective action: Specify ‘application/json’.HTTP Status Code: 406 Not Acceptable

4.3.10 WLMOperationConflict

Description: Conflicting operation attempted for a stackCorrective action: Confirm that the status of the relevant stack is not ‘CREATING’ or ‘DELETING’ and thenrepeat the same operation.HTTP Status Code: 409 Conflict

4.3.11 WLMUnsupportedMediaType

Description: The ‘Content-Type’ header value in the HTTP request is incorrectCorrective action: Specify ‘application/json’.HTTP Status Code: 415 Unsupported Media Type

4.3.12 WLMStackStatusFailed

Description: K5 IaaS stack status is FAILEDCorrective action: Handle this error based on the content of the K5 IaaS error message included in the errormessage in the following format.

"Stack status failed: id=<Stack ID assigned by K5 IaaS>. <K5 IaaSerror message>"

HTTP Status Code: 500 Internal Server Error

4.3.13 WLMStackStatusCheckTimeout

Description: K5 IaaS stack status check timed outCorrective action: Confirm the detailed information of the K5 IaaS stack.HTTP Status Code: 500 Internal Server Error

4.3.14 WLMHttpError

Description: SF image generation request failedCorrective action: Confirm the following points. If there is no problem in either case, contact the support desk.

• The K5 IaaS user has been assigned the “System Owner Role” (cpf_systemowner)

• The K5 IaaS limit value has not been exceeded

HTTP Status Code: 500 Internal Server Error

44 Copyright 2016 FUJITSU LIMITED

FUJITSU Cloud Service K5 SFReference Guide

Chapter 5

Revision History

Aug 19, 2016• General changes

– Change “source code management function” to “Source Code Management Service”

– Fix some minor problems

Jul 31, 2016• First release

45 Copyright 2016 FUJITSU LIMITED