diff --git a/.editorconfig b/.editorconfig
index b54e172c0db..bcf4e4fef4d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -11,8 +11,8 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = true
-[*.rb]
-charset = utf-8
+[*.html]
+indent_size = 4
[*.md]
trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
index 10501583560..4a9c8acd0e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,24 +1,5 @@
-*.gem
-*.rbc
-.bundle
-.config
-coverage
-InstalledFiles
-lib/bundler/man
-pkg
-rdoc
-spec/reports
-test/tmp
-test/version_tmp
-tmp
-*.DS_STORE
-build/
-.cache
-.vagrant
-.sass-cache
-
-# YARD artifacts
-.yardoc
-_yardoc
-doc/
+public/
+resources
+.hugo/*
+!.hugo/version
.idea/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000000..2546cc14a7e
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "themes/docuapi"]
+ path = themes/docuapi
+ url = https://github.com/bep/docuapi.git
diff --git a/.hugo/version b/.hugo/version
new file mode 100644
index 00000000000..e989b78d23a
--- /dev/null
+++ b/.hugo/version
@@ -0,0 +1 @@
+0.59.1/extended
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 218f5caa99e..00000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,162 +0,0 @@
-# Changelog
-
-## Version 2.3.1
-
-*July 5, 2018*
-
-- Update `sprockets` in `Gemfile.lock` to fix security warnings
-
-## Version 2.3
-
-*July 5, 2018*
-
-- Allows strikethrough in markdown by default.
-- Upgrades jQuery to 3.2.1, thanks to [Tomi Takussaari](https://github.com/TomiTakussaari)
-- Fixes invalid HTML in `layout.erb`, thanks to [Eric Scouten](https://github.com/scouten) for pointing out
-- Hopefully fixes Vagrant memory issues, thanks to [Petter Blomberg](https://github.com/p-blomberg) for the suggestion
-- Cleans HTML in headers before setting `document.title`, thanks to [Dan Levy](https://github.com/justsml)
-- Allows trailing whitespace in markdown files, thanks to [Samuel Cousin](https://github.com/kuzyn)
-- Fixes pushState/replaceState problems with scrolling not changing the document hash, thanks to [Andrey Fedorov](https://github.com/anfedorov)
-- Removes some outdated examples, thanks [@al-tr](https://github.com/al-tr), [Jerome Dahdah](https://github.com/jdahdah), and [Ricardo Castro](https://github.com/mccricardo)
-- Fixes `nav-padding` bug, thanks [Jerome Dahdah](https://github.com/jdahdah)
-- Code style fixes thanks to [Sebastian Zaremba](https://github.com/vassyz)
-- Nokogiri version bump thanks to [Grey Baker](https://github.com/greysteil)
-- Fix to default `index.md` text thanks to [Nick Busey](https://github.com/NickBusey)
-
-Thanks to everyone who contributed to this release!
-
-## Version 2.2
-
-*January 19, 2018*
-
-- Fixes bugs with some non-roman languages not generating unique headers
-- Adds editorconfig, thanks to [Jay Thomas](https://github.com/jaythomas)
-- Adds optional `NestingUniqueHeadCounter`, thanks to [Vladimir Morozov](https://github.com/greenhost87)
-- Small fixes to typos and language, thx [Emir Ribić](https://github.com/ribice), [Gregor Martynus](https://github.com/gr2m), and [Martius](https://github.com/martiuslim)!
-- Adds links to Spectrum chat for questions in README and ISSUE_TEMPLATE
-
-## Version 2.1
-
-*October 30, 2017*
-
-- Right-to-left text stylesheet option, thanks to [Mohammad Hossein Rabiee](https://github.com/mhrabiee)
-- Fix for HTML5 history state bug, thanks to [Zach Toolson](https://github.com/ztoolson)
-- Small styling changes, typo fixes, small bug fixes from [Marian Friedmann](https://github.com/rnarian), [Ben Wilhelm](https://github.com/benwilhelm), [Fouad Matin](https://github.com/fouad), [Nicolas Bonduel](https://github.com/NicolasBonduel), [Christian Oliff](https://github.com/coliff)
-
-Thanks to everyone who submitted PRs for this version!
-
-## Version 2.0
-
-*July 17, 2017*
-
-- All-new statically generated table of contents
- - Should be much faster loading and scrolling for large pages
- - Smaller Javascript file sizes
- - Avoids the problem with the last link in the ToC not ever highlighting if the section was shorter than the page
- - Fixes control-click not opening in a new page
- - Automatically updates the HTML title as you scroll
-- Updated design
- - New default colors!
- - New spacings and sizes!
- - System-default typefaces, just like GitHub
-- Added search input delay on large corpuses to reduce lag
-- We even bumped the major version cause hey, why not?
-- Various small bug fixes
-
-Thanks to everyone who helped debug or wrote code for this version! It was a serious community effort, and I couldn't have done it alone.
-
-## Version 1.5
-
-*February 23, 2017*
-
-- Add [multiple tabs per programming language](https://github.com/lord/slate/wiki/Multiple-language-tabs-per-programming-language) feature
-- Upgrade Middleman to add Ruby 1.4.0 compatibility
-- Switch default code highlighting color scheme to better highlight JSON
-- Various small typo and bug fixes
-
-## Version 1.4
-
-*November 24, 2016*
-
-- Upgrade Middleman and Rouge gems, should hopefully solve a number of bugs
-- Update some links in README
-- Fix broken Vagrant startup script
-- Fix some problems with deploy.sh help message
-- Fix bug with language tabs not hiding properly if no error
-- Add `!default` to SASS variables
-- Fix bug with logo margin
-- Bump tested Ruby versions in .travis.yml
-
-## Version 1.3.3
-
-*June 11, 2016*
-
-Documentation and example changes.
-
-## Version 1.3.2
-
-*February 3, 2016*
-
-A small bugfix for slightly incorrect background colors on code samples in some cases.
-
-## Version 1.3.1
-
-*January 31, 2016*
-
-A small bugfix for incorrect whitespace in code blocks.
-
-## Version 1.3
-
-*January 27, 2016*
-
-We've upgraded Middleman and a number of other dependencies, which should fix quite a few bugs.
-
-Instead of `rake build` and `rake deploy`, you should now run `bundle exec middleman build --clean` to build your server, and `./deploy.sh` to deploy it to Github Pages.
-
-## Version 1.2
-
-*June 20, 2015*
-
-**Fixes:**
-
-- Remove crash on invalid languages
-- Update Tocify to scroll to the highlighted header in the Table of Contents
-- Fix variable leak and update search algorithms
-- Update Python examples to be valid Python
-- Update gems
-- More misc. bugfixes of Javascript errors
-- Add Dockerfile
-- Remove unused gems
-- Optimize images, fonts, and generated asset files
-- Add chinese font support
-- Remove RedCarpet header ID patch
-- Update language tabs to not disturb existing query strings
-
-## Version 1.1
-
-*July 27, 2014*
-
-**Fixes:**
-
-- Finally, a fix for the redcarpet upgrade bug
-
-## Version 1.0
-
-*July 2, 2014*
-
-[View Issues](https://github.com/tripit/slate/issues?milestone=1&state=closed)
-
-**Features:**
-
-- Responsive designs for phones and tablets
-- Started tagging versions
-
-**Fixes:**
-
-- Fixed 'unrecognized expression' error
-- Fixed #undefined hash bug
-- Fixed bug where the current language tab would be unselected
-- Fixed bug where tocify wouldn't highlight the current section while searching
-- Fixed bug where ids of header tags would have special characters that caused problems
-- Updated layout so that pages with disabled search wouldn't load search.js
-- Cleaned up Javascript
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index cc17fd98d59..00000000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@lord.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 79d41fff6dd..00000000000
--- a/Gemfile
+++ /dev/null
@@ -1,11 +0,0 @@
-ruby '>=2.3.1'
-source 'https://rubygems.org'
-
-# Middleman
-gem 'middleman', '~>4.2.1'
-gem 'middleman-syntax', '~> 3.0.0'
-gem 'middleman-autoprefixer', '~> 2.7.0'
-gem 'middleman-sprockets', '~> 4.1.0'
-gem 'rouge', '~> 2.0.5'
-gem 'redcarpet', '~> 3.4.0'
-gem 'nokogiri', '~> 1.8.2'
diff --git a/Gemfile.lock b/Gemfile.lock
deleted file mode 100644
index eebb95a9694..00000000000
--- a/Gemfile.lock
+++ /dev/null
@@ -1,129 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- activesupport (5.0.1)
- concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (~> 0.7)
- minitest (~> 5.1)
- tzinfo (~> 1.1)
- addressable (2.5.0)
- public_suffix (~> 2.0, >= 2.0.2)
- autoprefixer-rails (6.6.1)
- execjs
- backports (3.6.8)
- coffee-script (2.4.1)
- coffee-script-source
- execjs
- coffee-script-source (1.12.2)
- compass-import-once (1.0.5)
- sass (>= 3.2, < 3.5)
- concurrent-ruby (1.0.5)
- contracts (0.13.0)
- dotenv (2.2.0)
- erubis (2.7.0)
- execjs (2.7.0)
- fast_blank (1.0.0)
- fastimage (2.0.1)
- addressable (~> 2)
- ffi (1.9.17)
- haml (4.0.7)
- tilt
- hamster (3.0.0)
- concurrent-ruby (~> 1.0)
- hashie (3.5.1)
- i18n (0.7.0)
- kramdown (1.13.2)
- listen (3.0.8)
- rb-fsevent (~> 0.9, >= 0.9.4)
- rb-inotify (~> 0.9, >= 0.9.7)
- memoist (0.15.0)
- middleman (4.2.1)
- coffee-script (~> 2.2)
- compass-import-once (= 1.0.5)
- haml (>= 4.0.5)
- kramdown (~> 1.2)
- middleman-cli (= 4.2.1)
- middleman-core (= 4.2.1)
- sass (>= 3.4.0, < 4.0)
- middleman-autoprefixer (2.7.1)
- autoprefixer-rails (>= 6.5.2, < 7.0.0)
- middleman-core (>= 3.3.3)
- middleman-cli (4.2.1)
- thor (>= 0.17.0, < 2.0)
- middleman-core (4.2.1)
- activesupport (>= 4.2, < 5.1)
- addressable (~> 2.3)
- backports (~> 3.6)
- bundler (~> 1.1)
- contracts (~> 0.13.0)
- dotenv
- erubis
- execjs (~> 2.0)
- fast_blank
- fastimage (~> 2.0)
- hamster (~> 3.0)
- hashie (~> 3.4)
- i18n (~> 0.7.0)
- listen (~> 3.0.0)
- memoist (~> 0.14)
- padrino-helpers (~> 0.13.0)
- parallel
- rack (>= 1.4.5, < 3)
- sass (>= 3.4)
- servolux
- tilt (~> 2.0)
- uglifier (~> 3.0)
- middleman-sprockets (4.1.0)
- middleman-core (~> 4.0)
- sprockets (>= 3.0)
- middleman-syntax (3.0.0)
- middleman-core (>= 3.2)
- rouge (~> 2.0)
- mini_portile2 (2.3.0)
- minitest (5.10.1)
- nokogiri (1.8.2)
- mini_portile2 (~> 2.3.0)
- padrino-helpers (0.13.3.3)
- i18n (~> 0.6, >= 0.6.7)
- padrino-support (= 0.13.3.3)
- tilt (>= 1.4.1, < 3)
- padrino-support (0.13.3.3)
- activesupport (>= 3.1)
- parallel (1.10.0)
- public_suffix (2.0.5)
- rack (2.0.5)
- rb-fsevent (0.9.8)
- rb-inotify (0.9.8)
- ffi (>= 0.5.0)
- redcarpet (3.4.0)
- rouge (2.0.7)
- sass (3.4.23)
- servolux (0.12.0)
- sprockets (3.7.2)
- concurrent-ruby (~> 1.0)
- rack (> 1, < 3)
- thor (0.19.4)
- thread_safe (0.3.5)
- tilt (2.0.6)
- tzinfo (1.2.2)
- thread_safe (~> 0.1)
- uglifier (3.0.4)
- execjs (>= 0.3.0, < 3)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- middleman (~> 4.2.1)
- middleman-autoprefixer (~> 2.7.0)
- middleman-sprockets (~> 4.1.0)
- middleman-syntax (~> 3.0.0)
- nokogiri (~> 1.8.2)
- redcarpet (~> 3.4.0)
- rouge (~> 2.0.5)
-
-RUBY VERSION
- ruby 2.3.3p222
-
-BUNDLED WITH
- 1.15.4
diff --git a/Vagrantfile b/Vagrantfile
deleted file mode 100644
index 6f2444e2133..00000000000
--- a/Vagrantfile
+++ /dev/null
@@ -1,44 +0,0 @@
-Vagrant.configure(2) do |config|
- config.vm.box = "ubuntu/trusty64"
- config.vm.network :forwarded_port, guest: 4567, host: 4567
- config.vm.provider "virtualbox" do |vb|
- vb.memory = "2048"
- end
-
- config.vm.provision "bootstrap",
- type: "shell",
- inline: <<-SHELL
- sudo apt-add-repository ppa:brightbox/ruby-ng
- sudo apt-get update
- sudo apt-get install -yq ruby2.4 ruby2.4-dev
- sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev
- sudo apt-get autoremove -yq
- gem2.4 install --no-ri --no-rdoc bundler
- SHELL
-
- # add the local user git config to the vm
- config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
-
- config.vm.provision "install",
- type: "shell",
- privileged: false,
- inline: <<-SHELL
- echo "=============================================="
- echo "Installing app dependencies"
- cd /vagrant
- bundle config build.nokogiri --use-system-libraries
- bundle install
- SHELL
-
- config.vm.provision "run",
- type: "shell",
- privileged: false,
- run: "always",
- inline: <<-SHELL
- echo "=============================================="
- echo "Starting up middleman at http://localhost:4567"
- echo "If it does not come up, check the ~/middleman.log file for any error messages"
- cd /vagrant
- bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log &
- SHELL
-end
diff --git a/assets/scss/slate/docuapi_overrides.scss b/assets/scss/slate/docuapi_overrides.scss
new file mode 100644
index 00000000000..b43e254cdff
--- /dev/null
+++ b/assets/scss/slate/docuapi_overrides.scss
@@ -0,0 +1,129 @@
+// Overrides
+
+// BACKGROUND COLORS
+////////////////////
+// $nav-bg:#393939 !default;
+// $examples-bg: #393939 !default;
+$nav-bg: #393939 !default;
+$examples-bg: #393939 !default;
+$code-bg: #292929 !default;
+$code-annotation-bg: #1c1c1c !default;
+$nav-subitem-bg: #262626 !default;
+$nav-active-bg: #b00 !default;
+$lang-select-border: #000 !default;
+$lang-select-bg: #b00 !default;
+$lang-select-active-bg: #292929 !default; // feel free to change this to blue or something
+$lang-select-pressed-bg: #292929 !default; // color of language tab bg when mouse is pressed
+// $main-bg: #fff !default;
+$aside-notice-bg: #8fbcd4 !default;
+$aside-warning-bg: #c97a7e !default;
+$aside-success-bg: #6ac174 !default;
+$search-notice-bg: #c97a7e !default;
+
+
+// TEXT COLORS
+////////////////////
+$main-text: #333 !default; // main content text color
+$nav-text: #fff !default;
+$nav-active-text: #fff !default;
+$lang-select-text: #fff !default; // color of unselected language tab text
+$lang-select-active-text: #fff !default; // color of selected language tab text
+$lang-select-pressed-text: #fff !default; // color of language tab text when mouse is pressed
+$code-link-color: #6d6d6d;
+$link-color: #347bb7;
+
+// SIZES
+////////////////////
+$nav-width: 230px !default; // width of the navbar
+$examples-width: 40% !default; // portion of the screen taken up by code examples
+$logo-margin: 20px !default; // margin between nav items and logo, ignored if search is active
+$main-padding: 28px !default; // padding to left and right of content & examples
+$nav-padding: 15px !default; // padding to left and right of navbar
+$nav-v-padding: 10px !default; // padding used vertically around search boxes and results
+$nav-indent: 10px !default; // extra padding for ToC subitems
+$code-annotation-padding: 13px !default; // padding inside code annotations
+$h1-margin-bottom: 21px !default; // padding under the largest header tags
+$tablet-width: 930px !default; // min width before reverting to tablet size
+$phone-width: $tablet-width - $nav-width !default; // min width before reverting to mobile size
+
+// FONTS
+////////////////////
+// @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&display=swap");
+
+// $font-default-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+
+%default-font {
+ font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "微软雅黑", STXihei, "华文细黑", sans-serif;
+ font-size: 13px;
+}
+
+%header-font {
+ @extend %default-font;
+ font-weight: bold;
+}
+
+%code-font {
+ font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
+ font-size: 12px;
+ line-height: 1.5;
+}
+
+// OTHER
+////////////////////
+$nav-active-shadow: #000 !default;
+$nav-footer-border-color: #666 !default;
+$nav-embossed-border-top: #000 !default;
+$nav-embossed-border-bottom: #939393 !default;
+$main-embossed-text-shadow: 0px 1px 0px #fff !default;
+$search-box-border-color: #666 !default;
+
+
+////////////////////////////////////////////////////////////////////////////////
+// INTERNAL
+////////////////////////////////////////////////////////////////////////////////
+// These settings are probably best left alone.
+%break-words {
+ word-break: break-all;
+ hyphens: auto;
+}
+
+
+.toc-h3 {
+ padding-left: $nav-padding + 2*$nav-indent !important;
+ font-size: 12px;
+}
+
+.toc-list-h3 {
+ display: none;
+ background-color: $nav-subitem-bg;
+}
+
+.toc-h4 {
+ padding-left: $nav-padding + 3*$nav-indent !important;
+ font-size: 12px;
+}
+
+.toc-list-h4 {
+ display: none;
+ background-color: $nav-subitem-bg;
+}
+
+.method {
+ display: inline-block;
+ // padding: .25em .4em;
+ padding: .5em;
+ font-size: 75%;
+ font-weight: 700;
+ line-height: 1;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25rem;
+ transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
+ color: #fff;
+ background-color: #6c757d;
+}
+
+.content code {
+ padding: 5px !important;
+}
diff --git a/config.rb b/config.rb
deleted file mode 100644
index 24887979fea..00000000000
--- a/config.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# Unique header generation
-require './lib/unique_head.rb'
-
-# Markdown
-set :markdown_engine, :redcarpet
-set :markdown,
- fenced_code_blocks: true,
- smartypants: true,
- disable_indented_code_blocks: true,
- prettify: true,
- strikethrough: true,
- tables: true,
- with_toc_data: true,
- no_intra_emphasis: true,
- renderer: UniqueHeadCounter
-
-# Assets
-set :css_dir, 'stylesheets'
-set :js_dir, 'javascripts'
-set :images_dir, 'images'
-set :fonts_dir, 'fonts'
-
-# Activate the syntax highlighter
-activate :syntax
-ready do
- require './lib/multilang.rb'
-end
-
-activate :sprockets
-
-activate :autoprefixer do |config|
- config.browsers = ['last 2 version', 'Firefox ESR']
- config.cascade = false
- config.inline = true
-end
-
-# Github pages require relative links
-activate :relative_assets
-set :relative_links, true
-
-# Build Configuration
-configure :build do
- # If you're having trouble with Middleman hanging, commenting
- # out the following two lines has been known to help
- activate :minify_css
- activate :minify_javascript
- # activate :relative_assets
- # activate :asset_hash
- # activate :gzip
-end
-
-# Deploy Configuration
-# If you want Middleman to listen on a different port, you can set that below
-set :port, 4567
-
-helpers do
- require './lib/toc_data.rb'
-end
diff --git a/config.toml b/config.toml
new file mode 100644
index 00000000000..4d5eb38f4ae
--- /dev/null
+++ b/config.toml
@@ -0,0 +1,56 @@
+theme = "docuapi"
+languageCode = "en-us"
+baseurl = "https://developers.cloud.ca/"
+title = "cloud.ca API Documentation"
+
+disableKinds = ["taxonomyTerm"]
+
+# Code higlighting settings
+pygmentsCodefences = true
+pygmentsCodeFencesGuesSsyntax = false
+pygmentsOptions = ""
+pygmentsStyle = "monokai"
+pygmentsUseClasses = false
+
+defaultContentLanguage = "en"
+
+[module]
+ [module.hugoVersion]
+ [[module.imports]]
+ path = "github.com/bep/empty-hugo-module"
+
+[params]
+ search = true
+
+ # Configure the language example tabs.
+ [[params.language_tabs]]
+ key = "go"
+ name = "Go"
+ [[params.language_tabs]]
+ key = "terraform"
+ name = "Terraform"
+ [[params.language_tabs]]
+ key = "cli"
+ name = "CLI"
+ [[params.language_tabs]]
+ key = "shell"
+ name = "curl"
+ [[params.language_tabs]]
+ key = "output"
+ name = "Output"
+
+# Languages
+[languages]
+ [languages.en]
+ languageName = "English"
+ weight = 2
+ title = "cloud.ca API Documentation"
+
+ # Left sidebar footer items. Use HTMl or Markdown.
+ toc_footers = [
+ "Documentation Powered by [DocuAPI](https://github.com/bep/docuapi)"
+ ]
+
+ [languages.en.blackfriday]
+ angledQuotes = false
+ hrefTargetBlank = true
diff --git a/content/100-getstarted.md b/content/100-getstarted.md
new file mode 100644
index 00000000000..3ed297acb17
--- /dev/null
+++ b/content/100-getstarted.md
@@ -0,0 +1,14 @@
+---
+weight: 100
+title: Getting started
+---
+
+# Getting started edited
+
+The cloud.ca API allows you to manage your environments and provision resources in a simple programmatic way using standard HTTP requests.
+
+The API is [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer). Responses, successful or not, are returned in [JSON](http://www.json.org/). Request bodies must be [JSON](http://www.json.org/), and should be made over SSL.
+
+API endpoint: `https://api.cloud.ca/v1`
+
+We have also developed tools to help consume our APIs. If you use `go`, check out our [library](https://github.com/cloud-ca/go-cloudca). If you use Terraform, check out our [provider](https://github.com/cloud-ca/terraform-cloudca). NB: both are being actively developed, so there is still some functionality missing.
diff --git a/content/101-authentication.md b/content/101-authentication.md
new file mode 100644
index 00000000000..ca6d0b76156
--- /dev/null
+++ b/content/101-authentication.md
@@ -0,0 +1,34 @@
+---
+weight: 101
+title: Authentication
+---
+
+## Authentication
+
+```go
+import "github.com/cloud-ca/go-cloudca"
+ccaClient := cca.NewCcaClient("your_api_key")
+```
+
+```terraform
+provider "cloudca" {
+ api_key = "${var.my_api_key}"
+}
+```
+
+```shell
+## To authenticate, add a header
+## Make sure to replace `your_api_key` with your API key.
+curl "https://api.cloud.ca/v1/organizations" \
+ -H "MC-Api-Key: your_api_key"
+```
+
+API endpoints are secured by the same role-based access control (RBAC) as the cloud.ca portal. To identify who is making the requests, it is required to add a header to your HTTP requests:
+
+`MC-Api-Key: your_api_key`
+
+
+
+The API key is found from the API keys section under the user profile menu. If you don't see cloud.ca API keys section, contact your system administrator as you may not have the permission to see that section. **Your API key carries the same privileges as your cloud.ca account, so be sure to keep it secret**. If you think your API has been compromised, regenerate your API key from the API keys section.
diff --git a/content/102-verbs.md b/content/102-verbs.md
new file mode 100644
index 00000000000..bd19906748a
--- /dev/null
+++ b/content/102-verbs.md
@@ -0,0 +1,15 @@
+---
+weight: 102
+title: HTTP verbs
+---
+
+## HTTP verbs
+
+The cloud.ca API can be used by any tool that is fluent in HTTP. The appropriate HTTP method should be used depending on the desired action.
+
+Verbs | Purpose
+----- | -------
+`GET` | Used to retrieve information about a resource.
+`POST` | Used to create (or provision) a new resource or perform an operation on it.
+`PUT` | Used to update a resource.
+`DELETE` | Used to delete a resource.
diff --git a/source/includes/_getting_started.md b/content/103-responses.md
similarity index 55%
rename from source/includes/_getting_started.md
rename to content/103-responses.md
index b34db98194e..3e75e9af54b 100644
--- a/source/includes/_getting_started.md
+++ b/content/103-responses.md
@@ -1,54 +1,12 @@
-# Getting started
-
-The cloud.ca API allows you to manage your environments and provision resources in a simple programmatic way using standard HTTP requests.
-
-The API is [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer). Responses, successful or not, are returned in [JSON](http://www.json.org/). Request bodies must be [JSON](http://www.json.org/), and should be made over SSL.
-
-API endpoint : `https://api.cloud.ca/v1`
-
-We have also developed tools to help consume our APIs. If you use `go`, check out our [library](https://github.com/cloud-ca/go-cloudca). If you use Terraform, check out our [provider](https://github.com/cloud-ca/terraform-cloudca). NB: both are being actively developed, so there is still some functionality missing.
-
-## Authentication
-```go
-import "github.com/cloud-ca/go-cloudca"
-ccaClient := cca.NewCcaClient("your_api_key")
-```
-
-```shell
-## To authenticate, add a header
-## Make sure to replace `your_api_key` with your API key.
-curl "https://api.cloud.ca/v1/organizations" \
- -H "MC-Api-Key: your_api_key"
-```
-
-```dart
-provider "cloudca" {
- api_key = "${var.my_api_key}"
-}
-```
-
-API endpoints are secured by the same role-based access control (RBAC) as the cloud.ca portal. To identify who is making the requests, it is required to add a header to your HTTP requests:
-
-`MC-Api-Key: your_api_key`
-
-
-
-The API key is found from the API keys section under the user profile menu. If you don't see cloud.ca API keys section, contact your system administrator as you may not have the permission to see that section. **Your API key carries the same privileges as your cloud.ca account, so be sure to keep it secret**. If you think your API has been compromised, regenerate your API key from the API keys section.
-
-## HTTP verbs
-The cloud.ca API can be used by any tool that is fluent in HTTP. The appropriate HTTP method should be used depending on the desired action.
-
-Verbs | Purpose
------- | -------
-`GET` | Used to retrieve information about a resource.
-`POST` | Used to create (or provision) a new resource or perform an operation on it.
-`PUT` | Used to update a resource.
-`DELETE` | Used to delete a resource.
+---
+weight: 103
+title: Responses
+---
## Responses
+
### Success response
+
+
```shell
# Example without tasks
```
-```json
+
+```output
{
"data": [
{ "_comment" : "JSON representation of first object goes here" },
@@ -77,22 +37,25 @@ Verbs | Purpose
]
}
```
+
```shell
# Example of compute API call with task
```
-```json
+
+```output
{
"taskId": "c2c13744-8610-4012-800a-0907bea110a5",
"taskStatus": "PENDING"
}
```
+
When an API request is successful, the response body will contain the `data` field with the result of the API call. If you're using the [compute API](#compute-api), the `data` field might be empty since most of the operations are asynchronous. The response will contain the `taskId` and `taskStatus` fields so that you can retrieve the result of the operation you executed through the [task API](#tasks)
-Attributes |
---- | ---
-`data` | The data field contains the object requested by the API caller
-`taskId` | The [task id](#tasks) of an operation executed through the [compute API](#compute-api)
-`taskStatus` | The status of a [task](#tasks) of an operation executed through the [compute API](#compute-api)
+Attributes | Type | Description
+---------- | ---- | -----------
+`data` | Array[string] | The data field contains the object requested by the API caller
+`taskId` | string | The [task id](#tasks) of an operation executed through the [compute API](#compute-api)
+`taskStatus` | string | The status of a [task](#tasks) of an operation executed through the [compute API](#compute-api)
@@ -121,6 +84,7 @@ If the response contains the "errors" field, the request was not
If you are not familiar with the cloud.ca API response structures, it would be valuable to read [this](#responses) first.
diff --git a/content/201-service-connections.md b/content/201-service-connections.md
new file mode 100644
index 00000000000..a4ed79469a6
--- /dev/null
+++ b/content/201-service-connections.md
@@ -0,0 +1,72 @@
+---
+weight: 201
+title: Service connections
+---
+
+## Service connections
+
+Service connections are the services that you can create resources for (e.g. compute, object storage). [Environments](#environments) are created for a specific service which allows you to create and manage resources within that service.
+
+### List service connections
+
+GET `/services/connections`
+
+```json
+{
+ "data":[{
+ "id": "adfbdb51-493b-45b1-8802-3f6327afb9e6",
+ "serviceCode": "compute-qc",
+ "name": "Compute - Québec",
+ "type": "CloudCA",
+ "status": {
+ "lastUpdated": "2017-08-15T12:00:00.000Z",
+ "reachable": true
+ }
+ }]
+}
+```
+
+```go
+ccaClient := cca.NewCcaClient("your_api_key")
+serviceConnection, err := ccaClient.ServiceConnections.List()
+```
+
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the service connection
+`serviceCode` | *string* | The service code of the service connection. It is used in the endpoint of the services API.
+`name` | *string* | The name of the service connection
+`type` | *string* | The type of the service connection.
+`status` | *Object* | Status of the service connection. Tells you if the service is up. *includes*: `lastUpdated`, `reachable`
+
+### Retrieve a service connection
+
+GET `/services/connections/:id`
+
+```json
+{
+ "data":[{
+ "id": "adfbdb51-493b-45b1-8802-3f6327afb9e6",
+ "serviceCode": "compute-qc",
+ "name": "Compute - Québec",
+ "type": "CloudCA",
+ "status": {
+ "lastUpdated": "2017-08-15T12:00:00.000Z",
+ "reachable": true
+ }
+ }]
+}
+```
+
+```go
+ccaClient := cca.NewCcaClient("your_api_key")
+serviceConnections, err := ccaClient.ServiceConnections.Get("[service-connection-id]")
+```
+
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the service connection
+`serviceCode` | *string* | The service code of the service connection. It is used in the endpoint of the services API.
+`name` | *string* | The name of the service connection
+`type` | *string* | The type of the service connection.
+`status` | *Object* | Status of the service connection. Tells you if the service is up. *includes*: `lastUpdated`, `reachable`
diff --git a/source/includes/administration/_organizations.md b/content/202-organizations.md
similarity index 61%
rename from source/includes/administration/_organizations.md
rename to content/202-organizations.md
index 46e0ebcbe29..fe5b6f3c949 100644
--- a/source/includes/administration/_organizations.md
+++ b/content/202-organizations.md
@@ -1,11 +1,15 @@
+---
+weight: 202
+title: Organizations
+---
+
## Organizations
-Organizations are the largest logical grouping of users, environments and resources available in cloud.ca. Each organization is isolated from other organizations. It has its own subdomain (`[entryPoint].cloud.ca`) and is protected by its own customizable system [roles](#roles). An administrator that must manage it's sub-organizations environments or provisioned resources can do so by having the `Access other levels` permission. Additionally, provisioned resource usage is metered at the organization level facilitating cost tracking.
+Organizations are the largest logical grouping of users, environments and resources available in cloud.ca. Each organization is isolated from other organizations. It has its own subdomain (`[entryPoint].cloud.ca`) and is protected by its own customizable system [roles](#roles). An administrator that must manage it's sub-organizations environments or provisioned resources can do so by having the `Access other levels` permission. Additionally, provisioned resource usage is metered at the organization level facilitating cost tracking.
-
### List organizations
-`GET /organizations`
+GET `/organizations`
Retrieves a list of organizations visible to the caller. In most cases, only the caller's organization will be returned. However if the caller's organization has sub-organizations, and the caller has the `Access other levels` permission, the sub-organizations will be returned as well.
@@ -22,6 +26,7 @@ curl "https://api.cloud.ca/v1/organizations" \
# Response body example
```
+
```json
{
"data": [
@@ -63,24 +68,23 @@ curl "https://api.cloud.ca/v1/organizations" \
}
```
-Attributes |
----- | -----------
-`id` *UUID* | ---
-`name` *string* | ---
-`entryPoint` *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
-`billableStartDate` *string* | The billable start date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) of the organization
-`isBillable` *boolean* | If the organization is billable this values is true, false otherwise
-`tags` *Array[string]* | Tags associated to the organization
-`parent` *[Organization](#organizations)* | If the organization is a sub-organization, it will have it's `parent` organization. *includes*:`id`,`name`
-`environments` *Array[[Environment](#environments)]* | The environments belonging to the organization *includes*: `id`
-`roles` *Array[[Role](#roles)]* | The system and environments roles belonging to the organization *includes*: `id`
-`serviceConnections` *Array[[ServiceConnection](#service-connections)]* | The services for which the organization is allowed to provision resources *includes*: `id`,`serviceCode`
-`users` *Array[[User](#users)]* | The users of the organization *includes*: `id`
-
-
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | ---
+`name` | *string* | ---
+`entryPoint` | *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
+`billableStartDate` | *string* | The billable start date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) of the organization
+`isBillable` | *boolean* | If the organization is billable this values is true, false otherwise
+`tags` | *Array[string]* | Tags associated to the organization
+`parent` | *[Organization](#organizations)* | If the organization is a sub-organization, it will have it's `parent` organization. *includes*:`id`,`name`
+`environments` | *Array[[Environment](#environments)]* | The environments belonging to the organization *includes*: `id`
+`roles` | *Array[[Role](#roles)]* | The system and environments roles belonging to the organization *includes*: `id`
+`serviceConnections` | *Array[[ServiceConnection](#service-connections)]* | The services for which the organization is allowed to provision resources *includes*: `id`,`serviceCode`
+`users` | *Array[[User](#users)]* | The users of the organization *includes*: `id`
+
### Retrieve an organization
-`GET /organizations/:id`
+GET `/organizations/:id`
Retrieve an organization's details
@@ -91,6 +95,7 @@ curl "https://api.cloud.ca/v1/organizations/[id]" \
# Response body example
```
+
```json
{
"data": {
@@ -130,24 +135,23 @@ curl "https://api.cloud.ca/v1/organizations/[id]" \
}
```
-Attributes |
----- | -----------
-`id` *UUID* | ---
-`name` *string* | ---
-`entryPoint` *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
-`billableStartDate` *string* | The billable start date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) of the organization
-`isBillable` *boolean* | If the organization is billable this values is true, false otherwise
-`tags` *Array[string]* | Tags associated to the organization
-`parent` *[Organization](#organizations)* | If the organization is a sub-organization, it will have it's `parent` organization. *includes*:`id`,`name`
-`environments` *Array[[Environment](#environments)]* | The environments belonging to the organization *includes*: `id`
-`roles` *Array[[Role](#roles)]* | The system and environments roles belonging to the organization *includes*: `id`
-`serviceConnections` *Array[[ServiceConnection](#service-connections)]* | The services for which the organization is allowed to provision resources *includes*: `id`,`serviceCode`
-`users` *Array[[User](#users)]* | The users of the organization *includes*: `id`
-
-
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | ---
+`name` | *string* | ---
+`entryPoint` | *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
+`billableStartDate` | *string* | The billable start date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) of the organization
+`isBillable` | *boolean* | If the organization is billable this values is true, false otherwise
+`tags` | *Array[string]* | Tags associated to the organization
+`parent` | *[Organization](#organizations)* | If the organization is a sub-organization, it will have it's `parent` organization. *includes*:`id`,`name`
+`environments` | *Array[[Environment](#environments)]* | The environments belonging to the organization *includes*: `id`
+`roles` | *Array[[Role](#roles)]* | The system and environments roles belonging to the organization *includes*: `id`
+`serviceConnections` | *Array[[ServiceConnection](#service-connections)]* | The services for which the organization is allowed to provision resources *includes*: `id`,`serviceCode`
+`users` | *Array[[User](#users)]* | The users of the organization *includes*: `id`
+
### Create organization
-`POST /organizations`
+POST `/organizations`
Creates a new organization as a sub-organization of the caller's organization, or a sub-organization of the specified `parent`. The caller requires the `Organizations create` permission.
@@ -160,6 +164,7 @@ curl -X POST "https://api.cloud.ca/v1/organizations" \
# Request body example
```
+
```json
{
"entryPoint":"umbrella",
@@ -175,24 +180,23 @@ curl -X POST "https://api.cloud.ca/v1/organizations" \
}
```
-Required |
----- | ----
-`name` *string* | The name of the organization. (Add info about restrictions)
-`entryPoint` *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
-
+Required | Type | Description
+-------- | ---- | -----------
+`name` | *string* | The name of the organization. (Add info about restrictions)
+`entryPoint` | *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
-Optional |
----- | ----
+Optional | Type | Description
+-------- | ---- | -----------
`serviceConnections` Array[[ServiceConnection](#service-connections)] | A list of service connections for which the organization may provision resources. *required :*`id`
`parent` [Organization](#organization) | The organization that will be the parent of the new organization. By default, it will default to the caller's organization. *required :*`id`
-##### Returns
+**Returns**
The responses' `data` field contains the created [organization](#organizations) with it's `id`.
-
### Update organization
-`PUT /organizations/:id`
+
+PUT `/organizations/:id`
Update an organization. It's parent organization cannot be changed. It can be assigned service connections
@@ -205,6 +209,7 @@ curl -X PUT "https://api.cloud.ca/v1/organizations/[id]" \
# Request body example
```
+
```json
{
"entryPoint":"umbrella",
@@ -217,22 +222,22 @@ curl -X PUT "https://api.cloud.ca/v1/organizations/[id]" \
}
```
-Required |
----- | ----
-`name` *string* | The name of the organization. (Add info about restrictions)
-`entryPoint` *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
+Required | Type | Description
+-------- | ---- | -----------
+`name` | *string* | The name of the organization. (Add info about restrictions)
+`entryPoint` | *string* | The entry point of the organization is the subdomain of the organization in the cloud.ca URL : `[entryPoint].cloud.ca`
-Optional |
----- | ----
+Optional | Type | Description
+-------- | ---- | -----------
`serviceConnections` Array[[ServiceConnection](#service-connections)] | A list of service connections for which the organization may provision resources. The caller must have access to all connections that are provided. **NB :** Service connection access may be added but not revoked at this time. *required :* `id`
-##### Returns
+**Returns**
The responses' `data` field contains the updated [organization](#organizations).
-
### Delete organization
-`DELETE /organizations/:id`
+
+DELETE `/organizations/:id`
Delete an organization. The caller may not delete his own organization. Also, an organization may not be deleted if it has sub-organizations.
@@ -242,6 +247,6 @@ curl -X DELETE "https://api.cloud.ca/v1/organizations/[id]" \
-H "MC-Api-Key: your_api_key"
```
-##### Returns
+**Returns**
Returns an HTTP status code 204, with an empty response body.
diff --git a/source/includes/administration/_users.md b/content/203-users.md
similarity index 64%
rename from source/includes/administration/_users.md
rename to content/203-users.md
index ddf42aed360..3cad676edfc 100644
--- a/source/includes/administration/_users.md
+++ b/content/203-users.md
@@ -1,12 +1,15 @@
+---
+weight: 203
+title: Users
+---
+
## Users
A user account allows users to authenticate to an [organization](#organizations) and to have access to the resources in it. You can restrict user access to the system and environments by assigning them specific [roles](#roles). Additionally, every user is given an API key which is needed to use our APIs. All operations done by users are persisted and can be accessed through the activity log.
-
-
### List users
-`GET /users`
+GET `/users`
```shell
# Retrieve visible users
@@ -16,6 +19,7 @@ curl "https://api.cloud.ca/v1/users" \
# Response body example
```
+
```json
{
"data":[{
@@ -46,6 +50,7 @@ curl "https://api.cloud.ca/v1/users" \
}]
}
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
users, err := ccaClient.Users.List()
@@ -53,24 +58,21 @@ users, err := ccaClient.Users.List()
Retrieve information about users you have access to. If you want access to other users in your [organization or sub-organizations](#organizations), you will need to be assigned the `Users read` permission. Without this permission, you will only see your own user in the list.
-Attributes |
----------- | -----------
-`id` *UUID* | The id of the user
-`userName` *string* | The username of the user
-`firstName` *string* | The first name of the user
-`lastName` *string* | The last name of the user
-`email` *string* | The email of the user
-`creationDate` *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the user was created
-`status` *string* | The current status of the user.
-`organization` *[Organization](#organization)* | The organization to which the user belongs
-`roles` *Array[[Role](#roles)]* | The system and environments roles that are assigned to the user *includes*: `id`, `name` and `environment.id`
-
-
-
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the user
+`userName` | *string* | The username of the user
+`firstName` | *string* | The first name of the user
+`lastName` | *string* | The last name of the user
+`email` | *string* | The email of the user
+`creationDate` | *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the user was created
+`status` | *string* | The current status of the user.
+`organization` | *[Organization](#organization)* | The organization to which the user belongs
+`roles` | *Array[[Role](#roles)]* | The system and environments roles that are assigned to the user *includes*: `id`, `name` and `environment.id`
### Retrieve a user
-`GET /users/:id`
+GET `/users/:id`
```shell
# Retrieve visible user
@@ -80,6 +82,7 @@ curl "https://api.cloud.ca/v1/users/[user-id]" \
# Response body example
```
+
```json
{
"data":{
@@ -114,6 +117,7 @@ curl "https://api.cloud.ca/v1/users/[user-id]" \
}
}
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
user, err := ccaClient.Users.Get("[user-id]")
@@ -121,26 +125,22 @@ user, err := ccaClient.Users.Get("[user-id]")
Retrieve information about a specific user. If you want access to other users in your [organization or sub-organizations](#organizations), you will need to be assigned the `Users Read` permission.
-Attributes |
----------- | -----------
-`id` *UUID* | The id of the user
-`userName` *string* | The username of the user
-`firstName` *string* | The first name of the user
-`lastName` *string* | The last name of the user
-`email` *string* | The email of the user
-`creationDate` *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the user was created
-`status` *string* | The current status of the user.
-`organization` *[Organization](#organization)* | The organization to which the user belongs
-`environments` *Array[[Environment](#environments)]* | The environments the user is member of *includes*: `id`, `name`
-`roles` *Array[[Role](#roles)]* | The system and environments roles that are assigned to the user *includes*: `id`, `name` and `environment.id`
-
-
-
-
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the user
+`userName` | *string* | The username of the user
+`firstName` | *string* | The first name of the user
+`lastName` | *string* | The last name of the user
+`email` | *string* | The email of the user
+`creationDate` | *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the user was created
+`status` | *string* | The current status of the user.
+`organization` | *[Organization](#organization)* | The organization to which the user belongs
+`environments` | *Array[[Environment](#environments)]* | The environments the user is member of *includes*: `id`, `name`
+`roles` | *Array[[Role](#roles)]* | The system and environments roles that are assigned to the user *includes*: `id`, `name` and `environment.id`
### Create user
-`POST /users`
+POST `/users`
```shell
# Create a user
@@ -152,6 +152,7 @@ curl -X POST "https://api.cloud.ca/v1/users" \
# Request body example
```
+
```json
{
"userName": "vader42",
@@ -171,29 +172,25 @@ curl -X POST "https://api.cloud.ca/v1/users" \
Create a user in a specific organization. There's two different types of [role](#roles) you can assign to the user. A system role will determine the set of system permissions the user will have. An environment role will give the user access to an environment and will determine what he can see and do in that environment. You will need the `Create a new user` permission to execute this operation.
-Required |
--------- | -----------
-`userName` *string* | Username of the new user. Should be unique across the organization.
-`firstName` *string* | First name of the user
-`lastName` *string* | Last name of the user
-`email` *string* | Email of the user. Should be unique across the organization.
+Required | Type | Description
+-------- | ---- | -----------
+`userName` | *string* | Username of the new user. Should be unique across the organization.
+`firstName` | *string* | First name of the user
+`lastName` | *string* | Last name of the user
+`email` | *string* | Email of the user. Should be unique across the organization.
-Optional |
--------- | -----------
+Optional | Type | Description
+-------- | ---- | -----------
`organization`*[Organization](#organization)* | Organization in which the user will be created. *Defaults to your organization* *required:* `id`
-`roles` *Array[[Role](#roles)]* | The system and environment roles to give to the user *required*: `id`
+`roles` | *Array[[Role](#roles)]* | The system and environment roles to give to the user *required*: `id`
##### Returns
The responses' `data` field contains the created [user](#users) with it's `id`.
-
-
-
-
### Update user
-`PUT /users/:id`
+PUT `/users/:id`
```shell
# Create a user
@@ -205,6 +202,7 @@ curl -X PUT "https://api.cloud.ca/v1/users/[user-id]" \
# Request body example
```
+
```json
{
"userName": "spidey1",
@@ -221,25 +219,21 @@ curl -X PUT "https://api.cloud.ca/v1/users/[user-id]" \
Update a specific user. It is important to note that updating the list of roles will override the previous one. You will the `Users update` permission to execute this operation.
-Optional |
--------- | -----------
-`userName` *string* | The new username of the user. Should be unique across the organization.
-`firstName` *string* | The new first name of the user
-`lastName` *string* | The new last name of the user
-`email` *string* | The new email of the user. Should be unique across the organization.
-`roles` *Array[[Role](#roles)]* | The new list of system or environment roles to give to the user. This will override the previous list of roles. *required*: `id`
+Optional | Type | Description
+-------- | ---- | -----------
+`userName` | *string* | The new username of the user. Should be unique across the organization.
+`firstName` | *string* | The new first name of the user
+`lastName` | *string* | The new last name of the user
+`email` | *string* | The new email of the user. Should be unique across the organization.
+`roles` | *Array[[Role](#roles)]* | The new list of system or environment roles to give to the user. This will override the previous list of roles. *required*: `id`
##### Returns
The responses' `data` field contains the updated [user](#users).
-
-
-
-
### Delete user
-`DELETE /users/:id`
+DELETE `/users/:id`
```shell
# Delete a user
@@ -251,14 +245,9 @@ curl "https://api.cloud.ca/v1/users/[user-id]" \
Delete a specific user. You will need the `Delete an existing user` permission to execute this operation.
-
-
-
-
### Unlock user
-`POST /users/:id/unlock`
-
+POST `/users/:id/unlock`
```shell
# Unlock a user that was locked from the system
diff --git a/source/includes/administration/_environments.md b/content/204-environments.md
similarity index 59%
rename from source/includes/administration/_environments.md
rename to content/204-environments.md
index 09b1433a77b..96bc756a38d 100644
--- a/source/includes/administration/_environments.md
+++ b/content/204-environments.md
@@ -1,13 +1,15 @@
+---
+weight: 204
+title: Environments
+---
+
## Environments
Environments allow you to manage resources of a specific service and to manage your [users'](#users) access to them. With [environment roles](#roles), you have tight control of what a user is allowed to do in your environment. A general use case of environments is to split your resources into different [deployment environments](https://en.wikipedia.org/wiki/Deployment_environment) (e.g. dev, staging and production). The advantage is that resources of different deployments are isolated from each other and you can restrict user access to your most critical resources.
-
-
-
### List environments
-`GET /environments`
+GET `/environments`
```shell
# Retrieve visible environments
@@ -16,6 +18,7 @@ curl "https://api.cloud.ca/v1/environments" \
# Response body example
```
+
```json
{
"data": [{
@@ -45,6 +48,7 @@ curl "https://api.cloud.ca/v1/environments" \
}]
}
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
environments, err := ccaClient.Environments.List()
@@ -52,25 +56,20 @@ environments, err := ccaClient.Environments.List()
List environments that you have access to. It will only return environments that you're member of if you're not assigned the `Environments read` permission.
-
-Attributes |
----------- | -----------
-`id` *UUID* | The id of the environment
-`name` *string* | The name of the environment
-`description` *string* | The description of the environment
-`membership` *string* | Type of membership of the environment. (e.g. ALL_ORG_USERS, MANY_USERS)
-`creationDate` *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the environment was created
-`organization` *[Organization](#organizations)* | The organization of the environment *includes*: `id`, `name`, `entryPoint`
-`serviceConnection` *[ServiceConnection](#service-connections)* | The service connection of the environment *includes*: `id`, `name`
-`roles` *Array[[Role](#roles)]* | The roles of the environment with all the users assigned to them. *includes*: `id`, `name`, `isDefault`, `users.id`, `users.name`
-
-
-
-
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the environment
+`name` | *string* | The name of the environment
+`description` | *string* | The description of the environment
+`membership` | *string* | Type of membership of the environment. (e.g. ALL_ORG_USERS, MANY_USERS)
+`creationDate` | *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the environment was created
+`organization` | *[Organization](#organizations)* | The organization of the environment *includes*: `id`, `name`, `entryPoint`
+`serviceConnection` | *[ServiceConnection](#service-connections)* | The service connection of the environment *includes*: `id`, `name`
+`roles` | *Array[[Role](#roles)]* | The roles of the environment with all the users assigned to them. *includes*: `id`, `name`, `isDefault`, `users.id`, `users.name`
### Retrieve an environment
-`GET /environments/:id`
+GET `/environments/:id`
```shell
# Retrieve visible environment
@@ -80,6 +79,7 @@ curl "https://api.cloud.ca/v1/environment/[environment-id]" \
# Response body example
```
+
```json
{
"data": {
@@ -113,6 +113,7 @@ curl "https://api.cloud.ca/v1/environment/[environment-id]" \
}
}
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
environment, err := ccaClient.Environments.Get("[environment-id]")
@@ -120,24 +121,21 @@ environment, err := ccaClient.Environments.Get("[environment-id]")
Retrieve an environment you have access to. You can always retrieve environments that you're member of but to access other environments you will need the `Environments read` permission.
-Attributes |
----------- | -----------
-`id` *UUID* | The id of the environment
-`name` *string* | The name of the environment
-`description` *string* | The description of the environment
-`membership` *string* | Type of membership of the environment. (e.g. ALL_ORG_USERS, MANY_USERS)
-`creationDate` *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the environment was created
-`organization` *[Organization](#organizations)* | The organization of the environment *includes*: `id`, `name`, `entryPoint`
-`serviceConnection` *[ServiceConnection](#service-connections)* | The service connection of the environment *includes*: `id`, `name`
-`users` *Array[[User](#users)]* | The users that are members of the environment *includes*: `id`, `username`
-`roles` *Array[[Role](#roles)]* | The roles of the environment with all the users assigned to them. *includes*: `id`, `name`, `isDefault`, `users.id`, `users.name`
-
-
-
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the environment
+`name` | *string* | The name of the environment
+`description` | *string* | The description of the environment
+`membership` | *string* | Type of membership of the environment. (e.g. ALL_ORG_USERS, MANY_USERS)
+`creationDate` | *string* | The date in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601) that the environment was created
+`organization` | *[Organization](#organizations)* | The organization of the environment *includes*: `id`, `name`, `entryPoint`
+`serviceConnection` | *[ServiceConnection](#service-connections)* | The service connection of the environment *includes*: `id`, `name`
+`users` | *Array[[User](#users)]* | The users that are members of the environment *includes*: `id`, `username`
+`roles` | *Array[[Role](#roles)]* | The roles of the environment with all the users assigned to them. *includes*: `id`, `name`, `isDefault`, `users.id`, `users.name`
### Create environment
-`POST /environments`
+POST `/environments`
```shell
# Create an environment
@@ -149,6 +147,7 @@ curl -X POST "https://api.cloud.ca/v1/environments" \
# Request body example
```
+
```json
{
"name": "glados",
@@ -169,6 +168,7 @@ curl -X POST "https://api.cloud.ca/v1/environments" \
}]
}
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
environment, err := ccaClient.Environments.Create(configuration.Environment{
@@ -188,6 +188,7 @@ environment, err := ccaClient.Environments.Create(configuration.Environment{
}],
})
```
+
```dart
resource "cloudca_environment" "my_environment" {
service_code = "compute-qc"
@@ -198,32 +199,28 @@ resource "cloudca_environment" "my_environment" {
read_only_role = ["dr_strange","ancient_one"]
}
```
-Create a new environment in a specific service and organization. You will need the `Environments create` permission to execute this operation.
-Required |
--------- | -----------
-`name` *string* | The name of the new environment. Should be unique in the environment and only contain lower case characters, numbers, dashes and underscores.
-`description` *string* | The description of the new environment.
-`serviceConnection` *[ServiceConnection](#service-connections)* | The service connection that the environment should be created in *required*: `id`
+Create a new environment in a specific service and organization. You will need the `Environments create` permission to execute this operation.
-Optional |
--------- | -----------
-`organization` *[Organization](#organizations)* | The organization that the environment should be created in. *Defaults to your organization* *required*: `id`
-`membership` *string* | Type of membership of the environment. ALL_ORG_USERS will add every user in the organization to this environment with the default role. MANY_USERS will allow you to choose the users you want in the environment and assigned them specific roles. *Defaults to MANY_USERS*
-`roles` *Array[[Role](#roles)]* | The roles of the environment and the users assigned to them. Also, defines the default role of the environment. *required*: `name`, `users.id` *optional*: `isDefault`
+Required | Type | Description
+-------- | ---- | -----------
+`name` | *string* | The name of the new environment. Should be unique in the environment and only contain lower case characters, numbers, dashes and underscores.
+`description` | *string* | The description of the new environment.
+`serviceConnection` | *[ServiceConnection](#service-connections)* | The service connection that the environment should be created in *required*: `id`
+Optional | Type | Description
+-------- | ---- | -----------
+`organization` | *[Organization](#organizations)* | The organization that the environment should be created in. *Defaults to your organization* *required*: `id`
+`membership` | *string* | Type of membership of the environment. ALL_ORG_USERS will add every user in the organization to this environment with the default role. MANY_USERS will allow you to choose the users you want in the environment and assigned them specific roles. *Defaults to MANY_USERS*
+`roles` | *Array[[Role](#roles)]* | The roles of the environment and the users assigned to them. Also, defines the default role of the environment. *required*: `name`, `users.id` | *optional*: `isDefault`
-##### Returns
+**Returns**
The responses' `data` field contains the updated [environment](#environments).
-
-
-
-
### Update environment
-`PUT /environments/:id`
+PUT `/environments/:id`
```shell
# Update an environment
@@ -234,6 +231,7 @@ curl -X POST "https://api.cloud.ca/v1/environments/[environment-id]" \
# Request body example
```
+
```json
{
"name": "skynet-beta",
@@ -246,6 +244,7 @@ curl -X POST "https://api.cloud.ca/v1/environments/[environment-id]" \
}]
}
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
environment, err := ccaClient.Environments.Update(configuration.Environment{
@@ -260,38 +259,32 @@ environment, err := ccaClient.Environments.Update(configuration.Environment{
})
```
-
-Optional |
--------- | -----------
-`name` *string* | The updated name of the environment. Should be unique in the environment and only contain lower case characters, numbers, dashes and underscores.
-`description` *string* | The updated description of the environment
-`membership` *string* | Type of membership of the environment. ALL_ORG_USERS will add every user in the organization to this environment with the default role. MANY_USERS will allow you to choose the users you want in the environment and assigned them specific roles. *Defaults to MANY_USERS*
-`roles` *Array[[Role](#roles)]* | Update the users roles in the environment. Also, can also update the default role. *required*: `name`, `users.id` *optional*: `isDefault`
-
+Optional | Type | Description
+-------- | ---- | -----------
+`name` | *string* | The updated name of the environment. Should be unique in the environment and only contain lower case characters, numbers, dashes and underscores.
+`description` | *string* | The updated description of the environment
+`membership` | *string* | Type of membership of the environment. ALL_ORG_USERS will add every user in the organization to this environment with the default role. MANY_USERS will allow you to choose the users you want in the environment and assigned them specific roles. *Defaults to MANY_USERS*
+`roles` | *Array[[Role](#roles)]* | Update the users roles in the environment. Also, can also update the default role. *required*: `name`, `users.id` | *optional*: `isDefault`
You will need the `Environments update` permission to execute this operation.
-
-
-
### Delete environment
-`DELETE /environments/:id`
-
```shell
# Delete an environment
curl "https://api.cloud.ca/v1/environments/[environment-id]" \
-X DELETE -H "MC-Api-Key: your_api_key"
-
```
+
```go
ccaClient := cca.NewCcaClient("your_api_key")
deleted, err := ccaClient.Environments.Delete("[environment-id]")
```
+DELETE `/environments/:id`
-Delete a specific environment. You will need a [role](#roles) with the `Delete an existing environment ` permission to execute this operation.
+Delete a specific environment. You will need a [role](#roles) with the `Delete an existing environment` permission to execute this operation.
-Optional |
----------------------------|-------
-`ruleNumber` *int* | The relative position of this rule in its ACL
-`cidr` *CIDR* | The network addresses targeted by this rule
-`action` *string* | What to do with traffic matched by this rule. Either Allow or Deny
-`protocol` *string* | The protocols targeted by this rule. TCP, UDP, ICMP, or ALL
-`trafficType` *string* | The direction of traffic targeted by this rule. Either Ingress or Egress
-`startPort` *int* | The start of the port range targeted by this rule
-`endPort` *int* | The end of the port range targeted by this rule
-`icmpType` *int* | ICMP message type
-`icmpCode` *int* | ICMP message error code
+Optional | Type | Description
+-------- | ---- | -----------
+`ruleNumber` | *int* | The relative position of this rule in its ACL
+`cidr` | *CIDR* | The network addresses targeted by this rule
+`action` | *string* | What to do with traffic matched by this rule. Either Allow or Deny
+`protocol` | *string* | The protocols targeted by this rule. TCP, UDP, ICMP, or ALL
+`trafficType` | *string* | The direction of traffic targeted by this rule. Either Ingress or Egress
+`startPort` | *int* | The start of the port range targeted by this rule
+`endPort` | *int* | The end of the port range targeted by this rule
+`icmpType` | *int* | ICMP message type
+`icmpCode` | *int* | ICMP message error code
-#### Delete a network ACL rule
+### Delete a network ACL rule
```shell
curl -X DELETE \
@@ -347,6 +350,6 @@ resources, _ := ccaClient.GetResources("compute-on", "test_area")
ccaResources := resources.(cloudca.Resources)
success, err := ccaResources.NetworkAclRules.Delete("3247167a-e7e7-11e3-9187-06669c0000ad")
```
-DELETE /services/:service_code/:environment_name/networkaclrules/:id
+DELETE/services/:service_code/:environment_name/networkaclrules/:id
Delete a specific rule of a network ACL.
diff --git a/source/includes/compute/_public_ips.md b/content/504-public-ips.md
similarity index 50%
rename from source/includes/compute/_public_ips.md
rename to content/504-public-ips.md
index ad0a5ba45ea..1f554227f7c 100644
--- a/source/includes/compute/_public_ips.md
+++ b/content/504-public-ips.md
@@ -1,6 +1,11 @@
-### Public IPs
+---
+weight: 504
+title: Public IPs
+---
-#### List public IPs
+## Public IPs
+
+### List public IPs
```shell
curl -X GET \
@@ -56,30 +61,30 @@ ccaResources := resources.(cloudca.Resources)
publicIps, _ := ccaResources.PublicIps.List()
```
-GET /services/:service_code/:environment_name/publicipaddresses
+GET/services/:service_code/:environment_name/publicipaddresses
List allocated public IP addresses.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the public IP
-`instances` *Array[[Instance](#instances)]* | The associated [instances](#instances) *includes*: `id`,`name`
-`ipAddress` *string* | The IP address (e.g. 208.80.154.224)
-`networkId` *UUID* | The associated [network](#networks) id
-`networkName` *string* | The associated [network](#networks) name
-`purposes` *Array[string]* | The list of purposes of the IP address.*Possible values:* `STATIC_NAT`, `PORT_FORWARDING`, `LOAD_BALANCING`, `SOURCE_NAT` or `SOURCE_NAT` and `VPN`
-`state` *string* | The state of the public IP
-`vpcId` *UUID* | The id of the [VPC](#vpcs)
-`vpcName` *string* | The name of the [VPC](#vpcs)
-`zoneId` *UUID* | The id of the [zone](#zones)
-`zoneName` *string* | The name of the [zone](#zones)
+Attributes | Type | Description
+---------- | ---- | -----------
+`id` | *UUID* | The id of the public IP
+`instances` | *Array[[Instance](#instances)]* | The associated [instances](#instances) *includes*: `id`,`name`
+`ipAddress` | *string* | The IP address (e.g. 208.80.154.224)
+`networkId` | *UUID* | The associated [network](#networks) id
+`networkName` | *string* | The associated [network](#networks) name
+`purposes` | *Array[string]* | The list of purposes of the IP address.*Possible values:* `STATIC_NAT`, `PORT_FORWARDING`, `LOAD_BALANCING`, `SOURCE_NAT` or `SOURCE_NAT` and `VPN`
+`state` | *string* | The state of the public IP
+`vpcId` | *UUID* | The id of the [VPC](#vpcs)
+`vpcName` | *string* | The name of the [VPC](#vpcs)
+`zoneId` | *UUID* | The id of the [zone](#zones)
+`zoneName` | *string* | The name of the [zone](#zones)
Query Parameters |
----------- | -----
-`vpc_id` *UUID* | Filter the list to only retrieve the public IPs in a specific [VPC](#vpcs)
-`instance_id` *UUID* | Filter the list to only retrieve the public IPs associated to a specific [instance](#instances)
+--------------- | ---- | ------------
+`vpc_id` | *UUID* | Filter the list to only retrieve the public IPs in a specific [VPC](#vpcs)
+`instance_id` | *UUID* | Filter the list to only retrieve the public IPs associated to a specific [instance](#instances)
-#### Retrieve a public IP
+### Retrieve a public IP
```shell
curl -X GET -H "MC-Api-Key: your_api_key"
@@ -109,25 +114,25 @@ ccaResources := resources.(cloudca.Resources)
publicIp, _ := ccaResources.PublicIps.Get("10001e7d-b4ef-489b-836e-0619a383bc8d")
```
-GET /services/:service_code/:environment_name/publicipaddresses/:id
+GET/services/:service_code/:environment_name/publicipaddresses/:id
Retrieve a public IP address.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the public IP
-`instances` *Array[[Instance](#instances)]* | The associated [instances](#instances) *includes*: `id`,`name`
-`ipAddress` *string* | The IP address (e.g. 208.80.154.224)
-`networkId` *UUID* | The associated [network](#networks) id
-`networkName` *string* | The associated [network](#networks) name
-`purposes` *Array[string]* | The list of purposes of the IP address.*Possible values:* `STATIC_NAT`, `PORT_FORWARDING`, `LOAD_BALANCING`, `SOURCE_NAT` or `SOURCE_NAT` and `VPN`
-`state` *string* | The state of the public IP
-`vpcId` *UUID* | The id of the [VPC](#vpcs)
-`vpcName` *string* | The name of the [VPC](#vpcs)
-`zoneId` *UUID* | The id of the [zone](#zones)
-`zoneName` *string* | The name of the [zone](#zones)
-
-#### Acquire a public IP
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the public IP
+`instances` | *Array[[Instance](#instances)]* | The associated [instances](#instances) *includes*: `id`,`name`
+`ipAddress` | *string* | The IP address (e.g. 208.80.154.224)
+`networkId` | *UUID* | The associated [network](#networks) id
+`networkName` | *string* | The associated [network](#networks) name
+`purposes` | *Array[string]* | The list of purposes of the IP address.*Possible values:* `STATIC_NAT`, `PORT_FORWARDING`, `LOAD_BALANCING`, `SOURCE_NAT` or `SOURCE_NAT` and `VPN`
+`state` | *string* | The state of the public IP
+`vpcId` | *UUID* | The id of the [VPC](#vpcs)
+`vpcName` | *string* | The name of the [VPC](#vpcs)
+`zoneId` | *UUID* | The id of the [zone](#zones)
+`zoneName` | *string* | The name of the [zone](#zones)
+
+### Acquire a public IP
```shell
curl -X POST \
@@ -144,16 +149,16 @@ curl -X POST \
}
```
-POST /services/:service_code/:environment_name/publicipaddresses
+POST/services/:service_code/:environment_name/publicipaddresses
Acquire a public IP address for a [VPC](#vpcs).
-Required |
----------- | -----
-`vpcId` *UUID* | The id of the [VPC](#vpcs) where to acquire the public IP
+Required | Type | Description
+-------------- | ---- | ------------
+`vpcId` | *UUID* | The id of the [VPC](#vpcs) where to acquire the public IP
-#### Release a public IP
+### Release a public IP
```shell
curl -X DELETE \
@@ -161,11 +166,11 @@ curl -X DELETE \
"https://api.cloud.ca/v1/services/compute-on/test_area/publicipaddresses/a723b2b1-e343-4ea1-afe0-bf345a99a92b"
```
-DELETE /services/:service_code/:environment_name/publicipaddresses/:id
+DELETE/services/:service_code/:environment_name/publicipaddresses/:id
Release a public IP. When acquiring a public IP, you are not guaranteed to receive a previously owned public IP, so be careful when releasing public IPs.
-#### Enable static NAT
+### Enable static NAT
```shell
curl -X POST \
@@ -182,15 +187,15 @@ curl -X POST \
}
```
-POST /services/:service_code/:environment_name/publicipaddresses/:id?operation=enableStaticNat
+POST/services/:service_code/:environment_name/publicipaddresses/:id?operation=enableStaticNat
Enable static NAT on a public IP address.
-Required |
----------- | -----
-`privateIpId` *string* | The private IP id of the [instance](#instances) which is to be available on that IP. It can also be done on a secondary IP id.
+Required | Type | Description
+-------------- | ---- | ------------
+`privateIpId` | *string* | The private IP id of the [instance](#instances) which is to be available on that IP. It can also be done on a secondary IP id.
-#### Disable static NAT
+### Disable static NAT
```shell
curl -X POST \
@@ -199,6 +204,6 @@ curl -X POST \
```
-POST /services/:service_code/:environment_name/publicipaddresses/:id?operation=disableStaticNat
+POST/services/:service_code/:environment_name/publicipaddresses/:id?operation=disableStaticNat
Disable static NAT on that public IP.
diff --git a/source/includes/compute/_port_forwarding_rules.md b/content/505-port-forwarding-rules.md
similarity index 51%
rename from source/includes/compute/_port_forwarding_rules.md
rename to content/505-port-forwarding-rules.md
index cb8219dbfc3..48cee22c6f7 100644
--- a/source/includes/compute/_port_forwarding_rules.md
+++ b/content/505-port-forwarding-rules.md
@@ -1,10 +1,15 @@
-### Port forwarding rules
+---
+weight: 505
+title: Port forwarding rules
+---
+
+## Port forwarding rules
Port forwarding allows traffic from external hosts to services offered by applications in your [VPCs](#vpcs). A port forwarding rule is a mapping of public IP ports to [private IP](#nics) ports (i.e. forwards traffic from a public IP to an instance).
-#### List port forwarding rules
+### List port forwarding rules
```shell
curl -X GET \
@@ -42,35 +47,35 @@ ccaResources := resources.(cloudca.Resources)
portForwardingRules, err := ccaResources.PortForwardingRules.List()
```
-GET /services/:service_code/:environment_name/portforwardingrules
+GET/services/:service_code/:environment_name/portforwardingrules
Retrieve a list of all port forwarding rules of an environment.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the port forwarding rule
-`ipAddress` *string* | The ip address of the [public IP](#public-ips) associated to this port forwarding rule
-`ipAddressId` *UUID* | The id of the [public IP](#public-ips) associated to this port forwarding rule
-`privatePortStart` *string* | The start of the private port range
-`privatePortEnd` *string* | The end of the private port range
-`publicPortStart` *string* | The start of the public port range
-`publicPortEnd` *string* | The end of the public port range
-`protocol` *string* | The protocol of the port forwarding rule (e.g. TCP, UDP)
-`instanceId` *UUID* | The id of the [instance](#instances) of the port forwarding rule
-`instanceName` *string* | The name of the [instance](#instances) of the port forwarding rule
-`networkId` *UUID* | The id of the [network](#networks) of the port forwarding rule
-`vpcId` *UUID* | The id of the [VPC](#vpcs) of the port forwarding rule
-`privateIp` *string* | The private IP address of the [instance](#instances) where the traffic will be forwarded
-`privateIpId` *UUID* | The id of private IP address of the [instance](#instances) where traffic will be forwarded
-
-Query Parameters |
----------- | -----
-`instance_id` *UUID* | Filter the list to only retrieve the port forwarding rules of an [instance](#instances)
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the port forwarding rule
+`ipAddress` | *string* | The ip address of the [public IP](#public-ips) associated to this port forwarding rule
+`ipAddressId` | *UUID* | The id of the [public IP](#public-ips) associated to this port forwarding rule
+`privatePortStart` | *string* | The start of the private port range
+`privatePortEnd` | *string* | The end of the private port range
+`publicPortStart` | *string* | The start of the public port range
+`publicPortEnd` | *string* | The end of the public port range
+`protocol` | *string* | The protocol of the port forwarding rule (e.g. TCP, UDP)
+`instanceId` | *UUID* | The id of the [instance](#instances) of the port forwarding rule
+`instanceName` | *string* | The name of the [instance](#instances) of the port forwarding rule
+`networkId` | *UUID* | The id of the [network](#networks) of the port forwarding rule
+`vpcId` | *UUID* | The id of the [VPC](#vpcs) of the port forwarding rule
+`privateIp` | *string* | The private IP address of the [instance](#instances) where the traffic will be forwarded
+`privateIpId` | *UUID* | The id of private IP address of the [instance](#instances) where traffic will be forwarded
+
+Query Parameters | Type | Description
+---------------- | ---- | -----------
+`instance_id` | *UUID* | Filter the list to only retrieve the port forwarding rules of an [instance](#instances)
-#### Retrieve a port forwarding rule
+### Retrieve a port forwarding rule
```shell
curl -X GET \
@@ -105,32 +110,32 @@ ccaResources := resources.(cloudca.Resources)
portForwardingRule, err := ccaResources.PortForwardingRule.Get("bf145d1e-7beb-42b8-bd2c-1a316aeb9aef")
```
-GET /services/:service_code/:environment_name/portforwardingrules/:id
+GET/services/:service_code/:environment_name/portforwardingrules/:id
Retrieve information about a port forwarding rule.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the port forwarding rule
-`ipAddress` *string* | The ip address of the [public IP](#public-ips) associated to this port forwarding rule
-`ipAddressId` *UUID* | The id of the [public IP](#public-ips) associated to this port forwarding rule
-`privatePortStart` *string* | The start of the private port range
-`privatePortEnd` *string* | The end of the private port range
-`publicPortStart` *string* | The start of the public port range
-`publicPortEnd` *string* | The end of the public port range
-`protocol` *string* | The protocol of the port forwarding rule (e.g. TCP, UDP)
-`instanceId` *UUID* | The id of the [instance](#instances) of the port forwarding rule
-`instanceName` *string* | The name of the [instance](#instances) of the port forwarding rule
-`networkId` *UUID* | The id of the [network](#networks) of the port forwarding rule
-`vpcId` *UUID* | The id of the [VPC](#vpcs) of the port forwarding rule
-`privateIp` *string* | The private IP address of the [instance](#instances) where requests will be forwarded
-`privateIpId` *UUID* | The id of private IP address of the [instance](#instances) where requests will be forwarded
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the port forwarding rule
+`ipAddress` | *string* | The ip address of the [public IP](#public-ips) associated to this port forwarding rule
+`ipAddressId` | *UUID* | The id of the [public IP](#public-ips) associated to this port forwarding rule
+`privatePortStart` | *string* | The start of the private port range
+`privatePortEnd` | *string* | The end of the private port range
+`publicPortStart` | *string* | The start of the public port range
+`publicPortEnd` | *string* | The end of the public port range
+`protocol` | *string* | The protocol of the port forwarding rule (e.g. TCP, UDP)
+`instanceId` | *UUID* | The id of the [instance](#instances) of the port forwarding rule
+`instanceName` | *string* | The name of the [instance](#instances) of the port forwarding rule
+`networkId` | *UUID* | The id of the [network](#networks) of the port forwarding rule
+`vpcId` | *UUID* | The id of the [VPC](#vpcs) of the port forwarding rule
+`privateIp` | *string* | The private IP address of the [instance](#instances) where requests will be forwarded
+`privateIpId` | *UUID* | The id of private IP address of the [instance](#instances) where requests will be forwarded
-#### Create a port forwarding rule
+### Create a port forwarding rule
```shell
@@ -182,29 +187,29 @@ resource "cloudca_port_forwarding_rule" "web_pfr" {
}
```
-POST /services/:service_code/:environment_name/portforwardingrules
+POST/services/:service_code/:environment_name/portforwardingrules
Create a port forwarding rule for a [public IP](#public-ips).
-Required |
------- | -----------
-`ipAddressId` *UUID* | The id of the [public IP](#public-ips) where the port forwarding should be created
-`protocol` *string* | The protocol (e.g. TCP, UDP) to forward
-`privatePortStart` *string* | The start of the private port range
-`privatePortEnd` *string* | The end of the private port range
-`publicPortStart` *string* | The start of the public port range
-`publicPortEnd` *string* | The end of the public port range
+Required | Type | Description
+------------ | ---- | -----------
+`ipAddressId` | *UUID* | The id of the [public IP](#public-ips) where the port forwarding should be created
+`protocol` | *string* | The protocol (e.g. TCP, UDP) to forward
+`privatePortStart` | *string* | The start of the private port range
+`privatePortEnd` | *string* | The end of the private port range
+`publicPortStart` | *string* | The start of the public port range
+`publicPortEnd` | *string* | The end of the public port range
-Optional |
------- | -----------
-`instanceId` *UUID* | The id of the [instance](#instances) that will have a port forwarded (it will use the default private port)
-`privateIpId` *UUID* | The id of the private IP to forward
+Optional | Type | Description
+------------ | ---- | -----------
+`instanceId` | *UUID* | The id of the [instance](#instances) that will have a port forwarded (it will use the default private port)
+`privateIpId` | *UUID* | The id of the private IP to forward
-#### Delete a port forwarding rule
+### Delete a port forwarding rule
```shell
@@ -221,6 +226,6 @@ ccaResources := resources.(cloudca.Resources)
success, err := ccaResources.PortForwardingRules.Delete("7d22b390-cbb3-4df6-96c6-52901ccb63c0")
```
-DELETE /services/:service_code/:environment_name/portforwardingrules/:id
+DELETE/services/:service_code/:environment_name/portforwardingrules/:id
Delete an existing port forwarding rule.
diff --git a/source/includes/compute/_load_balancer_rules.md b/content/506-load-balancer-rules.md
similarity index 51%
rename from source/includes/compute/_load_balancer_rules.md
rename to content/506-load-balancer-rules.md
index 6cc0ec805a8..fa82c7ebb4c 100644
--- a/source/includes/compute/_load_balancer_rules.md
+++ b/content/506-load-balancer-rules.md
@@ -1,8 +1,11 @@
-
+---
+weight: 506
+title: Load balancer rules
+---
-### Load balancer rules
+## Load balancer rules
-#### List load balancer rules
+### List load balancer rules
```shell
curl -X GET \
@@ -48,31 +51,30 @@ resources, _ := ccaClient.GetResources("compute-on", "test_area")
ccaResources := resources.(cloudca.Resources)
lbrs, err := ccaResources.LoadBalancerRules.List()
```
-GET /services/:service_code/:environment_name/loadbalancerrules?public_ip_id=:public_ip_id
+GET/services/:service_code/:environment_name/loadbalancerrules?public_ip_id=:public_ip_id
Retrieve a list of load balancer rules.
Attributes |
---------------------------|-------
-`id` *UUID* | The id of the load balancer rule
-`name` *string* | The name of the load balancer rule
-`networkId` *string* | The [network](#networks) id of the load balancer rule
-`publicIp` *UUID* | The [public IP](#public-ips) of this load balancer rule
-`publicIpId` *string* | The id of the [public IP](#public-ips) of this load balancer rule
-`publicPort` *int* | The public port of this load balancer rule
-`privatePort` *int* | The private port of this load balancer rule
-`algorithm` *string* | The algorithm to use for this load balancer rule
-`protocol` *string* | The protocol to load balance
-`stickinessMethod` *string* | The stickiness policy of the load balancer rule
-`stickinessPolicyParameters` *Map[string,string]* | The stickiness policy parameters of the load balancer rule
-`instanceIds` *Array[string]* | The ids of the instances being load balanced
-
-
-Query Parameters |
----------- | -----
-`public_ip_id` *UUID* | Filter the list to only retrieve the load balancer rules of a [public IP](#public-ips)
-
-#### Retrieve a load balancer rule
+`id` | *UUID* | The id of the load balancer rule
+`name` | *string* | The name of the load balancer rule
+`networkId` | *string* | The [network](#networks) id of the load balancer rule
+`publicIp` | *UUID* | The [public IP](#public-ips) of this load balancer rule
+`publicIpId` | *string* | The id of the [public IP](#public-ips) of this load balancer rule
+`publicPort` | *int* | The public port of this load balancer rule
+`privatePort` | *int* | The private port of this load balancer rule
+`algorithm` | *string* | The algorithm to use for this load balancer rule
+`protocol` | *string* | The protocol to load balance
+`stickinessMethod` | *string* | The stickiness policy of the load balancer rule
+`stickinessPolicyParameters` | *Map[string,string]* | The stickiness policy parameters of the load balancer rule
+`instanceIds` | *Array[string]* | The ids of the instances being load balanced
+
+Query Parameters | Type | Description
+---------------- | ---- | -----------
+`public_ip_id` | *UUID* | Filter the list to only retrieve the load balancer rules of a [public IP](#public-ips)
+
+### Retrieve a load balancer rule
```shell
curl -X GET \
@@ -112,26 +114,26 @@ resources, _ := ccaClient.GetResources("compute-on", "test_area")
ccaResources := resources.(cloudca.Resources)
lbr, err := ccaResources.LoadBalancerRules.Get("736d0c2e-d6b5-43fc-bcf0-732fce9a509e")
```
-GET /services/:service_code/:environment_name/loadbalancerrules/:id
+GET/services/:service_code/:environment_name/loadbalancerrules/:id
Retrieve a specific load balancer rule by its id.
-Attributes |
----------------------------|-------
-`id` *UUID* | The id of the load balancer rule
-`name` *string* | The name of the load balancer rule
-`networkId` *string* | The [network](#networks) id of the load balancer rule
-`publicIp` *UUID* | The [public IP](#public-ips) of this load balancer rule
-`publicIpId` *string* | The id of the [public IP](#public-ips) of this load balancer rule
-`publicPort` *int* | The public port of this load balancer rule
-`privatePort` *int* | The private port of this load balancer rule
-`algorithm` *string* | The algorithm to use for this load balancer rule
-`protocol` *string* | The protocol to load balance
-`stickinessMethod` *string* | The stickiness policy of the load balancer rule
-`stickinessPolicyParameters` *Map[string,string]* | The stickiness policy parameters of the load balancer rule
-`instanceIds` *Array[string]* | The ids of the instances being load balanced
-
-#### Create a load balancer rule
+Attributes | |
+-------------|--------------|-------
+`id` | *UUID* | The id of the load balancer rule
+`name` | *string* | The name of the load balancer rule
+`networkId` | *string* | The [network](#networks) id of the load balancer rule
+`publicIp` | *UUID* | The [public IP](#public-ips) of this load balancer rule
+`publicIpId` | *string* | The id of the [public IP](#public-ips) of this load balancer rule
+`publicPort` | *int* | The public port of this load balancer rule
+`privatePort` | *int* | The private port of this load balancer rule
+`algorithm` | *string* | The algorithm to use for this load balancer rule
+`protocol` | *string* | The protocol to load balance
+`stickinessMethod` | *string* | The stickiness policy of the load balancer rule
+`stickinessPolicyParameters` | *Map[string,string]* | The stickiness policy parameters of the load balancer rule
+`instanceIds` | *Array[string]* | The ids of the instances being load balanced
+
+### Create a load balancer rule
```shell
curl -X POST \
@@ -195,56 +197,56 @@ resource "cloudca_load_balancer_rule" "lbr" {
}
}
```
-POST /services/:service_code/:environment_name/loadbalancerrules
+POST/services/:service_code/:environment_name/loadbalancerrules
Create a new load balancer rule associated to a public IP.
-Required |
----------------------------|-------
-`name` *string* | The name of the load balancer rule
-`publicIpId` *string* | The id of the [public IP](#public-ips) of this load balancer rule
-`publicPort` *int* | The public port of this load balancer rule
-`privatePort` *int* | The private port of this load balancer rule
-`algorithm` *string* | The algorithm to use for this load balancer rule (roundrobin, leastconn or source)
-`protocol` *string* | The protocol to load balance (TCP, UDP or TCP-PROXY)
+Required | |
+----------|-----------------|-------
+`name` | *string* | The name of the load balancer rule
+`publicIpId` | *string* | The id of the [public IP](#public-ips) of this load balancer rule
+`publicPort` | *int* | The public port of this load balancer rule
+`privatePort` | *int* | The private port of this load balancer rule
+`algorithm` | *string* | The algorithm to use for this load balancer rule (roundrobin, leastconn or source)
+`protocol` | *string* | The protocol to load balance (TCP, UDP or TCP-PROXY)
Optional (required if [public IP](#public-ips) already assigned a [network](#networks)) |
---------------------------|-------
-`networkId` *string* | The [network](#networks) id of the load balancer rule
+`networkId` | *string* | The [network](#networks) id of the load balancer rule
Optional |
---------------------------|-------
-`stickinessMethod` *string* | The stickiness policy of the load balancer rule
-`stickinessPolicyParameters` *Map[string, object]* | The stickiness policy parameters of the load balancer rule
-`instanceIds` *Array[string]* | The ids of the instances being load balanced
-`sslCertificateId` *UUID* | The id of the SSL certificate for the load balancer rule. Can only be used with SSL protocol.
+`stickinessMethod` | *string* | The stickiness policy of the load balancer rule
+`stickinessPolicyParameters` | *Map[string, object]* | The stickiness policy parameters of the load balancer rule
+`instanceIds` | *Array[string]* | The ids of the instances being load balanced
+`sslCertificateId` | *UUID* | The id of the SSL certificate for the load balancer rule. Can only be used with SSL protocol.
LbCookie parameters |
---------------------------|-------
-`cookieName` *string* | Name of the cookie to be inserted by the load balancer for load balancing
-`mode` *string* | rewrite, insert or prefix. rewrite: This keyword indicates that the cookie will be provided by the server and that the load balancer will have to modify its value to set the server's identifier in it. insert: This keyword indicates that the persistence cookie will have to be inserted by the load balancer in server responses if the client did not already have a cookie that would have permitted it to access this server. prefix: This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed.
-`nocache` *boolean* | This option is recommended in conjunction with the insert mode when there is a cache between the client and the load balancer, as it ensures that a cacheable response will be tagged non-cacheable if a cookie needs to be inserted.
-`indirect` *boolean* | When this option is specified, no cookie will be emitted to a client which already has a valid one for the server which has processed the request.
-`postonly` *boolean* | This option ensures that cookie insertion will only be performed on responses to POST requests.
-`domain` *string* | This option allows to specify the domain at which a cookie is inserted.
+`cookieName` | *string* | Name of the cookie to be inserted by the load balancer for load balancing
+`mode` | *string* | rewrite, insert or prefix. rewrite: This keyword indicates that the cookie will be provided by the server and that the load balancer will have to modify its value to set the server's identifier in it. insert: This keyword indicates that the persistence cookie will have to be inserted by the load balancer in server responses if the client did not already have a cookie that would have permitted it to access this server. prefix: This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed.
+`nocache` | *boolean* | This option is recommended in conjunction with the insert mode when there is a cache between the client and the load balancer, as it ensures that a cacheable response will be tagged non-cacheable if a cookie needs to be inserted.
+`indirect` | *boolean* | When this option is specified, no cookie will be emitted to a client which already has a valid one for the server which has processed the request.
+`postonly` | *boolean* | This option ensures that cookie insertion will only be performed on responses to POST requests.
+`domain` | *string* | This option allows to specify the domain at which a cookie is inserted.
AppCookie parameters |
---------------------------|-------
-`cookieName` *string* | Name of the cookie to be inserted by the application for load balancing.
-`mode` *string* | This option allows to change the URL parser mode. `path-parameters`(default) will look for the appsession cookie in the path parameters. `query-parameters` will look for the appsession cookie in the query parameters.
-`length` *string* | The maximum number of characters to check in the cookie value.
-`holdtime` *boolean* | Time in milliseconds that the cookie should be saved.
-`requestLearn` *boolean* | If true, then it will be able to learn the cookie found in the request in case the server does not specify any in response.
-`prefix` *string* | If true, then it will match on the cookie prefix (or URL parameter prefix). The appsession value is the data following this prefix.
+`cookieName` | *string* | Name of the cookie to be inserted by the application for load balancing.
+`mode` | *string* | This option allows to change the URL parser mode. `path-parameters`(default) will look for the appsession cookie in the path parameters. `query-parameters` will look for the appsession cookie in the query parameters.
+`length` | *string* | The maximum number of characters to check in the cookie value.
+`holdtime` | *boolean* | Time in milliseconds that the cookie should be saved.
+`requestLearn` | *boolean* | If true, then it will be able to learn the cookie found in the request in case the server does not specify any in response.
+`prefix` | *string* | If true, then it will match on the cookie prefix (or URL parameter prefix). The appsession value is the data following this prefix.
SourceBased parameters |
---------------------------|-------
-`tableSize` *string* | The maximum number of entries that can be stored in the table.
-`expires` *string* | Defines the maximum duration of an entry in the table since it was last created, refreshed or matched. The expiration delay is defined using the standard time format, similarly as the various timeouts.
+`tableSize` | *string* | The maximum number of entries that can be stored in the table.
+`expires` | *string* | Defines the maximum duration of an entry in the table since it was last created, refreshed or matched. The expiration delay is defined using the standard time format, similarly as the various timeouts.
For more information, please consult section 4.2 of the HAProxy [configuration manual](https://cbonte.github.io/haproxy-dconv/1.5/configuration.html). ([AppCookie](https://cbonte.github.io/haproxy-dconv/1.5/configuration.html#4.2-appsession), [LbCookie](https://cbonte.github.io/haproxy-dconv/1.5/configuration.html#4.2-cookie), [SourceBased](https://cbonte.github.io/haproxy-dconv/1.5/configuration.html#4.2-stick-table))
-#### Update a load balancer rule
+### Update a load balancer rule
```shell
curl -X PUT \
@@ -268,16 +270,16 @@ lbr, err := ccaResources.LoadBalancerRules.Update("3247167a-e7e7-11e3-9187-06669
Algorithm: "leastconn",
})
```
-PUT /services/:service_code/:environment_name/loadbalancerrules/:id
+PUT/services/:service_code/:environment_name/loadbalancerrules/:id
Update a load balancer rule.
Optional |
---------------------------|-------
-`name` *string* | The name of the load balancer rule
-`algorithm` *string* | The algorithm of the load balancer rule (roundrobin, leastconn or source)
+`name` | *string* | The name of the load balancer rule
+`algorithm` | *string* | The algorithm of the load balancer rule (roundrobin, leastconn or source)
-#### Update instances of a load balancer rule
+### Update instances of a load balancer rule
```shell
curl -X PUT \
@@ -299,15 +301,15 @@ resources, _ := ccaClient.GetResources("compute-on", "test_area")
ccaResources := resources.(cloudca.Resources)
err := ccaResources.LoadBalancerRules.SetLoadBalancerRuleInstances("3247167a-e7e7-11e3-9187-06669c0000ad", []string {"95d034b5-b902-440c-b430-120efaed9caf"})
```
-PUT /services/:service_code/:environment_name/loadbalancerrules/:id?operation=updateInstances
+PUT/services/:service_code/:environment_name/loadbalancerrules/:id?operation=updateInstances
Update instances of a load balancer rule.
Required |
---------------------------|-------
-`instanceIds` *Array[String]* | The instances of the load balancer rule
+`instanceIds` | *Array[String]* | The instances of the load balancer rule
-#### Update stickiness policy of a load balancer rule
+### Update stickiness policy of a load balancer rule
```shell
curl -X PUT \
@@ -337,18 +339,18 @@ lbr, err := ccaResources.LoadBalancerRules.SetLoadBalancerRuleStickinessPolicy("
"holdtime": "3600000",
})
```
-PUT /services/:service_code/:environment_name/loadbalancerrules/:id?operation=updateStickiness
+PUT/services/:service_code/:environment_name/loadbalancerrules/:id?operation=updateStickiness
Update instances of a load balancer rule.
Required |
---------------------------|-------
-`stickinessMethod` *string* | The stickiness policy for the load balancer rule
-`stickinessPolicyParameters` *Map[String, String]* | The parameters for the stickiness policy of the load balancer rule
+`stickinessMethod` | *string* | The stickiness policy for the load balancer rule
+`stickinessPolicyParameters` | *Map[String, String]* | The parameters for the stickiness policy of the load balancer rule
See [Create a load balance rule](#create-a-load-balancer-rule) for stickiness policy parameters documentation.
-#### Delete a load balancer rule
+### Delete a load balancer rule
```shell
curl -X DELETE \
@@ -360,6 +362,6 @@ resources, _ := ccaClient.GetResources("compute-on", "test_area")
ccaResources := resources.(cloudca.Resources)
success, err := ccaResources.LoadBalancerRules.Delete("736d0c2e-d6b5-43fc-bcf0-732fce9a509e")
```
-DELETE /services/:service_code/:environment_name/loadbalancerrules/:id
+DELETE/services/:service_code/:environment_name/loadbalancerrules/:id
Delete a load balancer rule.
diff --git a/content/507-nics.md b/content/507-nics.md
new file mode 100644
index 00000000000..ed91ed937b7
--- /dev/null
+++ b/content/507-nics.md
@@ -0,0 +1,200 @@
+---
+weight: 507
+title: NICs
+---
+
+## NICs
+
+### List NICs
+
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/nics"
+
+# Example response:
+```
+```json
+{
+ "data": [{
+ "id": "fff1f45a-8350-4c87-be43-947b96d01ebd",
+ "name": "NIC-0",
+ "ipAddress": "10.169.253.165",
+ "isDefault": true,
+ "networkId": "d2243d4c-0dd8-4f8c-9ab4-4b1d285d5642",
+ "networkName": "Backend",
+ "gateway": "10.169.253.1",
+ "netmask": "255.255.255.0",
+ "instanceId": "b6145e8b-abd3ta-456c-832c-f3db86a6acfe",
+ "vpcId": "5aa9f5d7-55a9-43bf-bd2c-78a6bae1b267",
+ "vpcName": "default-vpc",
+ "secondaryIps": [
+ {
+ "id": "9c28e297-5d23-41a3-a167-34dc24f1df19",
+ "ipAddress": "10.169.253.124"
+ }
+ ]
+ }],
+ "metadata": {
+ "recordCount": 1
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/nics
+
+Retrieve a list of all NICs.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the NIC
+`name` | *string* | The name of the NIC
+`ipAddress` | *string* | The IP address of the NIC
+`isDefault` | *string* | true if it's the default NIC of the [instance](#instances) (i.e. it will be the private IP on the instance)
+`networkId` | *UUID* | The id of the [network](#networks) of the NIC
+`networkName` | *string* | The name of the [network](#networks) of the NIC
+`gateway` | *string* | The gateway of the [network](#networks) associated with the NIC
+`netmask` | *string* | The netmask of the [network](#networks) associated with the NIC
+`instanceId` | *string* | The id of the instance associated with the NIC
+`vpcId` | *string* | The id of the [VPC](#vpcs) associated with the NIC
+`vpcName` | *string* | The name of the [VPC](#vpcs) associated with the NIC
+`secondaryIps` | *SecondaryIP* | The list of secondary IPs of the NIC *includes:* `id`, `ipAddress`
+
+Query Parameters |
+-------------- | ---- | ------------
+`instance_id` | *UUID* | Filter the list to only retrieve the NICs of a specific [instance](#instances)
+`network_id` | *UUID* | Filter the list to only retrieve the NICs of a specific [network](#networks)
+
+
+
+
+
+### Retrieve a NIC
+
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/nics/fff1f45a-8350-4c87-be43-947b96d01ebd"
+
+# Example response:
+```
+```json
+{
+ "data": {
+ "id": "fff1f45a-8350-4c87-be43-947b96d01ebd",
+ "name": "NIC-0",
+ "ipAddress": "10.169.253.165",
+ "isDefault": true,
+ "networkId": "d2243d4c-0dd8-4f8c-9ab4-4b1d285d5642",
+ "networkName": "Backend",
+ "gateway": "10.169.253.1",
+ "netmask": "255.255.255.0",
+ "instanceId": "b6145e8b-abd3ta-456c-832c-f3db86a6acfe",
+ "vpcId": "5aa9f5d7-55a9-43bf-bd2c-78a6bae1b267",
+ "vpcName": "default-vpc",
+ "secondaryIps": [
+ {
+ "id": "9c28e297-5d23-41a3-a167-34dc24f1df19",
+ "ipAddress": "10.169.253.124"
+ }
+ ]
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/nics/:id
+
+Retrieve an existing NIC.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the NIC
+`name` | *string* | The name of the NIC
+`ipAddress` | *string* | The IP address of the NIC
+`isDefault` | *string* | true if it's the default NIC of the [instance](#instances) (i.e. it will be the private IP on the instance)
+`networkId` | *UUID* | The id of the [network](#networks) of the NIC
+`networkName` | *string* | The name of the [network](#networks) of the NIC
+`gateway` | *string* | The gateway of the [network](#networks) associated with the NIC
+`netmask` | *string* | The netmask of the [network](#networks) associated with the NIC
+`instanceId` | *string* | The id of the [instance](#instances) associated with the NIC
+`vpcId` | *string* | The id of the [VPC](#vpcs) associated with the NIC
+`vpcName` | *string* | The name of the [VPC](#vpcs) associated with the NIC
+`secondaryIps` | *SecondaryIP* | The list of secondary IPs of the NIC *includes:* `id`, `ipAddress`
+
+
+
+
+
+### Create a NIC
+
+
+```shell
+
+# Example:
+
+curl -X POST \
+ -H "Content-Type: application/json" \
+ -H "MC-Api-Key: your_api_key" \
+ -d "request_body" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/nics"
+
+# Request example:
+```
+```json
+{
+ "networkId": "d67e986d-fe04-4827-836e-1697ede8ed30",
+ "instanceId": "96330eea-4424-46ca-825c-82fdd051d8c3"
+}
+```
+
+
+POST/services/:service_code/:environment_name/nics
+
+Create a NIC for an [instance](#instances) in a specific network. You can only have one NIC per [network](#networks).
+
+Required | Type | Description
+------------ | ---- | -----------
+`networkId` | *string* | The id of the [network](#networks) where to create the NIC
+`instanceId` | *string* | The id of the [instance](#instances) where to attach the NIC
+
+
+
+
+
+### Delete a NIC
+
+
+```shell
+
+# Example:
+
+curl -X DELETE \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/nics"
+```
+
+DELETE/services/:service_code/:environment_name/nics/:id
+
+Delete an existing NIC. The NIC you're trying to delete must not be the default one.
+
+
+
+
+
+### Set a NIC as default
+
+
+```shell
+
+# Example:
+
+curl -X POST \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/nics/63ef1efe-225f-4e05-bc79-b3e457a041e2?operation=setDefault"
+```
+
+POST/services/:service_code/:environment_name/nics/:id?operation=setDefault
+
+Set an existing NIC as the default NIC of an [instance](#instances).
diff --git a/content/508-remote-access-vpns.md b/content/508-remote-access-vpns.md
new file mode 100644
index 00000000000..2581aecc251
--- /dev/null
+++ b/content/508-remote-access-vpns.md
@@ -0,0 +1,85 @@
+---
+weight: 508
+title: Remote access VPNs
+---
+
+## Remote access VPNs
+
+Remote access VPNs allow users to connect to [VPCs](#vpcs) through secure connections.
+
+### List remote access VPNs
+
+```shell
+curl -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/remoteaccessvpns"
+
+# Response example:
+```
+```json
+{
+ "data": [
+ {
+ "id": "10001e7d-b4ef-489b-836e-0619a383bc8d",
+ "publicIpAddress": "69.196.164.31",
+ "publicIpAddressId": "10001e7d-b4ef-489b-836e-0619a383bc8d",
+ "state": "Disabled"
+ },
+ {
+ "id": "8925406c-8051-467e-a0ca-c48caa5bf670",
+ "presharedKey": "Kwth4JYUfXXmtMG4X7vAwRPH",
+ "publicIpAddress": "69.196.164.223",
+ "publicIpAddressId": "8925406c-8051-467e-a0ca-c48caa5bf670",
+ "state": "Enabled"
+ }
+ ],
+ "metadata": {
+ "recordCount": 2
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/remoteaccessvpns
+
+List remote access VPNs.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the remote access VPN
+`presharedKey` | *string* | The VPN's preshared key
+`publicIpAddress` | *string* | The [public IP](#public-ips) (e.g. 208.80.154.224)
+`publicIpAddressId` | *string* | The id of the [public IP](#public-ips)
+`state` | *string* | The state. *Possible values:* `Enabled`, `Disabled.`
+
+Query Parameters |
+-------------- | ---- | ------------
+`vpc_id` | *UUID* | Filter the list to only retrieve the VPN information of a specific [VPC](#vpcs)
+
+### Retrieve a remote access VPN
+```shell
+curl -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/remoteaccessvpns/10001e7d-b4ef-489b-836e-0619a383bc8d"
+
+# Response example:
+```
+```json
+{
+ "data": {
+ "id": "10001e7d-b4ef-489b-836e-0619a383bc8d",
+ "publicIpAddress": "69.196.164.31",
+ "publicIpAddressId": "10001e7d-b4ef-489b-836e-0619a383bc8d",
+ "state": "Disabled"
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/remoteaccessvpns/:id
+
+Retrieve a remote access VPN.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the remote access VPN
+`presharedKey` | *string* | The VPN's preshared key
+`publicIpAddress` | *string* | The [public IP](#public-ips) (e.g. 208.80.154.224)
+`publicIpAddressId` | *string* | The id of the [public IP](#public-ips)
+`state` | *string* | The state. *Possible values:* `Enabled`, `Disabled.`
diff --git a/source/includes/compute/_vpn_users.md b/content/509-vpn-users.md
similarity index 51%
rename from source/includes/compute/_vpn_users.md
rename to content/509-vpn-users.md
index 4932eb1e31b..8e473fd66bd 100644
--- a/source/includes/compute/_vpn_users.md
+++ b/content/509-vpn-users.md
@@ -1,8 +1,14 @@
-### VPN users
+---
+weight: 509
+title: VPN users
+---
+
+## VPN users
VPN users are the accounts that are allowed to connect to [remote access VPNs](#remote-access-vpns).
-#### List VPN users
+### List VPN users
+
```shell
curl -X GET \
-H "MC-Api-Key: your_api_key" \
@@ -24,16 +30,16 @@ curl -X GET \
}
```
-GET /services/:service_code/:environment_name/vpnusers
+GET/services/:service_code/:environment_name/vpnusers
List VPN users.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the remote access VPN user
-`username` *string* | The VPN user's username
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the remote access VPN user
+`username` | *string* | The VPN user's username
-#### Retrieve a VPN user
+### Retrieve a VPN user
```shell
curl -X GET \
-H "MC-Api-Key: your_api_key" \
@@ -50,11 +56,11 @@ curl -X GET \
}
```
-GET /services/:service_code/:environment_name/vpnusers/:id
+GET/services/:service_code/:environment_name/vpnusers/:id
Retrieve a VPN user
-Attributes |
----------- | -----
-`id` *UUID* | The id of the remote access VPN user
-`username` *string* | The VPN user's username
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the remote access VPN user
+`username` | *string* | The VPN user's username
diff --git a/content/510-s2s-vpns.md b/content/510-s2s-vpns.md
new file mode 100644
index 00000000000..a8bca0db9a9
--- /dev/null
+++ b/content/510-s2s-vpns.md
@@ -0,0 +1,231 @@
+---
+weight: 510
+title: Site-to-site VPN
+---
+
+## Site-to-site VPN
+
+A site-to-site VPN allows multiple sites to establish a secure connection over the public network. In our case, we are talking about a secure connection between your VPC and another network (e.g. VPC, offices).
+
+
+
+### List site-to-site VPNs
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns"
+
+# Example:
+```
+```json
+{
+ "data": [
+ {
+ "id": "d49b2922-0581-4587-94df-6fe719327d0f",
+ "name": "stargate",
+ "state": "Connected",
+ "vpcId": "3fe7d82a-f4c4-4552-ac3b-787fdafed4e7",
+ "gateway":"19.19.19.19",
+ "cidr":"10.12.0.2/22",
+ "ipSecPsk": "WtOBS9GRux2XtJPtHY2TUvrv",
+ "ikeEncryptionAlgorithm": "3des",
+ "ikeHashAlgorithm": "sha1",
+ "ikeDhGroup":"modp1536",
+ "ikeLifetime":86400,
+ "espEncryptionAlgorithm":"3des",
+ "espHashAlgorithm":"sha1",
+ "espPerfectForwardSecrecy":"modp1536",
+ "espLifetime":3600,
+ "dpd": false,
+ "forceEncap": false
+ }
+ ],
+ "metadata": {
+ "recordCount": 1
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/sitetositevpns
+
+Retrieve a list of all site-to-site VPNs in an [environment](#environments)
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the site-to-site VPN
+`name` | *string* | The name of the site-to-site VPN
+`state` | *string* | The state of the site-to-site VPN. Can be Connected, Pending, Disconnected or Error. If disconnected, you can try to use the [reset](#reset-the-connection-of-a-site-to-site-vpn) operation
+`vpcId` | *UUID* | The VPC for which the site-to-site VPN was created.
+`gateway` | *string* | The gateway of the network you want to connect to. NOTE: you cannot use a gateway that has already been used by a site-to-site VPN in your environment
+`cidr` | *string* | CIDR of the network you want to connect to.
+`ipSecPsk` | *string* | IPSec pre-shared key. Must contain at least 10 alphanumeric characters.
+`ikeEncryptionAlgorithm` | *string* | The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
+`ikeHashAlgorithm` | *string* | The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5.
+`ikeDhGroup` | *string* | A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
+`ikeLifetime` | *integer* | The phase-1 lifetime of the security association in seconds.
+`espEncryptionAlgorithm` | *string* | Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
+`espHashAlgorithm` | *string* | Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5.
+`espPerfectForwardSecrecy` | *string* | Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
+`espLifetime` | *integer* | The phase-2 lifetime of the security association in seconds
+`dpd` | *boolean* | A method to detect an unavailable Internet Key Exchange (IKE) peer.
+`forceEncap` | *boolean* | Force encapsulation for NAT Traversal
+
+Query Parameters |
+-------------- | ---- | ------------
+`vpc_id` | *UUID* | Filter the list to only retrieve the site-to-site VPNs of a [VPC](#vpcs)
+
+
+
+### Retrieve a site-to-site VPN
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns/d49b2922-0581-4587-94df-6fe719327d0f"
+
+# Example:
+```
+```json
+{
+ "data": {
+ "id": "d49b2922-0581-4587-94df-6fe719327d0f",
+ "name": "stargate",
+ "state": "Connected",
+ "vpcId": "3fe7d82a-f4c4-4552-ac3b-787fdafed4e7",
+ "gateway":"19.19.19.19",
+ "cidr":"10.12.0.2/22",
+ "ipSecPsk": "WtOBS9GRux2XtJPtHY2TUvrv",
+ "ikeEncryptionAlgorithm": "3des",
+ "ikeHashAlgorithm": "sha1",
+ "ikeDhGroup":"modp1536",
+ "ikeLifetime":86400,
+ "espEncryptionAlgorithm":"3des",
+ "espHashAlgorithm":"sha1",
+ "espPerfectForwardSecrecy":"modp1536",
+ "espLifetime":3600,
+ "dpd": false,
+ "forceEncap": false
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/sitetositevpns/:id
+
+Retrieve information about a site-to-site VPN.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the site-to-site VPN
+`name` | *string* | The name of the site-to-site VPN
+`state` | *string* | The state of the site-to-site VPN. Can be Connected, Pending, Disconnected or Error. If disconnected, you can try to use the [reset](#reset-the-connection-of-a-site-to-site-vpn) operation
+`vpcId` | *UUID* | The VPC for which the site-to-site VPN was created.
+`gateway` | *string* | The gateway of the network you want to connect to. NOTE: you cannot use a gateway that has already been used by a site-to-site VPN in your environment
+`cidr` | *string* | CIDR of the network you want to connect to.
+`ipSecPsk` | *string* | IPSec pre-shared key. Must contain at least 10 alphanumeric characters.
+`ikeEncryptionAlgorithm` | *string* | The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
+`ikeHashAlgorithm` | *string* | The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5.
+`ikeDhGroup` | *string* | A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
+`ikeLifetime` | *integer* | The phase-1 lifetime of the security association in seconds.
+`espEncryptionAlgorithm` | *string* | Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
+`espHashAlgorithm` | *string* | Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5.
+`espPerfectForwardSecrecy` | *string* | Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
+`espLifetime` | *integer* | The phase-2 lifetime of the security association in seconds
+`dpd` | *boolean* | A method to detect an unavailable Internet Key Exchange (IKE) peer.
+`forceEncap` | *boolean* | Force encapsulation for NAT Traversal
+
+
+
+### Create a site-to-site VPN
+
+```shell
+
+# Here is the absolute minimum information required to create a new site-to-site VPN:
+
+curl -X POST \
+ -H "Content-Type: application/json" \
+ -H "MC-Api-Key: your_api_key" \
+ -d "request_body" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns"
+
+# Request should look like this
+```
+```json
+{
+ "name": "stargate",
+ "vpcId": "3fe7d82a-f4c4-4552-ac3b-787fdafed4e7",
+ "gateway":"19.19.19.19",
+ "cidr":"10.12.0.2/22",
+ "ipSecPsk": "WtOBS9GRux2XtJPtHY2TUvrv",
+ "ikeEncryptionAlgorithm": "3des",
+ "ikeHashAlgorithm": "sha1",
+ "ikeDhGroup":"modp1536",
+ "ikeLifetime":86400,
+ "espEncryptionAlgorithm":"3des",
+ "espHashAlgorithm":"sha1",
+ "espPerfectForwardSecrecy":"modp1536",
+ "espLifetime":3600,
+ "dpd": false,
+ "forceEncap": false
+ }
+```
+ POST/services/:service_code/:environment_name/sitetositevpns
+
+Create a site-to-site VPN
+
+Required | Type | Description
+------------ | ---- | -----------
+`name` | *string* | The name of the site-to-site VPN. Must be unique in the environment.
+`vpcId` | *UUID* | The VPC for which the site-to-site VPN was created.
+`gateway` | *string* | The gateway of the network you want to connect to. NOTE: you cannot use a gateway that has already been used by a site-to-site VPN in your environment
+`cidr` | *string* | CIDR of the network you want to connect to.
+`ipSecPsk` | *string* | IPSec pre-shared key. Must contain at least 10 alphanumeric characters.
+`ikeEncryptionAlgorithm` | *string* | The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
+`ikeHashAlgorithm` | *string* | The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5.
+`ikeLifetime` | *integer* | The phase-1 lifetime of the security association in seconds.
+`espEncryptionAlgorithm` | *string* | Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
+`espHashAlgorithm` | *string* | Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5.
+`espLifetime` | *integer* | The phase-2 lifetime of the security association in seconds
+
+Optional | Type | Description
+------------ | ---- | -----------
+`ikeDhGroup` | *string* | A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The supported options are Group-5 (1536-bit) and Group-2 (1024-bit).
+`espPerfectForwardSecrecy` | *string* | Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. The supported options are Group-5 (1536-bit) and Group-2 (1024-bit).
+`dpd` | *boolean* | A method to detect an unavailable Internet Key Exchange (IKE) peer. Defaults to false
+`forceEncap` | *boolean* | Force encapsulation for NAT Traversal. Defaults to false
+
+
+
+
+### Delete a site-to-site VPN
+
+
+```shell
+
+# Example:
+
+curl -X DELETE \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns/d49b2922-0581-4587-94df-6fe719327d0f"
+```
+
+DELETE/services/:service_code/:environment_name/sitetositevpns/:id
+
+Delete an existing site-to-site VPN.
+
+
+
+
+### Reset the connection of a site-to-site VPN
+
+```shell
+
+curl -X POST \
+ -H "Content-Type: application/json" \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns/ca86b14f-20db-463d-b58a-9d3fa5959af2?operation=reset"
+
+```
+ POST/services/:service_code/:environment_name/sitetositevpns/:id?operation=reset
+
+Reset a site-to-site VPN.
diff --git a/content/600-storage.md b/content/600-storage.md
new file mode 100644
index 00000000000..26adc411ece
--- /dev/null
+++ b/content/600-storage.md
@@ -0,0 +1,6 @@
+---
+weight: 600
+title: Storage
+---
+
+# Storage
diff --git a/source/includes/compute/_volumes.md b/content/601-volumes.md
similarity index 64%
rename from source/includes/compute/_volumes.md
rename to content/601-volumes.md
index 768c40912d0..78e46d36802 100644
--- a/source/includes/compute/_volumes.md
+++ b/content/601-volumes.md
@@ -1,10 +1,16 @@
-### Volumes
+---
+weight: 601
+title: Volumes
+---
+
+## Volumes
+
A volume is a virtual disk that provide storage for your instances. An OS volumes is created for every instance and it holds the OS of the instance. The size of this volume is usually pretty. A data volume is a volume that can be created and attached to an instance. It can also be detached and reattached to another instance.
-#### List volumes
+### List volumes
```shell
curl -X GET \
@@ -40,33 +46,33 @@ ccaResources := resources.(cloudca.Resources)
volumes, err := ccaResources.Volumes.List()
```
-GET /services/:service_code/:environment_name/volumes
+GET/services/:service_code/:environment_name/volumes
Retrieve a list of all volumes in an environment.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the volume
-`name` *string* | The name of the volume
-`type` *string* | The type of the volume. `os` if it is a root volume of an [instance](#instances), `data` otherwise
-`creationDate` *string* | The creation date of the volume
-`instanceId` *UUID* | The id of the [instance](#instances) to which the volume is attached
-`instanceName` *string* | The name of the [instance](#instances) to which the volume is attached
-`zoneId` *UUID* | The id of the [zone](#zones) where the volume was created
-`zoneName` *string* | The name of the [zone](#zones) where the volume was created
-`state` *string* | The state of the volume
-`sizeInGb` *int* | The size in gigabytes of the volume
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the volume
+`name` | *string* | The name of the volume
+`type` | *string* | The type of the volume. `os` if it is a root volume of an [instance](#instances), `data` otherwise
+`creationDate` | *string* | The creation date of the volume
+`instanceId` | *UUID* | The id of the [instance](#instances) to which the volume is attached
+`instanceName` | *string* | The name of the [instance](#instances) to which the volume is attached
+`zoneId` | *UUID* | The id of the [zone](#zones) where the volume was created
+`zoneName` | *string* | The name of the [zone](#zones) where the volume was created
+`state` | *string* | The state of the volume
+`sizeInGb` | *int* | The size in gigabytes of the volume
Query Parameters |
----------- | -----
-`type` *string* | Filter the list to only retrieve the volumes of a specific type (`os` or `data`)
-`instance_id` *UUID* | Filter the list to only retrieve the volumes of a specific [instance](#instances)
+-------------- | ---- | ------------
+`type` | *string* | Filter the list to only retrieve the volumes of a specific type (`os` or `data`)
+`instance_id` | *UUID* | Filter the list to only retrieve the volumes of a specific [instance](#instances)
-#### Retrieve a volume
+### Retrieve a volume
```shell
curl -X GET \
@@ -99,29 +105,29 @@ ccaResources := resources.(cloudca.Resources)
volumes, err := ccaResources.Volumes.Get("1bd672f4-b274-4371-a792-b0a6c6778cc7")
```
-GET /services/:service_code/:environment_name/volumes/:id
+GET/services/:service_code/:environment_name/volumes/:id
Retrieve information about an volume.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the volume
-`name` *string* | The name of the volume
-`type` *string* | The type of the volume. `os` if it is a root volume of an [instance](#instances), `data` otherwise
-`creationDate` *string* | The creation date of the volume
-`instanceId` *UUID* | The id of the [instance](#instances) to which the volume is attached
-`instanceName` *string* | The name of the [instance](#instances) to which the volume is attached
-`zoneId` *UUID* | The id of the [zone](#zones) where the volume was created
-`zoneName` *string* | The name of the [zone](#zones) where the volume was created
-`state` *string* | The state of the volume
-`sizeInGb` *int* | The size in gigabytes of the volume
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the volume
+`name` | *string* | The name of the volume
+`type` | *string* | The type of the volume. `os` if it is a root volume of an [instance](#instances), `data` otherwise
+`creationDate` | *string* | The creation date of the volume
+`instanceId` | *UUID* | The id of the [instance](#instances) to which the volume is attached
+`instanceName` | *string* | The name of the [instance](#instances) to which the volume is attached
+`zoneId` | *UUID* | The id of the [zone](#zones) where the volume was created
+`zoneName` | *string* | The name of the [zone](#zones) where the volume was created
+`state` | *string* | The state of the volume
+`sizeInGb` | *int* | The size in gigabytes of the volume
-#### Create a volume
+### Create a volume
```shell
curl -X POST \
@@ -159,12 +165,12 @@ resource "cloudca_volume" "data_volume" {
}
```
-POST /services/:service_code/:environment_name/volumes
+POST/services/:service_code/:environment_name/volumes
Create a volume in an environment. It will attached to the specified [instance](#instances).
-Required |
----------- | -----
+Required | Type | Description
+-------------- | ---- | ------------
name *string* | The name of the new volume
diskOfferingId *UUID* | The [disk offering](#disk-offerings) to use for the volume
instanceId *UUID* | The id of the [instance](#instances) to which the created volume will be attached
@@ -173,7 +179,7 @@ instanceId *UUID* | The id of the [instance](#instances) to which the create
-#### Delete a volume
+### Delete a volume
```shell
@@ -189,7 +195,7 @@ ccaResources := resources.(cloudca.Resources)
err := ccaResources.Volumes.Delete("e922e5fc-8fee-4688-ad93-c9ef5d7eb685")
```
-DELETE /services/:service_code/:environment_name/vpcs/:id
+DELETE/services/:service_code/:environment_name/vpcs/:id
Destroy an existing data volume. A volume can only be deleted if it's not attached to an [instance](#instances).
@@ -197,7 +203,7 @@ Destroy an existing data volume. A volume can only be deleted if it's not attach
-#### Attach a volume to an instance
+### Attach a volume to an instance
```shell
curl -X POST \
@@ -222,19 +228,19 @@ err := ccaResources.Volumes.AttachToInstance(cloudca.Volume{
})
```
-POST /services/:service_code/:environment_name/volumes/:id?operation=attachToInstance
+POST/services/:service_code/:environment_name/volumes/:id?operation=attachToInstance
Attach an existing data volume to an [instance](#instances).
-Required |
----------- | -----
+Required | Type | Description
+-------------- | ---- | ------------
instanceId *UUID* | The id of the [instance](#instances) to which the created volume should be attached
-#### Detach a volume from an instance
+### Detach a volume from an instance
```shell
curl -X POST \
@@ -251,6 +257,6 @@ err := ccaResources.Volumes.DetachFromInstance(cloudca.Volume{
})
```
-POST /services/:service_code/:environment_name/volumes/:id?operation=detachFromInstance
+POST/services/:service_code/:environment_name/volumes/:id?operation=detachFromInstance
Detach a data volume from an [instance](#instances).
diff --git a/content/602-snapshots.md b/content/602-snapshots.md
new file mode 100644
index 00000000000..7c9dfffe24f
--- /dev/null
+++ b/content/602-snapshots.md
@@ -0,0 +1,95 @@
+---
+weight: 602
+title: Snapshots
+---
+
+## Snapshots
+
+ A volume snapshot is a full image of a volume. They are often considered as backups, but in reality this is not 100% true since you have only the data written on disk. Volume Snapshots are typically used to derive new templates out of a running instance.
+
+
+
+### List snapshots
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/snapshots"
+
+# Example:
+```
+```json
+{
+ "data": [
+ {
+ "id": "33a27b8d-5a27-42a5-aec4-37606e372bda",
+ "name": "i-douglas-ADM_foo_20161116211009",
+ "state": "BackedUp",
+ "intervalType": "MANUAL",
+ "volumeId": "c779ca42-6966-41af-a7dc-23db4e41d4ee",
+ "volume": "ROOT-35545",
+ "volumeType": "ROOT-35545"
+ }
+ ],
+ "metadata": {
+ "recordCount": 1
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/snapshots
+
+Retrieve a list of all snapshots in an [environment](#environments)
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the snapshot
+`name` | *string* | The name of the snapshot
+`state` | *string* | The state of the snapshot
+`intervalType` | *string* | The interval type. `MANUAL` means that you created the snapshot manually (i.e. it's not a recurring snapshot)
+`volumeId` | *UUID* | The id of the [volume](#volumes) that was snapshotted
+`volume` | *string* | The name of the [volume](#volumes) that was snapshotted
+`volumeType` | *string* | The type of the [volume](#volumes) that was snapshotted
+
+Query Parameters |
+-------------- | ---- | ------------
+`volume_id` | *UUID* | Filter the list to only retrieve the snapshots of a specific [volume](#volumes)
+
+
+
+### Retrieve a snapshot
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/snapshots/1bd672f4-b274-4371-a792-b0a6c6778cc7"
+
+# Example:
+```
+```json
+{
+ "data": {
+ "id": "33a27b8d-5a27-42a5-aec4-37606e372bda",
+ "name": "i-douglas-ADM_foo_20161116211009",
+ "state": "BackedUp",
+ "intervalType": "MANUAL",
+ "volumeId": "c779ca42-6966-41af-a7dc-23db4e41d4ee",
+ "volume": "ROOT-35545",
+ "volumeType": "ROOT-35545"
+ }
+}
+```
+
+GET/services/:service_code/:environment_name/snapshots/:id
+
+Retrieve information about a snapshot.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the snapshot
+`name` | *string* | The name of the snapshot
+`state` | *string* | The state of the snapshot
+`intervalType` | *string* | The interval type. `MANUAL` means that you created the snapshot manually (i.e. it's not a recurring snapshot)
+`volumeId` | *UUID* | The id of the [volume](#volumes) that was snapshotted
+`volume` | *string* | The name of the [volume](#volumes) that was snapshotted
+`volumeType` | *string* | The type of the [volume](#volumes) that was snapshotted
diff --git a/source/includes/compute/_offerings.md b/content/700-offerings.md
similarity index 82%
rename from source/includes/compute/_offerings.md
rename to content/700-offerings.md
index 15b60100099..81127c59327 100644
--- a/source/includes/compute/_offerings.md
+++ b/content/700-offerings.md
@@ -1,3 +1,8 @@
-## Offerings
+---
+weight: 700
+title: Offerings
+---
+
+# Offerings
Offerings are what determine the characteristics of provisioned resources. There are 4 types of offerings : [compute](#compute-offerings), [disk](#disk-offerings), [VPC](#vpc-offerings) and [network](#network-offerings) offerings.
diff --git a/source/includes/compute/_vpc_offerings.md b/content/701-vpc-offerings.md
similarity index 65%
rename from source/includes/compute/_vpc_offerings.md
rename to content/701-vpc-offerings.md
index 14c09913fc4..d9ba00038f9 100644
--- a/source/includes/compute/_vpc_offerings.md
+++ b/content/701-vpc-offerings.md
@@ -1,8 +1,13 @@
-### VPC offerings
+---
+weight: 701
+title: VPC offerings
+---
+
+## VPC offerings
VPC offerings determine which services are available to provisioned [VPCs](#vpcs).
-#### List VPC offerings
+### List VPC offerings
```shell
curl -X GET \
@@ -42,18 +47,18 @@ ccaResources := resources.(cloudca.Resources)
vpcOfferings, _ := ccaResources.VpcOfferings.List()
```
-GET /services/:service_code/:environment_name/vpcofferings
+GET/services/:service_code/:environment_name/vpcofferings
Retrieve a list of available VPC offerings.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the VPC offering
-`name` *string* | The name of the VPC offering
-`services` *Array[string]* | The services provided by the offering
-`state` *string* | The state of the offering
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the VPC offering
+`name` | *string* | The name of the VPC offering
+`services` | *Array[string]* | The services provided by the offering
+`state` | *string* | The state of the offering
-#### Retrieve a VPC offering
+### Retrieve a VPC offering
```shell
curl -X GET \
@@ -88,13 +93,13 @@ ccaResources := resources.(cloudca.Resources)
vpcOfferings, _ := ccaResources.VpcOfferings.Get("41ac6ba0-6172-4bc4-bff6-b0831b91677c")
```
-GET /services/:service_code/:environment_name/vpcofferings/:id
+GET/services/:service_code/:environment_name/vpcofferings/:id
Retrieve a VPC offering.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the VPC offering
-`name` *string* | The name of the VPC offering
-`services` *Array[string]* | The services provided by the offering
-`state` *string* | The state of the offering
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the VPC offering
+`name` | *string* | The name of the VPC offering
+`services` | *Array[string]* | The services provided by the offering
+`state` | *string* | The state of the offering
diff --git a/source/includes/compute/_network_offerings.md b/content/702-network-offerings.md
similarity index 69%
rename from source/includes/compute/_network_offerings.md
rename to content/702-network-offerings.md
index a667bf5c948..f61f942e8b0 100644
--- a/source/includes/compute/_network_offerings.md
+++ b/content/702-network-offerings.md
@@ -1,8 +1,13 @@
-### Network offerings
+---
+weight: 702
+title: Network offerings
+---
+
+## Network offerings
Network offerings determine which services are available to each provisioned [network](#networks).
-#### List network offerings
+### List network offerings
```shell
curl -X GET \
@@ -57,18 +62,18 @@ ccaResources := resources.(cloudca.Resources)
networkOfferings, _ := ccaResources.NetworkOfferings.List()
```
-GET /services/:service_code/:environment_name/networkofferings
+GET/services/:service_code/:environment_name/networkofferings
Retrieve a list of available network offerings.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the network offering
-`name` *string* | The name of the network offering
-`services` *Array[string]* | The services provided by the offering
-`state` *string* | The state of the offering
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the network offering
+`name` | *string* | The name of the network offering
+`services` | *Array[string]* | The services provided by the offering
+`state` | *string* | The state of the offering
-#### Retrieve a network offering
+### Retrieve a network offering
```shell
curl -X GET \
@@ -103,13 +108,13 @@ ccaResources := resources.(cloudca.Resources)
networkOfferings, _ := ccaResources.NetworkOfferings.Get("89724d35-b69c-418c-be81-7d83fcfc9da9")
```
-GET /services/:service_code/:environment_name/networkofferings/:id
+GET/services/:service_code/:environment_name/networkofferings/:id
Retrieve a network offering.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the network offering
-`name` *string* | The name of the network offering
-`services` *Array[string]* | The services provided by the offering
-`state` *string* | The state of the offering
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the network offering
+`name` | *string* | The name of the network offering
+`services` | *Array[string]* | The services provided by the offering
+`state` | *string* | The state of the offering
diff --git a/content/703-compute-offerings.md b/content/703-compute-offerings.md
new file mode 100644
index 00000000000..e420ba84646
--- /dev/null
+++ b/content/703-compute-offerings.md
@@ -0,0 +1,103 @@
+---
+weight: 703
+title: Compute offerings
+---
+
+## Compute offerings
+
+Compute offerings determine the number of vCPUs and the size of the memory allocated to new [instances](#instances).
+
+### List compute offerings
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/computeofferings"
+
+# The above command returns JSON structured like this:
+```
+```json
+{
+ "data": [
+ {
+ "id": "40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f",
+ "name": "Custom CPU and memory",
+ "custom" : true,
+ "availableCpuCountValues": [1, 2, 4, 8],
+ "availableMemoryInMBValues": [1024, 2048, 4096, 8192],
+ "maxMemoryInMBToCpuRatio": 2048
+ },
+ {
+ "id": "1fb0caba-8ffb-4e77-8dcb-401170e15e0a",
+ "name": "1vCPU.1GB",
+ "cpuCount": 1,
+ "memoryInMB": 1024,
+ "custom" : false
+ }
+ ],
+ "metadata": {
+ "recordCount": 2
+ }
+}
+```
+```go
+resources, _ := ccaClient.GetResources("compute-on", "test_area")
+ccaResources := resources.(cloudca.Resources)
+computeOfferings, _ := ccaResources.ComputeOfferings.List()
+```
+
+GET/services/:service_code/:environment_name/computeofferings
+
+Retrieve a list of available compute offerings.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the compute offering
+`name` | *string* | The name of the compute offering
+`memoryInMB` | *int* | The amount of provisioned memory in MB
+`cpuCount` | *int* | The number of vCPUs available to the created [instance](#instances)
+`custom` | *boolean* | If true, the `cpuCount` and `memoryInMB` fields will be missing from the response and will be required on [instance create](#create-an-instance)
+`availableCpuCountValues` | *Array[integer]* | The list of valid cpu counts when used in the [create instance operation](#create-an-instance). Only present for custom offerings
+`availableMemoryInMBValues` | *Array[integer]* | The list of valid amounts of memory (in MB) that can be used in the [create instance operation](#create-an-instance). Only present for custom offerings
+`maxMemoryInMBToCpuRatio` | *integer* | The maximum ratio of memory (in MB) to number of CPU of an [instance](#instance) created with this offering. Only present for custom offerings.
+
+### Retrieve a compute offering
+
+```shell
+curl -X GET \
+ -H "MC-Api-Key: your_api_key" \
+ "https://api.cloud.ca/v1/services/compute-on/test_area/computeofferings/40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f"
+
+# The above command returns JSON structured like this:
+```
+```json
+{
+ "data": {
+ "id": "40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f",
+ "name": "1vCPU.512MB",
+ "cpuCount": 1,
+ "memoryInMB": 512,
+ "custom": false
+ }
+}
+```
+```go
+resources, _ := ccaClient.GetResources("compute-on", "test_area")
+ccaResources := resources.(cloudca.Resources)
+computeOfferings, _ := ccaResources.ComputeOfferings.Get("40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f")
+```
+
+GET/services/:service_code/:environment_name/computeofferings/:id
+
+Retrieve a compute offering.
+
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the compute offering
+`name` | *string* | The name of the compute offering
+`memoryInMB` | *int* | The amount of provisioned memory in MB
+`cpuCount` | *int* | The number of vCPUs available to the created [instance](#instances)
+`custom` | *boolean* | If true, the `cpuCount` and `memoryInMB` fields will be missing from the response and will be required on [instance create](#create-an-instance)
+`availableCpuCountValues` | *Array[integer]* | The list of valid cpu counts when used in the [create instance operation](#create-an-instance). Only present for custom offerings
+`availableMemoryInMBValues` | *Array[integer]* | The list of valid amounts of memory (in MB) that can be used in the [create instance operation](#create-an-instance). Only present for custom offerings
+`maxMemoryInMBToCpuRatio` | *integer* | The maximum ratio of memory (in MB) to number of CPU of an [instance](#instance) created with this offering. Only present for custom offerings.
diff --git a/source/includes/compute/_disk_offerings.md b/content/704-disk-offerings.md
similarity index 59%
rename from source/includes/compute/_disk_offerings.md
rename to content/704-disk-offerings.md
index 6f50a158f43..15a68817e2c 100644
--- a/source/includes/compute/_disk_offerings.md
+++ b/content/704-disk-offerings.md
@@ -1,8 +1,13 @@
-### Disk offerings
+---
+weight: 704
+title: Disk offerings
+---
+
+## Disk offerings
Disk offerings determine the size and the performance (IOPS) of [data volumes](#volumes).
-#### List disk offerings
+### List disk offerings
```shell
curl -X GET \
@@ -40,19 +45,19 @@ ccaResources := resources.(cloudca.Resources)
diskOfferings, _ := ccaResources.DiskOfferings.List()
```
-GET /services/:service_code/:environment_name/diskofferings
+GET/services/:service_code/:environment_name/diskofferings
Retrieve a list of available disk offerings.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the disk offering
-`name` *string* | The name of the disk offering
-`gbSize` *int* | The size of the [data volume](#volumes) in GB
-`customSize` *boolean* | If the offering supports custom size
-`customIops` *boolean* | If the offering supports custom IOPS
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the disk offering
+`name` | *string* | The name of the disk offering
+`gbSize` | *int* | The size of the [data volume](#volumes) in GB
+`customSize` | *boolean* | If the offering supports custom size
+`customIops` | *boolean* | If the offering supports custom IOPS
-#### Retrieve a disk offering
+### Retrieve a disk offering
```shell
curl -X GET \
@@ -78,14 +83,14 @@ ccaResources := resources.(cloudca.Resources)
diskOfferings, _ := ccaResources.DiskOfferings.Get("18bbab50-8d85-4b34-8361-0dc223ffd7e5")
```
-GET /services/:service_code/:environment_name/diskofferings/:id
+GET/services/:service_code/:environment_name/diskofferings/:id
Retrieve a disk offering.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the disk offering
-`name` *string* | The name of the disk offering
-`gbSize` *int* | The size of the [data volume](#volumes) in GB
-`customSize` *boolean* | If the offering supports custom size
-`customIops` *boolean* | If the offering supports custom IOPS
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the disk offering
+`name` | *string* | The name of the disk offering
+`gbSize` | *int* | The size of the [data volume](#volumes) in GB
+`customSize` | *boolean* | If the offering supports custom size
+`customIops` | *boolean* | If the offering supports custom IOPS
diff --git a/source/includes/compute/_zones.md b/content/800-zones.md
similarity index 66%
rename from source/includes/compute/_zones.md
rename to content/800-zones.md
index 2b390b75a71..2dc9f8c8cfd 100644
--- a/source/includes/compute/_zones.md
+++ b/content/800-zones.md
@@ -1,8 +1,13 @@
-## Zones
+---
+weight: 800
+title: Zones
+---
+
+# Zones
Each zone consists of physically isolated hosts, storage, and networking infrastructure. Like deploying workloads across regions, deploying workloads over multiple zones can help ensure high availability of applications.
-#### List zones
+### List zones
```shell
curl -X GET \
@@ -30,16 +35,16 @@ ccaResources := resources.(cloudca.Resources)
zones, _ := ccaResources.Zones.List()
```
-GET /services/:service_code/:environment_name/zones
+GET/services/:service_code/:environment_name/zones
Retrieve a list of available zones.
-Attributes |
----------- | -----
-`id` *UUID* | The id of the zone
-`name` *string* | The name of the zone
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the zone
+`name` | *string* | The name of the zone
-#### Retrieve a zone
+### Retrieve a zone
```shell
curl -X GET \
@@ -63,11 +68,11 @@ ccaResources := resources.(cloudca.Resources)
zones, _ := ccaResources.Zones.Get("ea901007-056b-4c50-bb3a-2dd635fce2ab")
```
-GET /services/:service_code/:environment_name/zones/:id
+GET/services/:service_code/:environment_name/zones/:id
Retrieve a zone
-Attributes |
----------- | -----
-`id` *UUID* | The id of the zone
-`name` *string* | The name of the zone
+Attributes | Type | Description
+-------------- | ---- | ------------
+`id` | *UUID* | The id of the zone
+`name` | *string* | The name of the zone
diff --git a/font-selection.json b/font-selection.json
deleted file mode 100755
index 5e78f5d8621..00000000000
--- a/font-selection.json
+++ /dev/null
@@ -1,148 +0,0 @@
-{
- "IcoMoonType": "selection",
- "icons": [
- {
- "icon": {
- "paths": [
- "M438.857 73.143q119.429 0 220.286 58.857t159.714 159.714 58.857 220.286-58.857 220.286-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857zM512 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.286-354.857q0-6.857-5.714-10.286-5.714-4.571-13.714-4.571h-125.714q-8 0-13.714 4.571-5.714 3.429-5.714 10.286l9.714 354.857q0 5.714 5.714 10t13.714 4.286h105.714q8 0 13.429-4.286t6-10z"
- ],
- "attrs": [],
- "isMulticolor": false,
- "tags": [
- "exclamation-circle"
- ],
- "defaultCode": 61546,
- "grid": 14
- },
- "attrs": [],
- "properties": {
- "id": 100,
- "order": 4,
- "prevSize": 28,
- "code": 58880,
- "name": "exclamation-sign",
- "ligatures": ""
- },
- "setIdx": 0,
- "iconIdx": 0
- },
- {
- "icon": {
- "paths": [
- "M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h109.714q8 0 13.143-5.143t5.143-13.143zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z"
- ],
- "attrs": [],
- "isMulticolor": false,
- "tags": [
- "info-circle"
- ],
- "defaultCode": 61530,
- "grid": 14
- },
- "attrs": [],
- "properties": {
- "id": 85,
- "order": 3,
- "name": "info-sign",
- "prevSize": 28,
- "code": 58882
- },
- "setIdx": 0,
- "iconIdx": 2
- },
- {
- "icon": {
- "paths": [
- "M733.714 419.429q0-16-10.286-26.286l-52-51.429q-10.857-10.857-25.714-10.857t-25.714 10.857l-233.143 232.571-129.143-129.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-52 51.429q-10.286 10.286-10.286 26.286 0 15.429 10.286 25.714l206.857 206.857q10.857 10.857 25.714 10.857 15.429 0 26.286-10.857l310.286-310.286q10.286-10.286 10.286-25.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z"
- ],
- "attrs": [],
- "isMulticolor": false,
- "tags": [
- "check-circle"
- ],
- "defaultCode": 61528,
- "grid": 14
- },
- "attrs": [],
- "properties": {
- "id": 83,
- "order": 9,
- "prevSize": 28,
- "code": 58886,
- "name": "ok-sign"
- },
- "setIdx": 0,
- "iconIdx": 6
- },
- {
- "icon": {
- "paths": [
- "M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z"
- ],
- "width": 951,
- "attrs": [],
- "isMulticolor": false,
- "tags": [
- "search"
- ],
- "defaultCode": 61442,
- "grid": 14
- },
- "attrs": [],
- "properties": {
- "id": 2,
- "order": 1,
- "prevSize": 28,
- "code": 58887,
- "name": "icon-search"
- },
- "setIdx": 0,
- "iconIdx": 7
- }
- ],
- "height": 1024,
- "metadata": {
- "name": "slate",
- "license": "SIL OFL 1.1"
- },
- "preferences": {
- "showGlyphs": true,
- "showQuickUse": true,
- "showQuickUse2": true,
- "showSVGs": true,
- "fontPref": {
- "prefix": "icon-",
- "metadata": {
- "fontFamily": "slate",
- "majorVersion": 1,
- "minorVersion": 0,
- "description": "Based on FontAwesome",
- "license": "SIL OFL 1.1"
- },
- "metrics": {
- "emSize": 1024,
- "baseline": 6.25,
- "whitespace": 50
- },
- "resetPoint": 58880,
- "showSelector": false,
- "selector": "class",
- "classSelector": ".icon",
- "showMetrics": false,
- "showMetadata": true,
- "showVersion": true,
- "ie7": false
- },
- "imagePref": {
- "prefix": "icon-",
- "png": true,
- "useClassSelector": true,
- "color": 4473924,
- "bgColor": 16777215
- },
- "historySize": 100,
- "showCodes": true,
- "gridSize": 16,
- "showLiga": false
- }
-}
diff --git a/go.mod b/go.mod
new file mode 100644
index 00000000000..32c34515c99
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,11 @@
+module github.com/bep/docuapi
+
+go 1.12
+
+require (
+ github.com/bep/empty-hugo-module v1.0.0 // indirect
+ github.com/jquery/jquery-dist v0.0.0-20191202185020-55b7d19f7bf1 // indirect
+ github.com/lord/slate v2.3.1+incompatible // indirect
+ github.com/olivernn/lunr.js v2.3.8+incompatible // indirect
+ github.com/slatedocs/slate v2.4.0+incompatible // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 00000000000..ccd00ebea7b
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,10 @@
+github.com/bep/empty-hugo-module v1.0.0 h1:aYc9RWea644CdYjg9zCy8nkVF4KjC3fwhUTvvcXXg8s=
+github.com/bep/empty-hugo-module v1.0.0/go.mod h1:whohinbSjMoFi/Skivj9kvdPs1tEgzYpZ4rXoQk/0/I=
+github.com/jquery/jquery-dist v0.0.0-20191202185020-55b7d19f7bf1 h1:5J/Uu1ow4Ldq50ZaN8fq9qkqDq6UJdjSoHy6oVBBSR4=
+github.com/jquery/jquery-dist v0.0.0-20191202185020-55b7d19f7bf1/go.mod h1:/lTfttEqFU0GWTaOOMIeNTzLGQ7yTIgyzjtkS/pYIoc=
+github.com/lord/slate v2.3.1+incompatible h1:uRy5iSKUWJdeozlS9RVWbeC1ZRyySLOCn20ve6iYw6A=
+github.com/lord/slate v2.3.1+incompatible/go.mod h1:ujwDH+XJN1hPpN4JfN8Cp65e5jk3DGf+Jz0/nbJxoUM=
+github.com/olivernn/lunr.js v2.3.8+incompatible h1:t9qfO9qpBCSEhjnvTHQtfOA8Ggwnvn5Y1JWFalyoPl0=
+github.com/olivernn/lunr.js v2.3.8+incompatible/go.mod h1:yEkQ1DUSMtNsn8n2CqvQXZd0ErWPEG8g9QRmblR+KS8=
+github.com/slatedocs/slate v2.4.0+incompatible h1:E8sca4Vmkm907VmW80ruTl18pkP/jPwVXB1WpF9C0AI=
+github.com/slatedocs/slate v2.4.0+incompatible/go.mod h1:n698aXLkExWIlF7prJey0Kq6wlKIKvj/stVb5oouZDM=
diff --git a/hugow b/hugow
new file mode 100755
index 00000000000..9d3e3ac94f7
--- /dev/null
+++ b/hugow
@@ -0,0 +1,437 @@
+#!/usr/bin/env sh
+# ------------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ------------------------------------------------------------------------------
+
+# ------------------------------------------------------------------------------
+# Hugo Wrapper (v1.3.0)
+#
+# Hugo Wrapper is a POSIX-style shell script which acts as a wrapper to download
+# and execute Hugo binary for your platform. It can be executed in variety of
+# Operating Systems and Command Shells. As a result, hugow has very minimal
+# number of dependencies:
+#
+# downloader: wget or curl
+# checksum : sha256sum or shasum or cksum
+# tarball : tar
+#
+# https://github.com/khos2ow/hugo-wrapper
+# ------------------------------------------------------------------------------
+
+set -e
+
+VERSION_NUMBER="v1.3.0"
+
+# hugo-wrapper command available flags
+get_version=""
+get_latest=false
+get_extended=false
+upgrade=false
+version=false
+show_help=false
+
+# hugo related commands to pass through the actual binary
+HUGO_ARGS=""
+
+while [ -n "$1" ]; do
+ case "$1" in
+ --get-version) get_version=$2; shift 2 ;;
+ --get-latest) get_latest=true; shift 1 ;;
+ --get-extended) get_extended=true; shift 1 ;;
+ --upgrade) upgrade=true; shift 1 ;;
+ --version) version=true; shift 1 ;;
+ -h | --help) show_help=true; shift 1 ;;
+
+ *) HUGO_ARGS="$HUGO_ARGS $1"; shift 1 ;;
+ esac
+done
+
+set -- $HUGO_ARGS
+
+if [ "$upgrade" = true ]; then
+ if [ "$get_extended" = true -o "$get_latest" = true -o -n "$get_version" ]; then
+ echo "Error: Flag --upgrade cannot be used together with --get-extended, --get-version or --get-latest"
+ exit 1
+ fi
+else
+ if [ "$get_latest" = true -a -n "$get_version" ]; then
+ echo "Error: Flags --get-version and --get-latest cannot be used together"
+ exit 1
+ fi
+fi
+
+# normalizing get_version
+get_version_base="$(echo "$get_version" | cut -d "/" -f1)"
+get_version_extended="$(echo "$get_version" | cut -d "/" -f2)"
+
+get_version="$get_version_base"
+
+if [ "$get_version_extended" = "extended" ]; then
+ get_extended=true
+fi
+
+# check which download command (wget or curl) is available.
+DOWNLOAD_COMMAND=""
+DOWNLOAD_OUTPUT=""
+DOWNLOAD_SILENT=""
+DOWNLOAD_REDIRECT=""
+
+if command -v wget > /dev/null; then
+ DOWNLOAD_COMMAND="wget"
+ DOWNLOAD_OUTPUT="-O"
+ DOWNLOAD_SILENT="-q"
+ DOWNLOAD_REDIRECT=""
+elif command -v curl > /dev/null; then
+ DOWNLOAD_COMMAND="curl"
+ DOWNLOAD_OUTPUT="-o"
+ DOWNLOAD_SILENT="-s"
+ DOWNLOAD_REDIRECT="-L"
+else
+ echo "Error: Unable to find 'wget' or 'curl' command."
+ exit 1
+fi
+
+# OS type
+os_type=""
+
+case "`uname -s`" in
+ Darwin) os_type="macOS" ;;
+ Linux) os_type="Linux" ;;
+ DragonFly) os_type="DragonFlyBSD" ;;
+ FreeBSD) os_type="FreeBSD" ;;
+ NetBSD) os_type="NetBSD" ;;
+ OpenBSD) os_type="OpenBSD" ;;
+ # CYGWIN* os_type="Windows" ;;
+ # MINGW*) os_type="Windows" ;;
+ # Windows_NT) os_type="Windows" ;;
+esac
+
+# OS architecture
+os_arch=""
+
+case "`uname -m`" in
+ x86) os_arch="32bit" ;;
+ x86_64) os_arch="64bit" ;;
+ amd64) os_arch="64bit" ;;
+ armv7l) os_arch="ARM" ;;
+ armv8) os_arch="ARM64" ;;
+esac
+
+if [ -z "$os_type" -o -z "$os_arch" ]; then
+ echo "Error: Unknown OS type or architecture"
+ exit 1
+fi
+
+# ------------------------------------------------------------------------------
+# traverses directory structure from process work directory to filesystem root
+# first directory with .hugo subdirectory is considered project base directory
+# ------------------------------------------------------------------------------
+find_basedir() {
+ if [ -z "$1" ]; then
+ echo "Error: Path not specified to find_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ]; do
+ if [ -d "$wdir"/.hugo ]; then
+ basedir=$wdir
+ break
+ fi
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ done
+ echo "${basedir}"
+}
+
+BASE_DIR=`find_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ echo "Error: Unable to find base directory."
+ exit 1
+fi
+
+if [ ! -d "$BASE_DIR/.hugo" ]; then
+ mkdir -p "$BASE_DIR/.hugo"
+else
+ if [ -r "$BASE_DIR/.hugo/hugo" -a ! -s "$BASE_DIR/.hugo/hugo" ]; then
+ rm "$BASE_DIR/.hugo/hugo"
+ fi
+ if [ -r "$BASE_DIR/.hugo/version" -a ! -s "$BASE_DIR/.hugo/version" ]; then
+ rm "$BASE_DIR/.hugo/version"
+ fi
+fi
+
+parse_json() {
+ local json="$1"
+ local field="$2"
+
+ if [ -z "$json" ]; then
+ echo ""
+ elif [ -z "$field" ]; then
+ echo ""
+ fi
+
+ temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $field`
+
+ echo ${temp##*|} | sed "s/${field}: //g"
+}
+
+perform_checksum() {
+ if [ -n "$1" ]; then
+ if command -v sha256sum > /dev/null; then
+ echo "$1" | sha256sum --check > /dev/null
+ elif command -v shasum > /dev/null; then
+ echo "$1" | shasum --algorithm 256 --check > /dev/null
+ elif command -v cksum > /dev/null; then
+ echo "$1" | cksum -a SHA256 -c > /dev/null
+ else
+ echo "Error: cannot find any checksum command"
+ exit 1
+ fi
+ fi
+}
+
+remove_file() {
+ if [ -n "$1" -a "$1" != "/" -a -f "$1" -a -r "$1" ] ; then
+ rm "$1"
+ fi
+}
+
+download_version() {
+ local versionToDownload="$1"
+ local isExtended="$2"
+
+ if [ -n "$versionToDownload" ]; then
+ local majorVersion=`echo ${versionToDownload} | cut -d. -f1`
+ local minorVersion=`echo ${versionToDownload} | cut -d. -f2`
+ local filenamePrefix="hugo"
+ local checksumFilenamePrefix="${filenamePrefix}"
+ local versionDownloadSuffix=""
+
+ if [ "$isExtended" = true ]; then
+ if [ "$majorVersion" -eq 0 -a "$minorVersion" -lt 56 ] ; then
+ checksumFilenamePrefix="hugo_extended"
+ fi
+
+ filenamePrefix="hugo_extended"
+ versionDownloadSuffix="/extended"
+ fi
+
+ if [ "$versionToDownload" = "LATEST" ]; then
+ latest_release=`$DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT ${DOWNLOAD_OUTPUT}- https://api.github.com/repos/gohugoio/hugo/releases/latest`
+ versionToDownload=`parse_json "$latest_release" "tag_name"`
+ fi
+
+ # strip down 'v' from begining of the string if exists
+ versionToDownload=`echo $versionToDownload | sed -ne 's/[^0-9]*\(\([0-9]*\.\)\{0,4\}[0-9]*\(\/extended\)*\).*/\1/p'`
+
+ printf "downloading hugo binary version v${versionToDownload}${versionDownloadSuffix} ... "
+
+ # download for specific OS and architecture
+ local binaryUrl="https://github.com/gohugoio/hugo/releases/download/v${versionToDownload}/${filenamePrefix}_${versionToDownload}_${os_type}-${os_arch}.tar.gz"
+ local checksumUrl="https://github.com/gohugoio/hugo/releases/download/v${versionToDownload}/${checksumFilenamePrefix}_${versionToDownload}_checksums.txt"
+
+ local tarballName="${filenamePrefix}_${versionToDownload}_${os_type}-${os_arch}.tar.gz"
+ local tarballPath="$BASE_DIR/.hugo/${tarballName}"
+ local checksumName="checksum.txt"
+ local checksumPath="$BASE_DIR/.hugo/${checksumName}"
+
+ $DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT $DOWNLOAD_OUTPUT "$tarballPath" "$binaryUrl" &
+ $DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT $DOWNLOAD_OUTPUT "$checksumPath" "$checksumUrl" &
+ wait
+
+ if [ -s "$tarballPath" -a -s "$checksumPath" ]; then
+ printf "[done]\n"
+ else
+ printf "[failed]\n"
+ remove_file "$checksumPath"
+ remove_file "$tarballPath"
+ exit 1
+ fi
+
+ printf "verifying hugo binary version v${versionToDownload}${versionDownloadSuffix} ..... "
+ cd $BASE_DIR/.hugo/
+ grep "${tarballName}" "$BASE_DIR/.hugo/$checksumName" | perform_checksum
+ cd - > /dev/null 2>&1
+ wait
+ printf "[done]\n"
+
+ printf "unzipping hugo binary version v${versionToDownload}${versionDownloadSuffix} ..... "
+ if [ -f "${tarballPath}" -a -r "${tarballPath}" ]; then
+ tar --directory="$BASE_DIR/.hugo/" -xzf "${tarballPath}" 2>&1
+ wait
+ printf "[done]\n"
+ else
+ printf "[failed]\n"
+ remove_file "$checksumPath"
+ remove_file "$tarballPath"
+ exit 1
+ fi
+
+ # save the downloaded binary version into $BASE_DIR/.hugo/version
+ echo "${versionToDownload}${versionDownloadSuffix}" > $BASE_DIR/.hugo/version
+
+ # cleanup after extraction
+ remove_file "$checksumPath"
+ remove_file "$tarballPath"
+ remove_file "$BASE_DIR/.hugo/LICENSE"
+ remove_file "$BASE_DIR/.hugo/README.md"
+ fi
+}
+
+# ------------------------------------------------------------------------------
+# upgrade hugo wrapper binary and save it as ${BASE_DIR}/hugow
+# ------------------------------------------------------------------------------
+if [ "$version" = true ]; then
+ echo "Hugo Wrapper $VERSION_NUMBER"
+ exit
+fi
+
+# ------------------------------------------------------------------------------
+# upgrade hugo wrapper binary and save it as ${BASE_DIR}/hugow
+# ------------------------------------------------------------------------------
+if [ "$upgrade" = true ]; then
+ printf "downloading hugow binary ... "
+
+ latest_release=`$DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT ${DOWNLOAD_OUTPUT}- https://api.github.com/repos/khos2ow/hugo-wrapper/releases/latest`
+ versionToDownload=`parse_json "$latest_release" "tag_name"`
+
+ $DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT $DOWNLOAD_OUTPUT "hugow" "https://github.com/khos2ow/hugo-wrapper/releases/download/${versionToDownload}/hugow" &
+ wait
+ printf "[done]\n"
+ chmod +x hugow
+ exit
+fi
+
+# ------------------------------------------------------------------------------
+# download hugo binary and save it as ${BASE_DIR}/.hugo/hugo
+# ------------------------------------------------------------------------------
+if [ -r "$BASE_DIR/.hugo/hugo" ]; then
+ current_binary_version="$($BASE_DIR/.hugo/hugo version | sed -ne 's/[^0-9]*\(\([0-9]*\.\)\{0,4\}[0-9]*\(-[0-9a-fA-F]*\)*\(\/extended\)*\).*/\1/p' | sed 's/-[0-9A-Fa-f]*//p' | sed 's/^ *//;s/ *$//' | uniq)"
+
+ if [ "$get_extended" = true ]; then
+ suffix_extended_version="/extended"
+ fi
+
+ # download hugo binary and save it as ${BASE_DIR}/.hugo/hugo
+ if [ -n "$get_version" ]; then
+ if [ "${get_version}${suffix_extended_version}" != "$current_binary_version" ]; then
+ # specified hugo version
+ download_version "$get_version" $get_extended
+ else
+ echo "hugo binary version ${get_version}${suffix_extended_version} already exists"
+ echo "${get_version}${suffix_extended_version}" > $BASE_DIR/.hugo/version
+ fi
+ elif [ $get_latest = true ]; then
+ latest_release=`$DOWNLOAD_COMMAND $DOWNLOAD_SILENT $DOWNLOAD_REDIRECT ${DOWNLOAD_OUTPUT}- https://api.github.com/repos/gohugoio/hugo/releases/latest`
+ latest_version=`parse_json "$latest_release" "tag_name" | sed -ne 's/[^0-9]*\(\([0-9]*\.\)\{0,4\}[0-9]*\(\/extended\)*\).*/\1/p'`
+
+ if [ "${latest_version}${suffix_extended_version}" != "$current_binary_version" ]; then
+ # latest hugo version
+ download_version "$latest_version" $get_extended
+ else
+ echo "latest hugo binary version ${latest_version}${suffix_extended_version} already exists"
+ echo "${latest_version}${suffix_extended_version}" > $BASE_DIR/.hugo/version
+ fi
+ elif [ -r "$BASE_DIR/.hugo/version" ]; then
+ current_file_version="$(cat "$BASE_DIR/.hugo/version")"
+
+ if [ "$current_file_version" != "$current_binary_version" ]; then
+ version_from_file="$(echo "$current_file_version" | cut -d "/" -f1)"
+ extended_from_file="$(echo "$current_file_version" | cut -d "/" -f2)"
+
+ if [ "${extended_from_file}" = "extended" ]; then
+ isExtended=true
+ else
+ isExtended=false
+ fi
+
+ # specified hugo version
+ download_version "$version_from_file" $isExtended
+ fi
+ else
+ # save the current binary version into $BASE_DIR/.hugo/version
+ echo "$current_binary_version" > $BASE_DIR/.hugo/version
+ fi
+else
+ if [ -n "$get_version" ]; then
+ # specified hugo version
+ download_version "$get_version" $get_extended
+ elif [ $get_latest = true ]; then
+ # latest hugo version
+ download_version "LATEST" $get_extended
+ elif [ -r "$BASE_DIR/.hugo/version" ]; then
+ # specified hugo version
+ version_from_file="$(cat "$BASE_DIR/.hugo/version" | cut -d "/" -f1)"
+ extended_from_file="$(cat "$BASE_DIR/.hugo/version" | cut -d "/" -f2)"
+
+ if [ "${extended_from_file}" = "extended" ]; then
+ isExtended=true
+ else
+ isExtended=false
+ fi
+
+ download_version "${version_from_file}" $isExtended
+ else
+ # latest hugo version
+ download_version "LATEST" $get_extended
+ fi
+fi
+
+# ------------------------------------------------------------------------------
+# only download binary and not execute hugo related command
+# ------------------------------------------------------------------------------
+if [ "$get_latest" = true -o -n "$get_version" ]; then
+ ${BASE_DIR}/.hugo/hugo version
+ exit
+fi
+
+# ------------------------------------------------------------------------------
+# Show help, both from hugow and ${BASE_DIR}/.hugo/hugo
+# ------------------------------------------------------------------------------
+if [ $show_help = true ]; then
+ help=$(${BASE_DIR}/.hugo/hugo --help)
+ cat << USAGE
+hugow is the universal wrapper for hugo main command.
+
+Hugo is a Fast and Flexible Static Site Generator
+built with love by spf13 and friends in Go.
+
+Complete documentation is available at http://gohugo.io/.
+
+Flags:
+ --get-extended get hugo extended binary
+ --get-latest get latest version of hugo binary
+ --get-version string get specified version of hugo binary
+ --upgrade upgrade hugo wrapper binary itself
+ --version show version of hugo wrapper binary itself
+ -h, --help help for hugo-wrapper
+
+--------
+
+$help
+USAGE
+ exit 0
+fi
+
+# ------------------------------------------------------------------------------
+# pass commands and flags to actual hugo binary
+# ------------------------------------------------------------------------------
+${BASE_DIR}/.hugo/hugo "$@"
diff --git a/layouts/partials/hook_head_end.html b/layouts/partials/hook_head_end.html
new file mode 100644
index 00000000000..eb338e12c46
--- /dev/null
+++ b/layouts/partials/hook_head_end.html
@@ -0,0 +1,13 @@
+
+{{ with getenv "ADD_GA" }}
+
+{{ end }}
diff --git a/layouts/partials/hook_left_sidebar_end.html b/layouts/partials/hook_left_sidebar_end.html
new file mode 100644
index 00000000000..3fa7a7bde6e
--- /dev/null
+++ b/layouts/partials/hook_left_sidebar_end.html
@@ -0,0 +1,7 @@
+{{ if getenv "REPOSITORY_URL" -}}
+
+{{ end }}
diff --git a/lib/multilang.rb b/lib/multilang.rb
deleted file mode 100644
index 36fbe5b1f07..00000000000
--- a/lib/multilang.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module Multilang
- def block_code(code, full_lang_name)
- if full_lang_name
- parts = full_lang_name.split('--')
- rouge_lang_name = (parts) ? parts[0] : "" # just parts[0] here causes null ref exception when no language specified
- super(code, rouge_lang_name).sub("highlight #{rouge_lang_name}") do |match|
- match + " tab-" + full_lang_name
- end
- else
- super(code, full_lang_name)
- end
- end
-end
-
-require 'middleman-core/renderers/redcarpet'
-Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, Multilang
diff --git a/lib/nesting_unique_head.rb b/lib/nesting_unique_head.rb
deleted file mode 100644
index 01278371c17..00000000000
--- a/lib/nesting_unique_head.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# Nested unique header generation
-require 'middleman-core/renderers/redcarpet'
-
-class NestingUniqueHeadCounter < Middleman::Renderers::MiddlemanRedcarpetHTML
- def initialize
- super
- @@headers_history = {} if !defined?(@@headers_history)
- end
-
- def header(text, header_level)
- friendly_text = text.gsub(/<[^>]*>/,"").parameterize
- @@headers_history[header_level] = text.parameterize
-
- if header_level > 1
- for i in (header_level - 1).downto(1)
- friendly_text.prepend("#{@@headers_history[i]}-") if @@headers_history.key?(i)
- end
- end
-
- return "#{text}"
- end
-end
diff --git a/lib/toc_data.rb b/lib/toc_data.rb
deleted file mode 100644
index 4a04efee26f..00000000000
--- a/lib/toc_data.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require 'nokogiri'
-
-def toc_data(page_content)
- html_doc = Nokogiri::HTML::DocumentFragment.parse(page_content)
-
- # get a flat list of headers
- headers = []
- html_doc.css('h1, h2, h3').each do |header|
- headers.push({
- id: header.attribute('id').to_s,
- content: header.children,
- title: header.children.to_s.gsub(/<[^>]*>/, ''),
- level: header.name[1].to_i,
- children: []
- })
- end
-
- [3,2].each do |header_level|
- header_to_nest = nil
- headers = headers.reject do |header|
- if header[:level] == header_level
- header_to_nest[:children].push header if header_to_nest
- true
- else
- header_to_nest = header if header[:level] < header_level
- false
- end
- end
- end
- headers
-end
diff --git a/lib/unique_head.rb b/lib/unique_head.rb
deleted file mode 100644
index d42bab2aa9d..00000000000
--- a/lib/unique_head.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# Unique header generation
-require 'middleman-core/renderers/redcarpet'
-require 'digest'
-class UniqueHeadCounter < Middleman::Renderers::MiddlemanRedcarpetHTML
- def initialize
- super
- @head_count = {}
- end
- def header(text, header_level)
- friendly_text = text.gsub(/<[^>]*>/,"").parameterize
- if friendly_text.strip.length == 0
- # Looks like parameterize removed the whole thing! It removes many unicode
- # characters like Chinese and Russian. To get a unique URL, let's just
- # URI escape the whole header
- friendly_text = Digest::SHA1.hexdigest(text)[0,10]
- end
- @head_count[friendly_text] ||= 0
- @head_count[friendly_text] += 1
- if @head_count[friendly_text] > 1
- friendly_text += "-#{@head_count[friendly_text]}"
- end
- return "#{text}"
- end
-end
diff --git a/source/fonts/slate.eot b/source/fonts/slate.eot
deleted file mode 100644
index 13c4839a197..00000000000
Binary files a/source/fonts/slate.eot and /dev/null differ
diff --git a/source/fonts/slate.svg b/source/fonts/slate.svg
deleted file mode 100644
index 5f34982306b..00000000000
--- a/source/fonts/slate.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
diff --git a/source/fonts/slate.ttf b/source/fonts/slate.ttf
deleted file mode 100644
index ace9a46a7e1..00000000000
Binary files a/source/fonts/slate.ttf and /dev/null differ
diff --git a/source/fonts/slate.woff b/source/fonts/slate.woff
deleted file mode 100644
index 1e72e0ee001..00000000000
Binary files a/source/fonts/slate.woff and /dev/null differ
diff --git a/source/fonts/slate.woff2 b/source/fonts/slate.woff2
deleted file mode 100644
index 7c585a72737..00000000000
Binary files a/source/fonts/slate.woff2 and /dev/null differ
diff --git a/source/images/navbar.png b/source/images/navbar.png
deleted file mode 100644
index df38e90d87e..00000000000
Binary files a/source/images/navbar.png and /dev/null differ
diff --git a/source/images/service_environment.png b/source/images/service_environment.png
deleted file mode 100644
index d069360fd9a..00000000000
Binary files a/source/images/service_environment.png and /dev/null differ
diff --git a/source/includes/_error_codes.md b/source/includes/_error_codes.md
deleted file mode 100644
index 3eba076e586..00000000000
--- a/source/includes/_error_codes.md
+++ /dev/null
@@ -1 +0,0 @@
-# Error codes
diff --git a/source/includes/_errors.md b/source/includes/_errors.md
deleted file mode 100644
index 7b35e92b5f3..00000000000
--- a/source/includes/_errors.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Errors
-
-
-
-The Kittn API uses the following error codes:
-
-
-Error Code | Meaning
----------- | -------
-400 | Bad Request -- Your request is invalid.
-401 | Unauthorized -- Your API key is wrong.
-403 | Forbidden -- The kitten requested is hidden for administrators only.
-404 | Not Found -- The specified kitten could not be found.
-405 | Method Not Allowed -- You tried to access a kitten with an invalid method.
-406 | Not Acceptable -- You requested a format that isn't json.
-410 | Gone -- The kitten requested has been removed from our servers.
-418 | I'm a teapot.
-429 | Too Many Requests -- You're requesting too many kittens! Slow down!
-500 | Internal Server Error -- We had a problem with our server. Try again later.
-503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
diff --git a/source/includes/administration/_service_connections.md b/source/includes/administration/_service_connections.md
deleted file mode 100644
index f7124830b1f..00000000000
--- a/source/includes/administration/_service_connections.md
+++ /dev/null
@@ -1,72 +0,0 @@
-## Service connections
-
-Service connections are the services that you can create resources for (e.g. compute, object storage). [Environments](#environments) are created for a specific service which allows you to create and manage resources within that service.
-
-
-
-
-
-### List service connections
-
-`GET /services/connections`
-
-```json
-{
- "data":[{
- "id": "adfbdb51-493b-45b1-8802-3f6327afb9e6",
- "serviceCode": "compute-qc",
- "name": "Compute - Québec",
- "type": "CloudCA",
- "status": {
- "lastUpdated": "2017-08-15T12:00:00.000Z",
- "reachable": true
- }
- }]
-}
-```
-```go
-ccaClient := cca.NewCcaClient("your_api_key")
-serviceConnection, err := ccaClient.ServiceConnections.List()
-```
-
-Attributes |
----- | -----------
-`id` *UUID* | The id of the service connection
-`serviceCode` *string* | The service code of the service connection. It is used in the endpoint of the services API.
-`name` *string* | The name of the service connection
-`type` *string* | The type of the service connection.
-`status` *Object* | Status of the service connection. Tells you if the service is up. *includes*: `lastUpdated`, `reachable`
-
-
-
-
-### Retrieve a service connection
-
-`GET /services/connections/:id`
-
-```json
-{
- "data":[{
- "id": "adfbdb51-493b-45b1-8802-3f6327afb9e6",
- "serviceCode": "compute-qc",
- "name": "Compute - Québec",
- "type": "CloudCA",
- "status": {
- "lastUpdated": "2017-08-15T12:00:00.000Z",
- "reachable": true
- }
- }]
-}
-```
-```go
-ccaClient := cca.NewCcaClient("your_api_key")
-serviceConnections, err := ccaClient.ServiceConnections.Get("[service-connection-id]")
-```
-
-Attributes |
----- | -----------
-`id` *UUID* | The id of the service connection
-`serviceCode` *string* | The service code of the service connection. It is used in the endpoint of the services API.
-`name` *string* | The name of the service connection
-`type` *string* | The type of the service connection.
-`status` *Object* | Status of the service connection. Tells you if the service is up. *includes*: `lastUpdated`, `reachable`
diff --git a/source/includes/administration/_usage.md b/source/includes/administration/_usage.md
deleted file mode 100644
index 27a06a22733..00000000000
--- a/source/includes/administration/_usage.md
+++ /dev/null
@@ -1,70 +0,0 @@
-## Usage
-
-
-
-### List usage summary
-
-`GET /usage_summary/organizations/:id`
-
-```shell
-# Retrieve usage summary in JSON
-curl "https://api.cloud.ca/v1/usage_summary/organizations/03bc22bd-adc4-46b8-988d-afddc24c0cb5?start_date=2017-05-01&end_date=2017-05-15&format=json" \
- -H "MC-Api-Key: your_api_key"
-
-# Response body example
-```
-```json
-{
- "data": [{
- "organizationId": "52fd201e-aa82-4a27-86b3-ea9650a7fb1e",
- "serviceConnectionId": "beeba736-0451-49b0-8020-8b93ed5abb35",
- "serviceConnectionPricingId": "e37cc44a-47b6-4a26-81f5-1dbf85433e36",
- "utilityCost": 0.66,
- "utilityUsage": 5.49999878,
- "startDate": "2017-05-01T00:00:00.000Z",
- "endDate": "2017-05-01T01:00:00.000Z",
- "usageType": "1",
- "secondaryType": "RAM"
- }]
-}
-```
-```shell
-# Retrieve usage summary in CSV
-curl "https://api.cloud.ca/v1/usage_summary/organizations/03bc22bd-adc4-46b8-988d-afddc24c0cb5?start_date=2017-05-01&end_date=2017-05-15&format=csv" \
- -H "MC-Api-Key: your_api_key"
-
-# Response body example
-organizationId,serviceConnectionId,startDate,endDate,usageType,secondaryType,serviceConnectionPricingId,utilityCost,utilityUsage
-52fd201e-aa82-4a27-86b3-ea9650a7fb1e,beeba736-0451-49b0-8020-8b93ed5abb35,2017-05-01T00:00:00.000Z,2017-05-01T01:00:00.000Z,1,RAM,e37cc44a-47b6-4a26-81f5-1dbf85433e36,0.660000,5.49999878
-```
-
-Retrieve the usage summary records for an organization and all of its sub-organizations for a specific period. The response can be in JSON (default) or CSV format. Additionally, you can aggregate these records using the different query parameters available.
-
-*Note*: Old records are aggregated by day instead of hour. If you try to query those records per hour, then you will receive an empty list.
-
-Attributes |
----- | -----------
-`organizationId` *UUID* | Id of the [organization](#organizations)
-`serviceConnectionId` *UUID* | Id of the [service connection](#service-connections)
-`serviceConnectionPricingId` *UUID* | Id of the service connection pricing
-`utilityCost` *string* | Utility cost of the record (aggregated per the period)
-`utilityUsage` *string* | Utility usage of the record
-`startDate` *string* | Start date of the record in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601)
-`endDate` *string* | End date of the record in [ISO 8601](#https://en.wikipedia.org/wiki/ISO_8601)
-`usageType` *string* | Usage type of the record.
-`secondaryType` *string* | Secondary type of the record.
-
-Query Parameters (*required*) |
----------- | -----
-`start_date` *String* | Start date (inclusive). Should have the following format YYYY-MM-DD.
-`end_date` *String* | End date (exclusive). Should have the following format YYYY-MM-DD.
-
-Query Parameters |
----------- | -----
-`service_connection_id` *UUID* | Show usage summary for this service connection
-`include_sub_orgs` *boolean* | Include usage summary of all its sub-organizations. Defaults to false.
-`include_cost` *boolean* | Include the utility cost and service connection pricing id fields. Defaults to true.
-`include_free_usage` *boolean* | Include all summary records that has no cost associated to it (i.e. utilityCost == 0). Defaults to true.
-`combine_usage_types` *boolean* | Sums up all the utility cost per organization and service connection. The following fields are removed from the output: `serviceConnectionPricingId`, `usageType`, `secondaryType`, `utilityUsage`
-`period` *String* | The period on which the aggregation is made. HOUR, DAY or PERIOD. The default is HOUR.
-`format` *String* | JSON or CSV. Defaults to JSON.
\ No newline at end of file
diff --git a/source/includes/compute/_affinity_groups.md b/source/includes/compute/_affinity_groups.md
deleted file mode 100644
index 4ef226aebb2..00000000000
--- a/source/includes/compute/_affinity_groups.md
+++ /dev/null
@@ -1,164 +0,0 @@
-### Affinity groups
-
-Affinity groups are a way of influencing on which host an [instance](#instances) will be deployed. An anti-affinity group (the only type of affinity group we support) allows you to put [instances](#instances) on different hosts to increase fault-tolerance. In the unlikely event of a host failure, your services would still be up on another host (assuming you distribute your services on multiple instances).
-
-
-
-#### List affinity groups
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
-"https://api.cloud.ca/v1/services/compute-on/test_area/affinitygroups"
-
-# Example:
-```
-```json
-{
- "data": [{
- "id": "d4fd794f-66e1-4906-a720-d0afb04bd517",
- "name": "gnr",
- "type":"host anti-affinity",
- "instanceIds": [
- "92b4df86-fee3-4610-8167-78332b86362f"
- ]
- }],
- "metadata": {
- "recordCount": 1
- }
-}
-```
-
-GET /services/:service_code/:environment_name/affinitygroups
-
-Retrieve a list of all affinity groups in an [environment](#environments)
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the affinity group
-`name` *string* | The name of the affinity group
-`type` *string* | The type of affinity group. We only support anti-affinity
-`instanceIds` *Array[UUID]* | The ids of the [instances](#instances) in the affinity group
-
-
-
-
-#### Retrieve an affinity group
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/affinitygroups/d4fd794f-66e1-4906-a720-d0afb04bd517"
-
-# Example:
-```
-```json
-{
- "data": {
- "id": "d4fd794f-66e1-4906-a720-d0afb04bd517",
- "name": "gnr",
- "type": "host anti-affinity",
- "instanceIds": [
- "92b4df86-fee3-4610-8167-78332b86362f"
- ]
- }
-}
-```
-
-GET /services/:service_code/:environment_name/affinitygroups/:id
-
-Retrieve information about an affinity group.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the affinity group
-`name` *string* | The name of the affinity group
-`type` *string* | The type of affinity group. We only support anti-affinity
-`instanceIds` *Array[UUID]* | The ids of the [instances](#instances) in the affinity group
-
-
-
-
-
-#### Create an affinity group
-
-```shell
-curl -X POST \
- -H "Content-Type: application/json" \
- -H "MC-Api-Key: your_api_key" \
- -d "request_body" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/affinitygroups"
-
-# Request should look like this
-```
-```json
-{
- "name": "gnr",
- "description": "My affinity group",
- "type": "host anti-affinity",
- "instanceIds": [
- "92b4df86-fee3-4610-8167-78332b86362f"
- ]
-}
-```
-
-POST /services/:service_code/:environment_name/affinitygroups
-
-Create an affinity group and add [instances](#instances) to it.
-
-Required |
----------- | -----
-`name` *string* | The name of the new affinity group
-`description` *string* | A description of the affinity group
-`type` *string* | The type of new affinity group. We only support anti-affinity
-`instanceIds` *Array[UUID]* | The ids of the [instances](#instances) in the affinity group
-
-
-
-
-
-#### Update an affinity group
-
-```shell
-curl -X PUT \
- -H "Content-Type: application/json" \
- -H "MC-Api-Key: your_api_key" \
- -d "request_body" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/affinitygroups/d4fd794f-66e1-4906-a720-d0afb04bd517"
-
-# Request should look like this
-```
-```json
-{
- "instanceIds": [
- "92b4df86-fee3-4610-8167-78332b86362f",
- "105f8b5e-5482-4bf5-88ca-7d7b7f431e3e"
- ]
-}
-```
-
-PUT /services/:service_code/:environment_name/affinitygroups/:id
-
-Update the list of [instances](#instances) in the affinity group.
-
-Required |
----------- | -----
-`name` *string* | The name of the new affinity group
-`description` *string* | A description of the affinity group
-`type` *string* | The type of new affinity group. We only support anti-affinity
-`instanceIds` *Array[UUID]* | The ids of the [instances](#instances) in the affinity group
-
-
-
-
-#### Delete an affinity group
-
-```shell
-curl -X DELETE \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/affinitygroups/d4fd794f-66e1-4906-a720-d0afb04bd517"
-```
-
-DELETE /services/:service_code/:environment_name/affinitygroups/:id
-
-Delete an existing affinity group.
diff --git a/source/includes/compute/_compute.md b/source/includes/compute/_compute.md
deleted file mode 100644
index 126b803d722..00000000000
--- a/source/includes/compute/_compute.md
+++ /dev/null
@@ -1 +0,0 @@
-## Compute
diff --git a/source/includes/compute/_compute_offerings.md b/source/includes/compute/_compute_offerings.md
deleted file mode 100644
index 6baf4caa3e7..00000000000
--- a/source/includes/compute/_compute_offerings.md
+++ /dev/null
@@ -1,98 +0,0 @@
-### Compute offerings
-
-Compute offerings determine the number of vCPUs and the size of the memory allocated to new [instances](#instances).
-
-#### List compute offerings
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/computeofferings"
-
-# The above command returns JSON structured like this:
-```
-```json
-{
- "data": [
- {
- "id": "40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f",
- "name": "Custom CPU and memory",
- "custom" : true,
- "availableCpuCountValues": [1, 2, 4, 8],
- "availableMemoryInMBValues": [1024, 2048, 4096, 8192],
- "maxMemoryInMBToCpuRatio": 2048
- },
- {
- "id": "1fb0caba-8ffb-4e77-8dcb-401170e15e0a",
- "name": "1vCPU.1GB",
- "cpuCount": 1,
- "memoryInMB": 1024,
- "custom" : false
- }
- ],
- "metadata": {
- "recordCount": 2
- }
-}
-```
-```go
-resources, _ := ccaClient.GetResources("compute-on", "test_area")
-ccaResources := resources.(cloudca.Resources)
-computeOfferings, _ := ccaResources.ComputeOfferings.List()
-```
-
-GET /services/:service_code/:environment_name/computeofferings
-
-Retrieve a list of available compute offerings.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the compute offering
-`name` *string* | The name of the compute offering
-`memoryInMB` *int* | The amount of provisioned memory in MB
-`cpuCount` *int* | The number of vCPUs available to the created [instance](#instances)
-`custom` *boolean* | If true, the `cpuCount` and `memoryInMB` fields will be missing from the response and will be required on [instance create](#create-an-instance)
-`availableCpuCountValues` *Array[integer]* | The list of valid cpu counts when used in the [create instance operation](#create-an-instance). Only present for custom offerings
-`availableMemoryInMBValues` *Array[integer]* | The list of valid amounts of memory (in MB) that can be used in the [create instance operation](#create-an-instance). Only present for custom offerings
-`maxMemoryInMBToCpuRatio` *integer* | The maximum ratio of memory (in MB) to number of CPU of an [instance](#instance) created with this offering. Only present for custom offerings.
-
-#### Retrieve a compute offering
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/computeofferings/40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f"
-
-# The above command returns JSON structured like this:
-```
-```json
-{
- "data": {
- "id": "40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f",
- "name": "1vCPU.512MB",
- "cpuCount": 1,
- "memoryInMB": 512,
- "custom": false
- }
-}
-```
-```go
-resources, _ := ccaClient.GetResources("compute-on", "test_area")
-ccaResources := resources.(cloudca.Resources)
-computeOfferings, _ := ccaResources.ComputeOfferings.Get("40a2e5f7-22e6-4d1e-b03b-4a4b7c9cbc6f")
-```
-
-GET /services/:service_code/:environment_name/computeofferings/:id
-
-Retrieve a compute offering.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the compute offering
-`name` *string* | The name of the compute offering
-`memoryInMB` *int* | The amount of provisioned memory in MB
-`cpuCount` *int* | The number of vCPUs available to the created [instance](#instances)
-`custom` *boolean* | If true, the `cpuCount` and `memoryInMB` fields will be missing from the response and will be required on [instance create](#create-an-instance)
-`availableCpuCountValues` *Array[integer]* | The list of valid cpu counts when used in the [create instance operation](#create-an-instance). Only present for custom offerings
-`availableMemoryInMBValues` *Array[integer]* | The list of valid amounts of memory (in MB) that can be used in the [create instance operation](#create-an-instance). Only present for custom offerings
-`maxMemoryInMBToCpuRatio` *integer* | The maximum ratio of memory (in MB) to number of CPU of an [instance](#instance) created with this offering. Only present for custom offerings.
diff --git a/source/includes/compute/_networking.md b/source/includes/compute/_networking.md
deleted file mode 100644
index d4bbebfbcd1..00000000000
--- a/source/includes/compute/_networking.md
+++ /dev/null
@@ -1 +0,0 @@
-## Networking
diff --git a/source/includes/compute/_nics.md b/source/includes/compute/_nics.md
deleted file mode 100644
index 27a26374e03..00000000000
--- a/source/includes/compute/_nics.md
+++ /dev/null
@@ -1,199 +0,0 @@
-### NICs
-
-
-
-
-
-#### List NICs
-
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/nics"
-
-# Example response:
-```
-```json
-{
- "data": [{
- "id": "fff1f45a-8350-4c87-be43-947b96d01ebd",
- "name": "NIC-0",
- "ipAddress": "10.169.253.165",
- "isDefault": true,
- "networkId": "d2243d4c-0dd8-4f8c-9ab4-4b1d285d5642",
- "networkName": "Backend",
- "gateway": "10.169.253.1",
- "netmask": "255.255.255.0",
- "instanceId": "b6145e8b-abd3ta-456c-832c-f3db86a6acfe",
- "vpcId": "5aa9f5d7-55a9-43bf-bd2c-78a6bae1b267",
- "vpcName": "default-vpc",
- "secondaryIps": [
- {
- "id": "9c28e297-5d23-41a3-a167-34dc24f1df19",
- "ipAddress": "10.169.253.124"
- }
- ]
- }],
- "metadata": {
- "recordCount": 1
- }
-}
-```
-
-GET :service_code/:environment_name/portforwardingrules
-
-Retrieve a list of all NICs.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the NIC
-`name` *string* | The name of the NIC
-`ipAddress` *string* | The IP address of the NIC
-`isDefault` *string* | true if it's the default NIC of the [instance](#instances) (i.e. it will be the private IP on the instance)
-`networkId` *UUID* | The id of the [network](#networks) of the NIC
-`networkName` *string* | The name of the [network](#networks) of the NIC
-`gateway` *string* | The gateway of the [network](#networks) associated with the NIC
-`netmask` *string* | The netmask of the [network](#networks) associated with the NIC
-`instanceId` *string* | The id of the instance associated with the NIC
-`vpcId` *string* | The id of the [VPC](#vpcs) associated with the NIC
-`vpcName` *string* | The name of the [VPC](#vpcs) associated with the NIC
-`secondaryIps` *SecondaryIP* | The list of secondary IPs of the NIC *includes:* `id`, `ipAddress`
-
-Query Parameters |
----------- | -----
-`instance_id` *UUID* | Filter the list to only retrieve the NICs of a specific [instance](#instances)
-`network_id` *UUID* | Filter the list to only retrieve the NICs of a specific [network](#networks)
-
-
-
-
-
-#### Retrieve a NIC
-
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/nics/fff1f45a-8350-4c87-be43-947b96d01ebd"
-
-# Example response:
-```
-```json
-{
- "data": {
- "id": "fff1f45a-8350-4c87-be43-947b96d01ebd",
- "name": "NIC-0",
- "ipAddress": "10.169.253.165",
- "isDefault": true,
- "networkId": "d2243d4c-0dd8-4f8c-9ab4-4b1d285d5642",
- "networkName": "Backend",
- "gateway": "10.169.253.1",
- "netmask": "255.255.255.0",
- "instanceId": "b6145e8b-abd3ta-456c-832c-f3db86a6acfe",
- "vpcId": "5aa9f5d7-55a9-43bf-bd2c-78a6bae1b267",
- "vpcName": "default-vpc",
- "secondaryIps": [
- {
- "id": "9c28e297-5d23-41a3-a167-34dc24f1df19",
- "ipAddress": "10.169.253.124"
- }
- ]
- }
-}
-```
-
-GET /services/:service_code/:environment_name/nics/:id
-
-Retrieve an existing NIC.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the NIC
-`name` *string* | The name of the NIC
-`ipAddress` *string* | The IP address of the NIC
-`isDefault` *string* | true if it's the default NIC of the [instance](#instances) (i.e. it will be the private IP on the instance)
-`networkId` *UUID* | The id of the [network](#networks) of the NIC
-`networkName` *string* | The name of the [network](#networks) of the NIC
-`gateway` *string* | The gateway of the [network](#networks) associated with the NIC
-`netmask` *string* | The netmask of the [network](#networks) associated with the NIC
-`instanceId` *string* | The id of the [instance](#instances) associated with the NIC
-`vpcId` *string* | The id of the [VPC](#vpcs) associated with the NIC
-`vpcName` *string* | The name of the [VPC](#vpcs) associated with the NIC
-`secondaryIps` *SecondaryIP* | The list of secondary IPs of the NIC *includes:* `id`, `ipAddress`
-
-
-
-
-
-#### Create a NIC
-
-
-```shell
-
-# Example:
-
-curl -X POST \
- -H "Content-Type: application/json" \
- -H "MC-Api-Key: your_api_key" \
- -d "request_body" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/nics"
-
-# Request example:
-```
-```json
-{
- "networkId": "d67e986d-fe04-4827-836e-1697ede8ed30",
- "instanceId": "96330eea-4424-46ca-825c-82fdd051d8c3"
-}
-```
-
-
-POST /services/:service_code/:environment_name/nics
-
-Create a NIC for an [instance](#instances) in a specific network. You can only have one NIC per [network](#networks).
-
-Required |
------- | -----------
-`networkId` *string* | The id of the [network](#networks) where to create the NIC
-`instanceId` *string* | The id of the [instance](#instances) where to attach the NIC
-
-
-
-
-
-#### Delete a NIC
-
-
-```shell
-
-# Example:
-
-curl -X DELETE \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/nics"
-```
-
-DELETE /services/:service_code/:environment_name/nics/:id
-
-Delete an existing NIC. The NIC you're trying to delete must not be the default one.
-
-
-
-
-
-#### Set a NIC as default
-
-
-```shell
-
-# Example:
-
-curl -X POST \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/nics/63ef1efe-225f-4e05-bc79-b3e457a041e2?operation=setDefault"
-```
-
-POST /services/:service_code/:environment_name/nics/:id?operation=setDefault
-
-Set an existing NIC as the default NIC of an [instance](#instances).
diff --git a/source/includes/compute/_remote_access_vpns.md b/source/includes/compute/_remote_access_vpns.md
deleted file mode 100644
index 0577676f5a3..00000000000
--- a/source/includes/compute/_remote_access_vpns.md
+++ /dev/null
@@ -1,79 +0,0 @@
-### Remote access VPNs
-
-Remote access VPNs allow users to connect to [VPCs](#vpcs) through secure connections.
-
-#### List remote access VPNs
-```shell
-curl -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/remoteaccessvpns"
-
-# Response example:
-```
-```json
-{
- "data": [
- {
- "id": "10001e7d-b4ef-489b-836e-0619a383bc8d",
- "publicIpAddress": "69.196.164.31",
- "publicIpAddressId": "10001e7d-b4ef-489b-836e-0619a383bc8d",
- "state": "Disabled"
- },
- {
- "id": "8925406c-8051-467e-a0ca-c48caa5bf670",
- "presharedKey": "Kwth4JYUfXXmtMG4X7vAwRPH",
- "publicIpAddress": "69.196.164.223",
- "publicIpAddressId": "8925406c-8051-467e-a0ca-c48caa5bf670",
- "state": "Enabled"
- }
- ],
- "metadata": {
- "recordCount": 2
- }
-}
-```
-
-GET /services/:service_code/:environment_name/remoteaccessvpns
-
-List remote access VPNs.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the remote access VPN
-`presharedKey` *string* | The VPN's preshared key
-`publicIpAddress` *string* | The [public IP](#public-ips) (e.g. 208.80.154.224)
-`publicIpAddressId` *string* | The id of the [public IP](#public-ips)
-`state` *string* | The state. *Possible values:* `Enabled`, `Disabled.`
-
-Query Parameters |
----------- | -----
-`vpc_id` *UUID* | Filter the list to only retrieve the VPN information of a specific [VPC](#vpcs)
-
-#### Retrieve a remote access VPN
-```shell
-curl -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/remoteaccessvpns/10001e7d-b4ef-489b-836e-0619a383bc8d"
-
-# Response example:
-```
-```json
-{
- "data": {
- "id": "10001e7d-b4ef-489b-836e-0619a383bc8d",
- "publicIpAddress": "69.196.164.31",
- "publicIpAddressId": "10001e7d-b4ef-489b-836e-0619a383bc8d",
- "state": "Disabled"
- }
-}
-```
-
-GET /services/:service_code/:environment_name/remoteaccessvpns/:id
-
-Retrieve a remote access VPN.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the remote access VPN
-`presharedKey` *string* | The VPN's preshared key
-`publicIpAddress` *string* | The [public IP](#public-ips) (e.g. 208.80.154.224)
-`publicIpAddressId` *string* | The id of the [public IP](#public-ips)
-`state` *string* | The state. *Possible values:* `Enabled`, `Disabled.`
diff --git a/source/includes/compute/_s2s_vpns.md b/source/includes/compute/_s2s_vpns.md
deleted file mode 100644
index 9d0252b5928..00000000000
--- a/source/includes/compute/_s2s_vpns.md
+++ /dev/null
@@ -1,226 +0,0 @@
-### Site-to-site VPN
-
-A site-to-site VPN allows multiple sites to establish a secure connection over the public network. In our case, we are talking about a secure connection between your VPC and another network (e.g. VPC, offices).
-
-
-
-#### List site-to-site VPNs
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns"
-
-# Example:
-```
-```json
-{
- "data": [
- {
- "id": "d49b2922-0581-4587-94df-6fe719327d0f",
- "name": "stargate",
- "state": "Connected",
- "vpcId": "3fe7d82a-f4c4-4552-ac3b-787fdafed4e7",
- "gateway":"19.19.19.19",
- "cidr":"10.12.0.2/22",
- "ipSecPsk": "WtOBS9GRux2XtJPtHY2TUvrv",
- "ikeEncryptionAlgorithm": "3des",
- "ikeHashAlgorithm": "sha1",
- "ikeDhGroup":"modp1536",
- "ikeLifetime":86400,
- "espEncryptionAlgorithm":"3des",
- "espHashAlgorithm":"sha1",
- "espPerfectForwardSecrecy":"modp1536",
- "espLifetime":3600,
- "dpd": false,
- "forceEncap": false
- }
- ],
- "metadata": {
- "recordCount": 1
- }
-}
-```
-
-GET /services/:service_code/:environment_name/sitetositevpns
-
-Retrieve a list of all site-to-site VPNs in an [environment](#environments)
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the site-to-site VPN
-`name` *string* | The name of the site-to-site VPN
-`state` *string* | The state of the site-to-site VPN. Can be Connected, Pending, Disconnected or Error. If disconnected, you can try to use the [reset](#reset-the-connection-of-a-site-to-site-vpn) operation
-`vpcId` *UUID* | The VPC for which the site-to-site VPN was created.
-`gateway` *string* | The gateway of the network you want to connect to. NOTE: you cannot use a gateway that has already been used by a site-to-site VPN in your environment
-`cidr` *string* | CIDR of the network you want to connect to.
-`ipSecPsk` *string* | IPSec pre-shared key. Must contain at least 10 alphanumeric characters.
-`ikeEncryptionAlgorithm` *string* | The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
-`ikeHashAlgorithm` *string* | The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5.
-`ikeDhGroup` *string* | A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
-`ikeLifetime` *integer* | The phase-1 lifetime of the security association in seconds.
-`espEncryptionAlgorithm` *string* | Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
-`espHashAlgorithm` *string* | Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5.
-`espPerfectForwardSecrecy` *string* | Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
-`espLifetime` *integer* | The phase-2 lifetime of the security association in seconds
-`dpd` *boolean* | A method to detect an unavailable Internet Key Exchange (IKE) peer.
-`forceEncap` *boolean* | Force encapsulation for NAT Traversal
-
-Query Parameters |
----------- | -----
-`vpc_id` *UUID* | Filter the list to only retrieve the site-to-site VPNs of a [VPC](#vpcs)
-
-
-
-#### Retrieve a site-to-site VPN
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns/d49b2922-0581-4587-94df-6fe719327d0f"
-
-# Example:
-```
-```json
-{
- "data": {
- "id": "d49b2922-0581-4587-94df-6fe719327d0f",
- "name": "stargate",
- "state": "Connected",
- "vpcId": "3fe7d82a-f4c4-4552-ac3b-787fdafed4e7",
- "gateway":"19.19.19.19",
- "cidr":"10.12.0.2/22",
- "ipSecPsk": "WtOBS9GRux2XtJPtHY2TUvrv",
- "ikeEncryptionAlgorithm": "3des",
- "ikeHashAlgorithm": "sha1",
- "ikeDhGroup":"modp1536",
- "ikeLifetime":86400,
- "espEncryptionAlgorithm":"3des",
- "espHashAlgorithm":"sha1",
- "espPerfectForwardSecrecy":"modp1536",
- "espLifetime":3600,
- "dpd": false,
- "forceEncap": false
- }
-}
-```
-
-GET /services/:service_code/:environment_name/sitetositevpns/:id
-
-Retrieve information about a site-to-site VPN.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the site-to-site VPN
-`name` *string* | The name of the site-to-site VPN
-`state` *string* | The state of the site-to-site VPN. Can be Connected, Pending, Disconnected or Error. If disconnected, you can try to use the [reset](#reset-the-connection-of-a-site-to-site-vpn) operation
-`vpcId` *UUID* | The VPC for which the site-to-site VPN was created.
-`gateway` *string* | The gateway of the network you want to connect to. NOTE: you cannot use a gateway that has already been used by a site-to-site VPN in your environment
-`cidr` *string* | CIDR of the network you want to connect to.
-`ipSecPsk` *string* | IPSec pre-shared key. Must contain at least 10 alphanumeric characters.
-`ikeEncryptionAlgorithm` *string* | The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
-`ikeHashAlgorithm` *string* | The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5.
-`ikeDhGroup` *string* | A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
-`ikeLifetime` *integer* | The phase-1 lifetime of the security association in seconds.
-`espEncryptionAlgorithm` *string* | Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
-`espHashAlgorithm` *string* | Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5.
-`espPerfectForwardSecrecy` *string* | Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit).
-`espLifetime` *integer* | The phase-2 lifetime of the security association in seconds
-`dpd` *boolean* | A method to detect an unavailable Internet Key Exchange (IKE) peer.
-`forceEncap` *boolean* | Force encapsulation for NAT Traversal
-
-
-
-#### Create a site-to-site VPN
-
-```shell
-
-# Here is the absolute minimum information required to create a new site-to-site VPN:
-
-curl -X POST \
- -H "Content-Type: application/json" \
- -H "MC-Api-Key: your_api_key" \
- -d "request_body" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns"
-
-# Request should look like this
-```
-```json
-{
- "name": "stargate",
- "vpcId": "3fe7d82a-f4c4-4552-ac3b-787fdafed4e7",
- "gateway":"19.19.19.19",
- "cidr":"10.12.0.2/22",
- "ipSecPsk": "WtOBS9GRux2XtJPtHY2TUvrv",
- "ikeEncryptionAlgorithm": "3des",
- "ikeHashAlgorithm": "sha1",
- "ikeDhGroup":"modp1536",
- "ikeLifetime":86400,
- "espEncryptionAlgorithm":"3des",
- "espHashAlgorithm":"sha1",
- "espPerfectForwardSecrecy":"modp1536",
- "espLifetime":3600,
- "dpd": false,
- "forceEncap": false
- }
-```
- POST /services/:service_code/:environment_name/sitetositevpns
-
-Create a site-to-site VPN
-
-Required |
------- | -----------
-`name` *string* | The name of the site-to-site VPN. Must be unique in the environment.
-`vpcId` *UUID* | The VPC for which the site-to-site VPN was created.
-`gateway` *string* | The gateway of the network you want to connect to. NOTE: you cannot use a gateway that has already been used by a site-to-site VPN in your environment
-`cidr` *string* | CIDR of the network you want to connect to.
-`ipSecPsk` *string* | IPSec pre-shared key. Must contain at least 10 alphanumeric characters.
-`ikeEncryptionAlgorithm` *string* | The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
-`ikeHashAlgorithm` *string* | The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5.
-`ikeLifetime` *integer* | The phase-1 lifetime of the security association in seconds.
-`espEncryptionAlgorithm` *string* | Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES.
-`espHashAlgorithm` *string* | Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5.
-`espLifetime` *integer* | The phase-2 lifetime of the security association in seconds
-
-Optional |
------- | -----------
-`ikeDhGroup` *string* | A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The supported options are Group-5 (1536-bit) and Group-2 (1024-bit).
-`espPerfectForwardSecrecy` *string* | Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. The supported options are Group-5 (1536-bit) and Group-2 (1024-bit).
-`dpd` *boolean* | A method to detect an unavailable Internet Key Exchange (IKE) peer. Defaults to false
-`forceEncap` *boolean* | Force encapsulation for NAT Traversal. Defaults to false
-
-
-
-
-#### Delete a site-to-site VPN
-
-
-```shell
-
-# Example:
-
-curl -X DELETE \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns/d49b2922-0581-4587-94df-6fe719327d0f"
-```
-
-DELETE /services/:service_code/:environment_name/sitetositevpns/:id
-
-Delete an existing site-to-site VPN.
-
-
-
-
-#### Reset the connection of a site-to-site VPN
-
-```shell
-
-curl -X POST \
- -H "Content-Type: application/json" \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/sitetositevpns/ca86b14f-20db-463d-b58a-9d3fa5959af2?operation=reset"
-
-```
- POST /services/:service_code/:environment_name/sitetositevpns/:id?operation=reset
-
-Reset a site-to-site VPN.
\ No newline at end of file
diff --git a/source/includes/compute/_snapshots.md b/source/includes/compute/_snapshots.md
deleted file mode 100644
index a0e87e7b85d..00000000000
--- a/source/includes/compute/_snapshots.md
+++ /dev/null
@@ -1,90 +0,0 @@
-### Snapshots
-
- A volume snapshot is a full image of a volume. They are often considered as backups, but in reality this is not 100% true since you have only the data written on disk. Volume Snapshots are typically used to derive new templates out of a running instance.
-
-
-
-#### List snapshots
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/snapshots"
-
-# Example:
-```
-```json
-{
- "data": [
- {
- "id": "33a27b8d-5a27-42a5-aec4-37606e372bda",
- "name": "i-douglas-ADM_foo_20161116211009",
- "state": "BackedUp",
- "intervalType": "MANUAL",
- "volumeId": "c779ca42-6966-41af-a7dc-23db4e41d4ee",
- "volume": "ROOT-35545",
- "volumeType": "ROOT-35545"
- }
- ],
- "metadata": {
- "recordCount": 1
- }
-}
-```
-
-GET /services/:service_code/:environment_name/snapshots
-
-Retrieve a list of all snapshots in an [environment](#environments)
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the snapshot
-`name` *string* | The name of the snapshot
-`state` *string* | The state of the snapshot
-`intervalType` *string* | The interval type. `MANUAL` means that you created the snapshot manually (i.e. it's not a recurring snapshot)
-`volumeId` *UUID* | The id of the [volume](#volumes) that was snapshotted
-`volume` *string* | The name of the [volume](#volumes) that was snapshotted
-`volumeType` *string* | The type of the [volume](#volumes) that was snapshotted
-
-Query Parameters |
----------- | -----
-`volume_id` *UUID* | Filter the list to only retrieve the snapshots of a specific [volume](#volumes)
-
-
-
-#### Retrieve a snapshot
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/snapshots/1bd672f4-b274-4371-a792-b0a6c6778cc7"
-
-# Example:
-```
-```json
-{
- "data": {
- "id": "33a27b8d-5a27-42a5-aec4-37606e372bda",
- "name": "i-douglas-ADM_foo_20161116211009",
- "state": "BackedUp",
- "intervalType": "MANUAL",
- "volumeId": "c779ca42-6966-41af-a7dc-23db4e41d4ee",
- "volume": "ROOT-35545",
- "volumeType": "ROOT-35545"
- }
-}
-```
-
-GET /services/:service_code/:environment_name/snapshots/:id
-
-Retrieve information about a snapshot.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the snapshot
-`name` *string* | The name of the snapshot
-`state` *string* | The state of the snapshot
-`intervalType` *string* | The interval type. `MANUAL` means that you created the snapshot manually (i.e. it's not a recurring snapshot)
-`volumeId` *UUID* | The id of the [volume](#volumes) that was snapshotted
-`volume` *string* | The name of the [volume](#volumes) that was snapshotted
-`volumeType` *string* | The type of the [volume](#volumes) that was snapshotted
diff --git a/source/includes/compute/_storage.md b/source/includes/compute/_storage.md
deleted file mode 100644
index 78897cb2707..00000000000
--- a/source/includes/compute/_storage.md
+++ /dev/null
@@ -1 +0,0 @@
-## Storage
diff --git a/source/includes/compute/_templates.md b/source/includes/compute/_templates.md
deleted file mode 100644
index b7a8e5e1e3e..00000000000
--- a/source/includes/compute/_templates.md
+++ /dev/null
@@ -1,97 +0,0 @@
-### Templates
-A template is a virtual disk image that can be used on the creation of an [instance](#instances). It contains the operating system which can contain some predefined configuration, files and software. Cloud.ca provides many default templates but you can also upload your own custom templates.
-
-#### List templates
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
- "https://api.cloud.ca/v1/services/compute-on/test_area/templates"
-
-# Example:
-```
-```json
-{
- "data": [{
- "id": "0b3fea04-b1ed-48cf-921d-96795dfe9a81",
- "name": "ubuntu",
- "description": "Example template",
- "size": 52428800,
- "isPublic": false,
- "isReady": true,
- "isDynamicallyScalable": true,
- "sshKeyEnabled": true,
- "created":"2016-10-24 2:40:29 PM EDT",
- "osType": "Other (64-bit)",
- "availableInZones": [
- "ea901007-056b-4c50-bb3a-2dd635fce2ab"
- ]
- }],
- "metadata": {
- "recordCount": 1
- }
-}
-```
-
-GET /services/:service_code/:environment_name/templates
-
-Retrieve a list of all templates of an [environment](#environments) It will include all the public templates of the system.
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the template
-`name` *string* | The name of the template
-`description` *string* | The description of the template
-`size` *long* | The size of the template in bytes
-`isPublic` *boolean* | true if public to everyone. Your custom templates will always be private
-`isReady` *boolean* | true if the template is ready to be used for a new [instance](#instances)
-`isDynamicallyScalable` *boolean* | true if you can dynamically scale an [instance](#instances) with this template
-`created` *string* | The creation date of the template
-`osType` *string* | The OS type of the template (e.g. Ubuntu, CentOS...)
-`availableInZones` *array[UUID]* | List of all [zone ids](#zones) that the template is available in
-
-#### Retrieve a template
-
-```shell
-curl -X GET \
- -H "MC-Api-Key: your_api_key" \
-"https://api.cloud.ca/v1/services/compute-on/test_area/templates/162cdfcb-45e5-4aa6-81c4-124c94621bdb"
-
-# Example:
-```
-```json
-{
- "data": {
- "id": "0b3fea04-b1ed-48cf-921d-96795dfe9a81",
- "name": "ubuntu",
- "description": "Example template",
- "size": 52428800,
- "isPublic": false,
- "isReady": true,
- "isDynamicallyScalable": true,
- "sshKeyEnabled": true,
- "created":"2016-10-24 2:40:29 PM EDT",
- "osType": "Other (64-bit)",
- "availableInZones": [
- "ea901007-056b-4c50-bb3a-2dd635fce2ab"
- ]
- }
-}
-```
-
-GET /services/:service_code/:environment_name/templates/:id
-
-Retrieve information about a public or private template of an [environment](#environments)
-
-Attributes |
----------- | -----
-`id` *UUID* | The id of the template
-`name` *string* | The name of the template
-`description` *string* | The description of the template
-`size` *long* | The size of the template in bytes
-`isPublic` *boolean* | true if public to everyone. Your custom templates will always be private
-`isReady` *boolean* | true if the template is ready to be used for a new [instance](#instances)
-`isDynamicallyScalable` *boolean* | true if you can dynamically scale an [instance](#instances) with this template
-`created` *string* | The creation date of the template
-`osType` *string* | The OS type of the template (e.g. Ubuntu, CentOS...)
-`availableInZones` *array[UUID]* | List of all [zone ids](#zones) that the template is available in
diff --git a/source/index.html.md b/source/index.html.md
deleted file mode 100644
index d62bbbedfe4..00000000000
--- a/source/index.html.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-title: cloud.ca API Documentation
-
-language_tabs:
- - shell : curl
- - go : go
- - hcl: terraform
-
-toc_footers:
- - Documentation Powered by Slate
-
-includes:
- - getting_started
- - administration
- - compute
-
-subsections:
- administration:
- - service_connections
- - organizations
- - users
- - environments
- - usage
- compute:
-
- - compute # Compute section
- - instances
- - templates
- - ssh_keys
- - affinity_groups
- - networking # Networking section
- - vpcs
- - networks
- - network_acls
- - public_ips
- - port_forwarding_rules
- - load_balancer_rules
- - nics
- - remote_access_vpns
- - vpn_users
- - s2s_vpns
- - storage # Storage section
- - volumes
- - snapshots
- - offerings # Offerings section
- - vpc_offerings
- - network_offerings
- - compute_offerings
- - disk_offerings
- - zones # Zones section
-search: true
----
diff --git a/source/javascripts/all.js b/source/javascripts/all.js
deleted file mode 100644
index 5f5d4067ba6..00000000000
--- a/source/javascripts/all.js
+++ /dev/null
@@ -1,2 +0,0 @@
-//= require ./all_nosearch
-//= require ./app/_search
diff --git a/source/javascripts/all_nosearch.js b/source/javascripts/all_nosearch.js
deleted file mode 100644
index b18c1d833d4..00000000000
--- a/source/javascripts/all_nosearch.js
+++ /dev/null
@@ -1,16 +0,0 @@
-//= require ./lib/_energize
-//= require ./app/_toc
-//= require ./app/_lang
-
-$(function() {
- loadToc($('#toc'), '.toc-link', '.toc-list-h2', 10);
- setupLanguages($('body').data('languages'));
- $('.content').imagesLoaded( function() {
- window.recacheHeights();
- window.refreshToc();
- });
-});
-
-window.onpopstate = function() {
- activateLanguage(getLanguageFromQueryString());
-};
diff --git a/source/javascripts/app/_lang.js b/source/javascripts/app/_lang.js
deleted file mode 100644
index 48642e8d95d..00000000000
--- a/source/javascripts/app/_lang.js
+++ /dev/null
@@ -1,180 +0,0 @@
-//= require ../lib/_jquery
-
-/*
-Copyright 2008-2013 Concur Technologies, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may
-not use this file except in compliance with the License. You may obtain
-a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations
-under the License.
-*/
-;(function () {
- 'use strict';
-
- var languages = [];
-
- window.setupLanguages = setupLanguages;
- window.activateLanguage = activateLanguage;
- window.getLanguageFromQueryString = getLanguageFromQueryString;
-
- function activateLanguage(language) {
- if (!language) return;
- if (language === "") return;
- var tabLang = language
-
- //same same but different
- language = (language == "hcl" ? "dart" : language)
- languages = languages.map(function(l){
- return l == "hcl" ? "dart": l
- });
-
-
- $(".lang-selector a").removeClass('active');
- $(".lang-selector a[data-language-name='" + tabLang + "']").addClass('active');
- //Gr8 h4xx
- $(".highlight.json").hide();
- $(".lang-specific.json").hide();
- for (var i=0; i < languages.length; i++) {
- $(".highlight.tab-" + languages[i]).hide();
- $(".lang-specific." + languages[i]).hide();
- }
- $(".highlight.tab-" + language).show();
- $(".lang-specific." + language).show();
-
- if(language === "shell"){
- $(".highlight.json").show();
- $(".lang-specific.json").show();
- }
-
- window.recacheHeights();
-
- // scroll to the new location of the position
- if ($(window.location.hash).get(0)) {
- $(window.location.hash).get(0).scrollIntoView(true);
- }
- }
-
- // parseURL and stringifyURL are from https://github.com/sindresorhus/query-string
- // MIT licensed
- // https://github.com/sindresorhus/query-string/blob/7bee64c16f2da1a326579e96977b9227bf6da9e6/license
- function parseURL(str) {
- if (typeof str !== 'string') {
- return {};
- }
-
- str = str.trim().replace(/^(\?|#|&)/, '');
-
- if (!str) {
- return {};
- }
-
- return str.split('&').reduce(function (ret, param) {
- var parts = param.replace(/\+/g, ' ').split('=');
- var key = parts[0];
- var val = parts[1];
-
- key = decodeURIComponent(key);
- // missing `=` should be `null`:
- // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
- val = val === undefined ? null : decodeURIComponent(val);
-
- if (!ret.hasOwnProperty(key)) {
- ret[key] = val;
- } else if (Array.isArray(ret[key])) {
- ret[key].push(val);
- } else {
- ret[key] = [ret[key], val];
- }
-
- return ret;
- }, {});
- };
-
- function stringifyURL(obj) {
- return obj ? Object.keys(obj).sort().map(function (key) {
- var val = obj[key];
-
- if (Array.isArray(val)) {
- return val.sort().map(function (val2) {
- return encodeURIComponent(key) + '=' + encodeURIComponent(val2);
- }).join('&');
- }
-
- return encodeURIComponent(key) + '=' + encodeURIComponent(val);
- }).join('&') : '';
- };
-
- // gets the language set in the query string
- function getLanguageFromQueryString() {
- if (location.search.length >= 1) {
- var language = parseURL(location.search).language;
- if (language) {
- return language;
- } else if (jQuery.inArray(location.search.substr(1), languages) != -1) {
- return location.search.substr(1);
- }
- }
-
- return false;
- }
-
- // returns a new query string with the new language in it
- function generateNewQueryString(language) {
- var url = parseURL(location.search);
- if (url.language) {
- url.language = language;
- return stringifyURL(url);
- }
- return language;
- }
-
- // if a button is clicked, add the state to the history
- function pushURL(language) {
- if (!history) { return; }
- var hash = window.location.hash;
- if (hash) {
- hash = hash.replace(/^#+/, '');
- }
- history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash);
-
- // save language as next default
- localStorage.setItem("language", language);
- }
-
- function setupLanguages(l) {
- var defaultLanguage = localStorage.getItem("language");
-
- languages = l;
-
- var presetLanguage = getLanguageFromQueryString();
- if (presetLanguage) {
- // the language is in the URL, so use that language!
- activateLanguage(presetLanguage);
-
- localStorage.setItem("language", presetLanguage);
- } else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) {
- // the language was the last selected one saved in localstorage, so use that language!
- activateLanguage(defaultLanguage);
- } else {
- // no language selected, so use the default
- activateLanguage(languages[0]);
- }
- }
-
- // if we click on a language tab, activate that language
- $(function() {
- $(".lang-selector a").on("click", function() {
- var language = $(this).data("language-name");
- pushURL(language);
- activateLanguage(language);
- return false;
- });
- });
-})();
diff --git a/source/javascripts/app/_search.js b/source/javascripts/app/_search.js
deleted file mode 100644
index 403058e3f12..00000000000
--- a/source/javascripts/app/_search.js
+++ /dev/null
@@ -1,98 +0,0 @@
-//= require ../lib/_lunr
-//= require ../lib/_jquery
-//= require ../lib/_jquery.highlight
-;(function () {
- 'use strict';
-
- var content, searchResults;
- var highlightOpts = { element: 'span', className: 'search-highlight' };
- var searchDelay = 0;
- var timeoutHandle = 0;
-
- var index = new lunr.Index();
-
- index.ref('id');
- index.field('title', { boost: 10 });
- index.field('body');
- index.pipeline.add(lunr.trimmer, lunr.stopWordFilter);
-
- $(populate);
- $(bind);
-
- function populate() {
- $('h1, h2, h3, h4').each(function() {
- var title = $(this);
- var body = title.nextUntil('h1, h2, h3, h4');
- index.add({
- id: title.prop('id'),
- title: title.text(),
- body: body.text()
- });
- });
-
- determineSearchDelay();
- }
- function determineSearchDelay() {
- if(index.tokenStore.length>5000) {
- searchDelay = 300;
- }
- }
-
- function bind() {
- content = $('.content');
- searchResults = $('.search-results');
-
- $('#input-search').on('keyup',function(e) {
- var wait = function() {
- return function(executingFunction, waitTime){
- clearTimeout(timeoutHandle);
- timeoutHandle = setTimeout(executingFunction, waitTime);
- };
- }();
- wait(function(){
- search(e);
- }, searchDelay );
- });
- }
-
- function search(event) {
-
- var searchInput = $('#input-search')[0];
-
- unhighlight();
- searchResults.addClass('visible');
-
- // ESC clears the field
- if (event.keyCode === 27) searchInput.value = '';
-
- if (searchInput.value) {
- var results = index.search(searchInput.value).filter(function(r) {
- return r.score > 0.0001;
- });
-
- if (results.length) {
- searchResults.empty();
- $.each(results, function (index, result) {
- var elem = document.getElementById(result.ref);
- searchResults.append("