Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit501c8e7

Browse files
kvapkelvich
authored andcommitted
Add Testeaux perl module with some stubs.
1 parent04a1fe4 commit501c8e7

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

‎Testeaux.pm

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
packageTesteaux;
2+
3+
packagecombineaux
4+
{
5+
subcombine
6+
{
7+
my ($workloads,$troubles) =@_;
8+
9+
my$cluster = starteaux->deploy('lxc');
10+
11+
foreachmy$workload (@$workloads)
12+
{
13+
foreachmy$trouble (@$troubles)
14+
{
15+
print("run workload$workload during trouble$trouble\n");
16+
# FIXME: generate proper id instead of 'hello'
17+
stresseaux::start('hello',$workload,$cluster);
18+
# FIXME: add a time gap here
19+
troubleaux::cause($cluster,$trouble);
20+
# FIXME: add a time gap here
21+
stresseaux::stop('hello');
22+
troubleaux::fix($cluster);
23+
}
24+
}
25+
}
26+
}
27+
28+
packagestresseaux
29+
{
30+
substart
31+
{
32+
my ($id,$workload,$cluster) =@_;
33+
print("start stress$id: workload$workload, cluster$cluster\n");
34+
# fixme: implement
35+
}
36+
37+
substop
38+
{
39+
my$id =shift;
40+
print("stop stress$id\n");
41+
# FIXME: implement
42+
}
43+
}
44+
45+
packagestarteaux
46+
{
47+
subdeploy
48+
{
49+
my ($class,$driver,@args) =@_;
50+
my$self = {};
51+
print("deploy cluster using driver$driver\n");
52+
# fixme: implement
53+
returnbless$self,'starteaux';
54+
}
55+
56+
subup
57+
{
58+
my ($self,$id) =@_;
59+
print("up node$id\n");
60+
# FIXME: implement
61+
}
62+
63+
subdown
64+
{
65+
my ($self,$id =@_;
66+
print("down node$id\n");
67+
# FIXME: implement
68+
}
69+
70+
subdrop
71+
{
72+
my ($self,$src,$dst,$ratio) =@_;
73+
print("drop$ratio packets from$src to$dst\n");
74+
# FIXME: implement
75+
}
76+
77+
subdelay
78+
{
79+
my ($self,$src,$dst,$msec) =@_;
80+
print("delay packets from$src to$dst by$msec msec\n");
81+
# FIXME: implement
82+
}
83+
}
84+
85+
1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp