1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/// Agent status.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
/// Status is not specified.
Unspecified = 0,
/// Agent is preparing a test to be executed.
PreparingTest = 1,
/// Agent is ready to take a test.
ReadyForTest = 2,
/// Agent is executing a test.
Testing = 3,
/// Agent application encountered an error and cannot operate normally.
TankFailed = 4,
/// Agent is waiting for resources to be allocated.
Provisioning = 5,
/// Agent is being stopped.
Stopping = 6,
/// Agent is stopped.
Stopped = 7,
/// Agent is being started.
Starting = 8,
/// Agent is being restarted.
Restarting = 9,
/// Agent is being updated.
Updating = 10,
/// Agent encountered an error and cannot operate.
Error = 11,
/// Agent is crashed and will be restarted automatically.
Crashed = 12,
/// Agent is being deleted.
Deleting = 13,
/// Service is waiting for connection with agent to be established.
InitializingConnection = 15,
/// Service has lost connection with agent.
LostConnectionWithAgent = 16,
/// Agent is uploading test artifacts.
UploadingArtifacts = 17,
}
impl Status {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::PreparingTest => "PREPARING_TEST",
Status::ReadyForTest => "READY_FOR_TEST",
Status::Testing => "TESTING",
Status::TankFailed => "TANK_FAILED",
Status::Provisioning => "PROVISIONING",
Status::Stopping => "STOPPING",
Status::Stopped => "STOPPED",
Status::Starting => "STARTING",
Status::Restarting => "RESTARTING",
Status::Updating => "UPDATING",
Status::Error => "ERROR",
Status::Crashed => "CRASHED",
Status::Deleting => "DELETING",
Status::InitializingConnection => "INITIALIZING_CONNECTION",
Status::LostConnectionWithAgent => "LOST_CONNECTION_WITH_AGENT",
Status::UploadingArtifacts => "UPLOADING_ARTIFACTS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PREPARING_TEST" => Some(Self::PreparingTest),
"READY_FOR_TEST" => Some(Self::ReadyForTest),
"TESTING" => Some(Self::Testing),
"TANK_FAILED" => Some(Self::TankFailed),
"PROVISIONING" => Some(Self::Provisioning),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"STARTING" => Some(Self::Starting),
"RESTARTING" => Some(Self::Restarting),
"UPDATING" => Some(Self::Updating),
"ERROR" => Some(Self::Error),
"CRASHED" => Some(Self::Crashed),
"DELETING" => Some(Self::Deleting),
"INITIALIZING_CONNECTION" => Some(Self::InitializingConnection),
"LOST_CONNECTION_WITH_AGENT" => Some(Self::LostConnectionWithAgent),
"UPLOADING_ARTIFACTS" => Some(Self::UploadingArtifacts),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogSettings {
/// Id of Yandex Cloud log group to upload agent logs to
#[prost(string, tag = "1")]
pub cloud_log_group_id: ::prost::alloc::string::String,
}
/// Load testing agent on which tests are executed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Agent {
/// ID of the agent. Generated at creation time.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// ID of the folder that the agent belongs to.
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
/// Name of the agent.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// Description of the agent.
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
/// ID of the compute instance managed by the agent.
///
/// Empty if there is no such instance (i.e. the case of external agent).
#[prost(string, tag = "5")]
pub compute_instance_id: ::prost::alloc::string::String,
/// Status of the agent.
#[prost(enumeration = "Status", tag = "7")]
pub status: i32,
/// List of errors reported by the agent.
#[prost(string, repeated, tag = "8")]
pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// ID of the test that is currently being executed by the agent.
#[prost(string, tag = "9")]
pub current_job_id: ::prost::alloc::string::String,
/// Version of the agent.
#[prost(string, tag = "10")]
pub agent_version_id: ::prost::alloc::string::String,
/// Agent labels as `key:value` pairs.
#[prost(map = "string, string", tag = "12")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Agent log settings
#[prost(message, optional, tag = "13")]
pub log_settings: ::core::option::Option<LogSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateComputeInstance {
/// Resource labels as `key:value` pairs.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// ID of the availability zone where the instance resides.
/// To get a list of available zones, use the \[yandex.cloud.compute.v1.ZoneService.List\] request
#[prost(string, tag = "5")]
pub zone_id: ::prost::alloc::string::String,
/// Computing resources of the instance, such as the amount of memory and number of cores.
/// To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
#[prost(message, optional, tag = "7")]
pub resources_spec: ::core::option::Option<
super::super::super::super::compute::v1::ResourcesSpec,
>,
/// The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
/// The total size of all keys and values must be less than 512 KB.
///
/// Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
/// The values must be 256 KB or less.
///
/// For example, you may use the metadata in order to provide your public SSH key to the instance.
/// For more information, see \[Metadata\](/docs/compute/concepts/vm-metadata).
#[prost(map = "string, string", tag = "8")]
pub metadata: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Boot disk to attach to the instance.
#[prost(message, optional, tag = "9")]
pub boot_disk_spec: ::core::option::Option<
super::super::super::super::compute::v1::AttachedDiskSpec,
>,
/// Network configuration for the instance. Specifies how the network interface is configured
/// to interact with other services on the internal network and on the internet.
/// Currently only one network interface is supported per instance.
#[prost(message, repeated, tag = "11")]
pub network_interface_specs: ::prost::alloc::vec::Vec<
super::super::super::super::compute::v1::NetworkInterfaceSpec,
>,
/// ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
/// To get the service account ID, use a \[yandex.cloud.iam.v1.ServiceAccountService.List\] request.
#[prost(string, tag = "14")]
pub service_account_id: ::prost::alloc::string::String,
/// ID of the [Compute VM platform](/docs/compute/concepts/vm-platforms) on which the agent will be created.
/// Default value: "standard-v2"
#[prost(string, tag = "15")]
pub platform_id: ::prost::alloc::string::String,
}