X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fnetwork_services%2Fnfvi%2Fresource.py;h=5b96aaf297e3df9c6e63cc9c95caafb2f57749d2;hb=9b4e18d1069c3d86af18be5adacde93fa2626bcc;hp=dea754d8baef577cd8aef7448c61168bd75dbc96;hpb=e096baafac0e6594b6ff69c0e296641066583327;p=yardstick.git diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py index dea754d8b..5b96aaf29 100644 --- a/yardstick/network_services/nfvi/resource.py +++ b/yardstick/network_services/nfvi/resource.py @@ -82,6 +82,18 @@ class ResourceProfile(object): self.mgmt = mgmt self.connection = ssh.AutoConnectSSH.from_node(mgmt) + @classmethod + def make_from_node(cls, node, timeout): + # node dict works as mgmt dict + # don't need port names, there is no way we can + # tell what port is used on the compute node + collectd_options = node["collectd"] + plugins = collectd_options.get("plugins", {}) + interval = collectd_options.get("interval") + + # use default cores = None to MatchAllCores + return cls(node, plugins=plugins, interval=interval, timeout=timeout) + def check_if_sa_running(self, process): """ verify if system agent is running """ try: