Skip to content

Commit d623a7b

Browse files
authored
Merge pull request #1 from QualiSystemsLab/Add-more-mocks
Add more mocks
2 parents 8ec011b + fd5e21c commit d623a7b

66 files changed

Lines changed: 12622 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,54 @@ NOTE: IF you want to DECREASE the number of ports, you will have to delete them
1515
<li>Dynamically changing vendor</li>
1616
</ul>
1717
</li>
18+
<li>Compute Mock
19+
<ul>
20+
<li>Dynamic number of ports</li>
21+
<li>Dynamic number of power ports</li>
22+
<li>Dynamically changing model</li>
23+
<li>Dynamically changing vendor</li>
24+
</ul>
25+
</li>
26+
<li>Firewall Mock
27+
<ul>
28+
<li>Dynamic number of modules</li>
29+
<li>Dynamic number of ports</li>
30+
<li>Dynamic number of power ports</li>
31+
<li>Dynamic number of port channels</li>
32+
<li>Dynamically changing model</li>
33+
<li>Dynamically changing vendor</li>
34+
</ul>
35+
</li>
36+
<li>Load Balancer Mock
37+
<ul>
38+
<li>Dynamic number of modules</li>
39+
<li>Dynamic number of ports</li>
40+
<li>Dynamic number of power ports</li>
41+
<li>Dynamic number of port channels</li>
42+
<li>Dynamically changing model</li>
43+
<li>Dynamically changing vendor</li>
44+
</ul>
45+
</li>
46+
<li>Router Mock
47+
<ul>
48+
<li>Dynamic number of modules</li>
49+
<li>Dynamic number of ports</li>
50+
<li>Dynamic number of power ports</li>
51+
<li>Dynamic number of port channels</li>
52+
<li>Dynamically changing model</li>
53+
<li>Dynamically changing vendor</li>
54+
</ul>
55+
</li>
56+
<li>Switch Mock
57+
<ul>
58+
<li>Dynamic number of modules</li>
59+
<li>Dynamic number of ports</li>
60+
<li>Dynamic number of power ports</li>
61+
<li>Dynamic number of port channels</li>
62+
<li>Dynamically changing model</li>
63+
<li>Dynamically changing vendor</li>
64+
</ul>
65+
</li>
1866
<li>Additional Mocks
1967
<ul>
2068
<li>https://github.com/QualiSystemsLab/Quali-University-Prep/tree/master/Shells</li>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
TOSCA-Meta-File-Version: 1.0
2+
CSAR-Version: 0.1.0
3+
Created-By: Anonymous
4+
Entry-Definitions: shell-definition.yaml

mockcompute/deployment.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<properties>
3+
4+
<!-- The address of the Quali server on which to deploy, mandatory -->
5+
<serverRootAddress>localhost</serverRootAddress>
6+
7+
<!-- The port of the Quali server on which to deploy, defaults to "8029" -->
8+
<port>8029</port>
9+
10+
<!-- The server admin username, password and domain to use when deploying -->
11+
<username>YOUR_USERNAME</username>
12+
<password>YOUR_PASSWORD</password>
13+
<domain>Global</domain>
14+
15+
<!-- Simple patterns to filter when sending the driver to the server separated by semicolons (e.g. "file.xml;logs/", also supports regular expressions),
16+
on top of the patterns specified here the plugin will automatically filter the "deployment/" and ".idea/" folders and the "deployment.xml" file -->
17+
<fileFilters>dont_upload_me.xml</fileFilters>
18+
19+
<!-- The drivers to update, holds one or more drivers -->
20+
<drivers>
21+
<!-- runFromLocalProject - Decides whether to run the driver from the current project directory for debugging purposes, defaults to "false" -->
22+
<!-- waitForDebugger - When `runFromLocalProject` is enabled, decides whether to wait for a debugger to attach before running any Python driver code, defaults to "false" -->
23+
<!-- sourceRootFolder - The folder to refer to as the project source root (if specified, the folder will be zipped and deployed instead of the whole project), defaults to the root project folder -->
24+
<driver runFromLocalProject="true" waitForDebugger="true" sourceRootFolder="mockcompute">
25+
<!-- A list of paths to the driver's files or folders relative to the project's root.
26+
may be a path to a directory, in which case all the files and folders under the directory are added into the driver's zip file.
27+
if the <sources> element is not specified, all the files under the project are added to the driver's zip file -->
28+
<sources>
29+
<source>src</source>
30+
</sources>
31+
<!-- the driver name of the driver to update -->
32+
<targetName>MockcomputeDriver</targetName>
33+
</driver>
34+
</drivers>
35+
36+
<!-- The scripts to update, holds one or more scripts -->
37+
<!-- A list of paths to the script's files or folders relative to the project's root.
38+
if the <sources> element is not specified, all the files under the project are added to the script's zip file.
39+
if only one file is specified, the file will not be compressed into a zip file.
40+
-->
41+
<!--
42+
<scripts>
43+
44+
<script>
45+
46+
<sources>
47+
<source>script1.py</source>
48+
</sources>
49+
<targetName>scriptToUpdate</targetName>
50+
</script>
51+
</scripts>
52+
-->
53+
</properties>

mockcompute/docs/readme.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.. _readme:
2+
3+
.. include:: ../README.rst

mockcompute/shell-definition.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
tosca_definitions_version: tosca_simple_yaml_1_0
2+
3+
metadata:
4+
template_name: Mockcompute
5+
template_author: Anonymous
6+
template_version: 0.1.0
7+
template_icon: shell-icon.png
8+
9+
description: >
10+
Sample TOSCA based shell
11+
12+
imports:
13+
- cloudshell_standard: cloudshell_compute_standard_2_0_1.yaml
14+
15+
node_types:
16+
17+
vendor.switch.Mockcompute:
18+
derived_from: cloudshell.nodes.Compute
19+
properties:
20+
# my_property:
21+
# type: string # optional values: string, integer, float, boolean, cloudshell.datatypes.Password
22+
# default: fast
23+
# description: Some attribute description
24+
# constraints:
25+
# - valid_values: [fast, slow]
26+
num_ports:
27+
type: integer
28+
default: 1
29+
description: Enter the number of ports to generate
30+
my_model:
31+
type: string
32+
default: Model-001
33+
description: Enter the model name
34+
power_ports:
35+
type: integer
36+
default: 1
37+
description: Enter the number of power ports to generate
38+
my_vendor:
39+
type: string
40+
default: CS Mock Compute
41+
description: Enter the Vendor name
42+
capabilities:
43+
auto_discovery_capability:
44+
type: cloudshell.capabilities.AutoDiscovery
45+
properties:
46+
enable_auto_discovery:
47+
type: boolean
48+
default: true
49+
auto_discovery_description:
50+
type: string
51+
default: Describe the auto discovery
52+
inventory_description:
53+
type: string
54+
default: Describe the resource shell template
55+
num_ports:
56+
type: integer
57+
default: 1
58+
my_model:
59+
type: string
60+
default: Model-001
61+
power_ports:
62+
type: integer
63+
default: 1
64+
my_vendor:
65+
type: string
66+
default: CS Mock Compute
67+
artifacts:
68+
icon:
69+
file: shell-icon.png
70+
type: tosca.artifacts.File
71+
driver:
72+
file: MockcomputeDriver.zip
73+
type: tosca.artifacts.File

mockcompute/shell-icon.png

440 Bytes
Loading

0 commit comments

Comments
 (0)