12 Commits

Author SHA1 Message Date
Jianghua Wang
2c0eb79cd7 Use module name (__name__) for getLogger()
We usually use a period-separated hierarchical module name as
the logger's name. But we have three scripts are using a hardcoded
name. This commit is to change them to use __name__ to make them
consistent with others. By using the period-separated hierarchical
module name, it's easier to know which module generated the log
lines so it's also easier to get the file name.

Change-Id: I373ce9b44caf2b9baffb753e6db7ad8789219f4b
2018-02-22 07:46:03 +00:00
Jianghua Wang
15f56c9f9c Kolla: Include bridge name for host's ipv4s.
Sometime we need to know if a domu's interface is conneted
to a same bridge (network) as dom0's interface. This commit
is to add bridge name for each ipv4 entry in the xenapi facts.

Change-Id: I8a6e1507cfa2c935b18e2fed04abaa06df9b0e51
2018-01-26 10:23:15 +00:00
naichuans
ad90523b23 os-xenapi: Fix bugs related with sshclient modifications
SSHClient.ssh will return three values instead of two, modify
related codes to avoid error.

Change-Id: Idbee3d277e1a89aba683ce2dd38649ffa29c55df
2018-01-26 10:12:34 +00:00
naichuans
5ae81fe3fb os-xenapi: Add setting function to support logging
Add function to support logging

Change-Id: I7b77089b38219467a983c78548787d6dfdafade4
2018-01-24 03:00:59 +00:00
Jianghua Wang
b1bf53ccd6 XenAPI-Kolla: Gather domU's vifs in facts
This commit is to gather domU's vifs in facts. So that the compute
VM's interfaces' vif information will be included in the xenapi_facts.
When deploy OpenStack on XenServers, the vif information can be used
by deployment scripts (e.g. in Kolla-ansible, it can use the vif's
bridge to support provider networks by setting the bridge mappings).

Change-Id: I9a6bebe19ed488bb2173d5dc2daa14e236411243
2018-01-23 13:30:42 +00:00
naichuans
02e19615ac os-xenapi: Add utility to enable conntrack service
Add utility to enable conntrack service

Change-Id: I8cd77832ed90c1b7c951d36402b52d9a3e9f9d98
2018-01-22 03:14:42 +00:00
Jianghua Wang
ebefaa7d0a Kolla-on-XenServer: Add dom0's ip addresses into xenapi facts
This commit is to add dom0's IPs in the xenapi facts. So that
kolla-ansible can use the proper IP address for vxlan tunnel or
other places when require dom0's IPs.

Change-Id: Iede11b4a529ff1885b588bf01d7ff15dc6185092
2018-01-09 14:36:05 +00:00
Zuul
12065324bc Merge "os-xenapi: Add script for iptable configure" 2018-01-09 14:08:02 +00:00
naichuans
60e43c9046 os-xenapi: Add script for iptable configure
Add a script to do iptable configuration

Change-Id: I0c984bbb1fecebdee6ca9afac238c0c5ba5e5bd8
2018-01-09 09:02:56 +00:00
Jianghua Wang
870e502850 Refactor for get_xenapi_facts
This commit contains the following changes:
1. remove it from cmd; as there is no need to expose this as a
   separate command. Making this as an util which will be invoked
   by xenapi_bootstrap.
2. rename the general function of get_hostname to be get_remote_hostname
   and move it to common_functions.
3. change the keywords for the facts items to make it more clear.

Change-Id: Ie786b3085c29f9a1faf2c51a1a704ded1010af7b
2018-01-05 09:22:13 +00:00
Jianghua Wang
a69cf17f67 Add a new command to get facts for XenAPI
This commit is to add a new command - get_xenapi_facts
which will gather facts for XenAPI. When deploy OpenStack
on XenServer, the facts can be used by deploy approach(e.g.
kolla-ansible).

Change-Id: Ia606d6ddc651cfa0b75fa34d8f14bc156d9dbe27
2017-12-26 05:29:24 +00:00
naichuans
7b6aa0ad9b os-xenapi: Add utils to support HIMN configure
Add utils to do HIMN configuration. If the local HIMN interface
is up and gets IP address allocated, we can get the interface
via checking if the local interface has an IP belong to the same
network as the dom0's HIMN IP which should be supplied. Otherwise
read xenstore to get mac address and find the interface via mac.
After identified the interface, we populate the ifcfg file to
ensure this interface will be up in the future across boots.

Change-Id: I5f8cd53710edb714f0c4c1dc50c1d4472f2e365f
Depends-on: Ia363afc1fc932bf44a7ac956a5bc27978bb47868
2017-12-25 08:20:21 +00:00