Cherry-pick to r/2018.10 branch of commit bcc89e5
This commit increases the vswitch hugepage number for virtual
environments from 512 to 1024, making it equal to the same amount
used for non-virtual environments.
An issue was seen after the da1110a commit to enable LLDP
over OVS, in which puppet would fail to successfully add ports to
OVS. The issue would have manifested previously not as a puppet
error, but as a failure to communicate over the data ports of
some virtual compute nodes.
The issue is a failure of DPDK to be able to find a contiguous
mempool of sufficient size in any of the hugepages, which can
happen in a virtual environment restricted to a 2M hugepage size.
Since 1G and 2M pages can be used for both vswitch and vm
purposes, the concept of a hugepage role is removed.
Finally, the code has had some cleanup to separate out constants
and make variable names more pythonic. Unit identifiers have
been made consistent for readability and to prevent confusion.
Change-Id: I14550526deddfaf13284d9273397a00b80eb8527
Closes-Bug: #1796380
Signed-off-by: Steven Webster <steven.webster@windriver.com>