Update run_prompt_template.txt
Browse files- run_prompt_template.txt +0 -27
run_prompt_template.txt
CHANGED
@@ -7,33 +7,6 @@ You can print intermediate results if it makes sense to do so.
|
|
7 |
Tools:
|
8 |
<<all_tools>>
|
9 |
|
10 |
-
Task: "Create a star network with 5 host nodes and 1 ovs switch, and deploy it."
|
11 |
-
|
12 |
-
To create a star network with 5 host nodes and 1 OVS switch, I will use the following code:
|
13 |
-
|
14 |
-
Answer:
|
15 |
-
```py
|
16 |
-
# Add the OVS switch
|
17 |
-
klonet_add_node("s1", "ovs", x=350, y=350)
|
18 |
-
|
19 |
-
# Add the host nodes
|
20 |
-
klonet_add_node("h1", "ubuntu", x=200, y=200)
|
21 |
-
klonet_add_node("h2", "ubuntu", x=500, y=200)
|
22 |
-
klonet_add_node("h3", "ubuntu", x=200, y=500)
|
23 |
-
klonet_add_node("h4", "ubuntu", x=500, y=500)
|
24 |
-
klonet_add_node("h5", "ubuntu", x=350, y=50)
|
25 |
-
|
26 |
-
# Add links between the host nodes and the switch
|
27 |
-
klonet_add_link("h1", "s1", "l1", "10.0.0.2/24")
|
28 |
-
klonet_add_link("h2", "s1", "l2", "10.0.0.3/24")
|
29 |
-
klonet_add_link("h3", "s1", "l3", "10.0.0.4/24")
|
30 |
-
klonet_add_link("h4", "s1", "l4", "10.0.0.5/24")
|
31 |
-
klonet_add_link("h5", "s1", "l5", "10.0.0.6/24")
|
32 |
-
|
33 |
-
# Deploy the network
|
34 |
-
klonet_deploy_network()
|
35 |
-
```
|
36 |
-
|
37 |
Task: "Let h2 ping h1."
|
38 |
|
39 |
To ping host `h1` from `h2`, I will use the `klonet_get_ip` tool to retrieve the IP address of h1 and use the `klonet_command_exec` tool to execute the ping command. Here's the code:
|
|
|
7 |
Tools:
|
8 |
<<all_tools>>
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
Task: "Let h2 ping h1."
|
11 |
|
12 |
To ping host `h1` from `h2`, I will use the `klonet_get_ip` tool to retrieve the IP address of h1 and use the `klonet_command_exec` tool to execute the ping command. Here's the code:
|