diff options
author | John O'Loughlin <john.oloughlin@intel.com> | 2018-05-17 15:06:53 +0000 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-10 10:31:30 +0100 |
commit | ff3cd7a245840606b09322c7705f8a64cf1868f2 (patch) | |
tree | 59a2cb213e0991cb2ea4184ef961882e1dc1e660 /yardstick/common/exceptions.py | |
parent | 028e92b1b2dcbaffd4a80061cc3d387877b59d62 (diff) |
Add "ports" parameters in Kubernetes context
This new parameter, "ports", will allow the user to
automatically to add port variables in a pod definition:
context:
type: Kubernetes
servers:
host:
image: ...
commands: ...
ports:
- containerPort: <port value> # Mandatory
hostIP: <host IP> # Optional
hostPort: <host port> # Optional
name: <port name> # Optional
protocol: <protocol name> # Optional
The port type and the definition must be one of the supported ones
in Kubernetes [1].
Container port definition, V1 API, Kubernetes Python library v6.0.0 [2]
[1] https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/
[2] https://github.com/kubernetes-client/python/blob/6.0.0/kubernetes/client/models/v1_container_port.py
JIRA: YARDSTICK-1183
Change-Id: I3673dbeec8d380cb2f8b1dacf6c25c7cdbc37e28
Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
Diffstat (limited to 'yardstick/common/exceptions.py')
-rw-r--r-- | yardstick/common/exceptions.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py index 018654a4e..641c4e1c4 100644 --- a/yardstick/common/exceptions.py +++ b/yardstick/common/exceptions.py @@ -241,6 +241,10 @@ class KubernetesWrongRestartPolicy(YardstickException): message = 'Restart policy "%(rpolicy)s" is not valid' +class KubernetesContainerPortNotDefined(YardstickException): + message = 'Container port not defined in "%(port)s"' + + class ScenarioCreateNetworkError(YardstickException): message = 'Create Neutron Network Scenario failed' |