Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions docs/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ List of possible values:

### CloudServer Flavors
List of possible sizes for CloudServers. **You need to use the name in the body of the API**:

:::info
To retrieve the latest list, use the [API](/api/docs/documents/compute/list-cloud-server-flavors).
:::
#### Cloud Server Linux

|Name | CPU | Ram (GB) |
Expand Down Expand Up @@ -85,7 +87,9 @@ List of possible sizes for CloudServers. **You need to use the name in the body
### KaaS Flavors

List of possible sizes of KaaS nodes: **You need to use the name in the API body**

:::info
To retrieve the latest list, use the [API](/api/docs/documents/container/list-kaas-flavors).
:::

|Name | CPU | Ram (GB) | Storage (GB) |
| :---| :---: | :---: | :---: |
Expand All @@ -106,6 +110,9 @@ List of possible sizes of KaaS nodes: **You need to use the name in the API body

To create a KaaS, you must specify the Kubernetes version.
Currently, the following versions of Kubernetes are available:
:::info
To retrieve the latest list, use the [API](/api/docs/documents/container/list-kubernetes-versions).
:::

| Version |
| :--- |
Expand All @@ -118,6 +125,9 @@ Currently, the following versions of Kubernetes are available:
### DBaaS Engines

List of possible engines for DBaaS. **You need to use the name in the body of the API**
:::info
To retrieve the latest list, use the [API](/api/docs/documents/database/list-dbaas-engine).
:::
<table>
<thead>
<tr>
Expand Down Expand Up @@ -158,6 +168,9 @@ List of possible engines for DBaaS. **You need to use the name in the body of th
### DBaaS Flavors

List of possible sizes for DBaaS. **You need to use the name in the body of the API**
:::info
To retrieve the latest list, use the [API](/api/docs/documents/database/list-dbaas-flavor).
:::
<table>
<thead>
<tr>
Expand Down Expand Up @@ -265,7 +278,9 @@ List of possible sizes for DBaaS. **You need to use the name in the body of the
## Location and Data Center

To create any CMP resource, you must specify the reference Location and Data Center.

:::info
To retrieve the latest list, use the [API](/api/docs/documents/catalog/list-location-and-data-center).
:::
Here is the list of possible values:

| Location | DataCenter |
Expand Down
12 changes: 11 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,17 @@ const config = {
groupPathsBy: "tag",
categoryLinkSource: "tag"
}
},
},
catalog:{
specPath: "static/openapi/catalog.json",
outputDir: "docs/documents/catalog",
label: "Catalog",
//proxy: process.env.PROXY_URL,
sidebarOptions: {
groupPathsBy: "tag",
categoryLinkSource: "tag"
}
}

},
},
Expand Down
27 changes: 19 additions & 8 deletions i18n/it/docusaurus-plugin-content-docs/current/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ Lista dei possibili valori:

### CloudServer Flavors
Lista delle taglie possibili per i CloudServer. **È necessario utilizzare il nome nel body dell'API**:

:::info
Per ottenere la lista aggiornata, utilizzare l'[API](/docs/documents/compute/list-cloud-server-flavors).
:::
### Cloud Server Linux

|Name | CPU | Ram (GB) |
Expand Down Expand Up @@ -86,7 +88,9 @@ Lista delle taglie possibili per i CloudServer. **È necessario utilizzare il no

### KaaS Flavors
Lista delle taglie possibili dei nodi del KaaS: **È necessario utilizzare il nome nel body dell'API**

:::info
Per ottenere la lista aggiornata, utilizzare l'[API](/docs/documents/container/list-kaas-flavors).
:::

|Name | CPU | Ram (GB) | Storage (GB) |
| :---| :---: | :---: | :---: |
Expand All @@ -108,6 +112,9 @@ Lista delle taglie possibili dei nodi del KaaS: **È necessario utilizzare il no

Per creare un KaaS è necessario specificare la versione di Kubernetes.
Attualmente le versioni di kubernetes disponibili sono le seguenti:
:::info
Per ottenere la lista aggiornata, utilizzare l'[API](/docs/documents/container/list-kubernetes-versions).
:::

| Version |
| :--- |
Expand All @@ -120,7 +127,9 @@ Attualmente le versioni di kubernetes disponibili sono le seguenti:
### DBaaS Engines

Lista delle taglie possibili per DBaaS. **È necessario utilizzare il nome del flavor nel body dell'API**

:::info
Per ottenere la lista aggiornata, utilizzare l'[API](/docs/documents/database/list-dbaas-engine).
:::
<table>
<thead>
<tr>
Expand Down Expand Up @@ -159,7 +168,10 @@ Lista delle taglie possibili per DBaaS. **È necessario utilizzare il nome del f
</table>

### DBaaS Flavors
Lista degli engines disponibili per DBaaS. **È necessario utilizzare il nome nel body dell'AP**
Lista degli engines disponibili per DBaaS. **È necessario utilizzare il nome nel body dell'API**
:::info
Per ottenere la lista aggiornata, utilizzare l'[API](/docs/documents/database/list-dbaas-flavor).
:::
<table>
<thead>
<tr>
Expand Down Expand Up @@ -263,13 +275,12 @@ Lista degli engines disponibili per DBaaS. **È necessario utilizzare il nome ne
</table>





## Location and Data Center

Per creare una qualunque risorsa della CMP è necessario specificare Location e Data Center di riferimento.

:::info
Per ottenere la lista aggiornata, utilizzare l'[API](/docs/documents/catalog/list-location-and-data-center).
:::
Di seguito l'elenco dei possibili valori:

| Location | DataCenter |
Expand Down
12 changes: 12 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ const sidebars = {
},
items: require("./docs/documents/baremetal/sidebar.ts"),
},
{
type: "category",
label: "Catalog",
link: {
type: "generated-index",
title: "Catalog API",
description:
"This is a description of api for interact with Catalog API.",
slug: "docs/documents/sdn/aruba-catalog-api",
},
items: require("./docs/documents/catalog/sidebar.ts"),
}


],
Expand Down
55 changes: 10 additions & 45 deletions static/js/requestInterceptor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {

let config = {};

const requiresPath = ['projects', 'providers', 'catalog'];
// Funzione per caricare la configurazione dal file JSON
async function loadConfig() {
try {
Expand All @@ -12,10 +12,10 @@
config = await response.json();
//console.log('Configurazione caricata:', config);
} else {
//console.log('Il file di configurazione non esiste. Utilizzo l\'URL predefinito.');
console.log('Il file di configurazione non esiste. Utilizzo l\'URL predefinito.');
}
} catch (error) {
//console.error('Errore nel caricamento della configurazione:', error);
console.error(error);
}
}

Expand All @@ -39,24 +39,6 @@
//console.log(encodedQueryString);
return `${finalUrl}?${encodedQueryString}`;
}
// Funzione per aggiungere il timeout alla fetch
const fetchWithTimeout = (url, options = {}, timeout = 10000) => {
return new Promise((resolve, reject) => {
const timer = setTimeout(() => {
reject(new Error('Request timed out')); // Timeout di 10 secondi (modificabile)
}, timeout);

originalFetch(url, options)
.then(response => {
clearTimeout(timer); // Cancella il timeout se la risposta arriva in tempo
resolve(response);
})
.catch(err => {
clearTimeout(timer); // Cancella il timeout anche in caso di errore
reject(err);
});
});
};

const originalFetch = window.fetch;
window.fetch = async function(url, options) {
Expand All @@ -65,54 +47,37 @@
await loadConfig();
config.loaded = true;
}

if (url.includes('projects')) {
if (requiresPath.some(segment => url.includes(segment))) {

url = encodeQueryString(url);
console.log(options);

// Verifica che 'options' e 'headers' esistano
if (options && options.headers instanceof Headers) {
// Controlla se l'header Authorization esiste
if (options.headers.has('Authorization')) {
let authHeader = options.headers.get('Authorization');
// Aggiungi 'Bearer ' se non è già presente
if (authHeader.startsWith('Bearer Bearer ')) {
authHeader = authHeader.replace('Bearer ', '');
options.headers.set('Authorization', authHeader);
}

if (!authHeader.startsWith('Bearer ')) {
options.headers.set('Authorization', 'Bearer ' + authHeader);
}
console.log(options.headers.get('Authorization'));

}
}
}
}
//console.log(url);

// if (options.headers && options.headers['Authorization']) {
// if (!options.headers['Authorization'].startsWith('Bearer ')) {
// options.headers['Authorization'] = 'Bearer ' + options.headers['Authorization'];
// }
// }
// else
// {
// console.log('WRONG FETCH');
// console.log(url);
// }
return fetchWithTimeout(url, options);
//return originalFetch(url, options);
return originalFetch(url, options);
};

const originalXhrOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url, async, user, password) {
if (url.includes('projects')) {
if (requiresPath.some(segment => url.includes(segment))) {
url = encodeQueryString(url);
console.log(url);
}
else
{
console.log('WRONG FETCH');
console.log(url);
}
return originalXhrOpen.apply(this, arguments);
Expand Down
2 changes: 1 addition & 1 deletion static/openapi/auditing.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/baremetal-provider.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/openapi/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/compute-provider.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/compute-provider_v1.1.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/container-provider.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/database-provider.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/metering.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/network-provider.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/project.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/schedule-provider.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/security-provider.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openapi/storage-provider.json

Large diffs are not rendered by default.

Loading