diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-10-13 15:18:16 -0700 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-10-17 00:35:32 -0700 |
commit | 095374ac59f9b390f8106ae877524e99a533a49c (patch) | |
tree | 22614a4dd41132c7c55bfd57382d9b5215030563 /yardstick/network_services/nfvi | |
parent | cb6559ca7a95f836eb386c04783c9446e7240967 (diff) |
resource: move make_resource_profile to ResourceProfile
move factory method from Collector to ResourceProfile
Change-Id: I1ddf3cffed7a3b2d45aa9cbffd3c0a5925c325d6
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/network_services/nfvi')
-rw-r--r-- | yardstick/network_services/nfvi/resource.py | 12 |
1 files changed, 12 insertions, 0 deletions
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: |