Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/hypervisors/ovm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</parent>
<dependencies>
<dependency>
<groupId>net.java.dev.vcc.thirdparty</groupId>
<groupId>com.citrix.hypervisor</groupId>
<artifactId>xen-api</artifactId>
<version>${cs.xapi.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion plugins/hypervisors/xenserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.java.dev.vcc.thirdparty</groupId>
<groupId>com.citrix.hypervisor</groupId>
<artifactId>xen-api</artifactId>
<version>${cs.xapi.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ protected boolean poolHasHotFix(Connection conn, String hostIp, String hotFixUui
} catch (Exception e) {
logger.debug("Caught exception during logout", e);
}
conn.dispose();
conn = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,7 @@ protected Network enableVlanNetwork(final Connection conn, final long tag, final
nwr.nameLabel = newName;
nwr.tags = new HashSet<String>();
nwr.tags.add(generateTimeStamp());
nwr.managed = true;
vlanNetwork = Network.create(conn, nwr);
vlanNic = getNetworkByName(conn, newName);
if (vlanNic == null) { // Still vlanNic is null means we could not
Expand Down Expand Up @@ -2018,6 +2019,7 @@ public synchronized Network findOrCreateTunnelNetwork(final Connection conn, fin
// started
otherConfig.put("assume_network_is_shared", "true");
rec.otherConfig = otherConfig;
rec.managed = true;
nw = Network.create(conn, rec);
logger.debug("### XenServer network for tunnels created:" + nwName);
} else {
Expand Down Expand Up @@ -4882,6 +4884,7 @@ public void setupLinkLocalNetwork(final Connection conn) {
configs.put("netmask", NetUtils.getLinkLocalNetMask());
configs.put("vswitch-disable-in-band", "true");
rec.otherConfig = configs;
rec.managed = true;
linkLocal = Network.create(conn, rec);
} else {
linkLocal = networks.iterator().next();
Expand Down Expand Up @@ -5073,6 +5076,7 @@ public synchronized Network setupvSwitchNetwork(final Connection conn) {
if (networks.size() == 0) {
rec.nameDescription = "vswitch network for " + nwName;
rec.nameLabel = nwName;
rec.managed = true;
vswitchNw = Network.create(conn, rec);
} else {
vswitchNw = networks.iterator().next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.cloud.utils.exception.CloudRuntimeException;
import com.xensource.xenapi.APIVersion;
import com.xensource.xenapi.Connection;
import com.xensource.xenapi.ConnectionNew;
import com.xensource.xenapi.Host;
import com.xensource.xenapi.Pool;
import com.xensource.xenapi.Session;
Expand Down Expand Up @@ -150,12 +151,12 @@ static void forceSleep(long sec) {
}

public Connection getConnect(String ip, String username, Queue<String> password) {
Connection conn = new Connection(getURL(ip), 10, _connWait);
Connection conn = new ConnectionNew(getURL(ip), 10, _connWait);
try {
loginWithPassword(conn, username, password, APIVersion.latest().toString());
} catch (Types.HostIsSlave e) {
String maddress = e.masterIPAddress;
conn = new Connection(getURL(maddress), 10, _connWait);
conn = new ConnectionNew(getURL(maddress), 10, _connWait);
try {
loginWithPassword(conn, username, password, APIVersion.latest().toString());
} catch (Exception e1) {
Expand Down Expand Up @@ -221,7 +222,7 @@ public Connection connect(String hostUuid, String poolUuid, String ipAddress,

if ( mConn == null ) {
try {
Connection conn = new Connection(getURL(ipAddress), 5, _connWait);
Connection conn = new ConnectionNew(getURL(ipAddress), 5, _connWait);
Session sess = loginWithPassword(conn, username, password, APIVersion.latest().toString());
Host host = sess.getThisHost(conn);
Boolean hostenabled = host.getEnabled(conn);
Expand All @@ -231,7 +232,6 @@ public Connection connect(String hostUuid, String poolUuid, String ipAddress,
} catch (Exception e) {
LOGGER.debug("Caught exception during logout", e);
}
conn.dispose();
}
if (!hostenabled) {
String msg = "Unable to create master connection, due to master Host " + ipAddress + " is not enabled";
Expand Down
Loading