-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<fix>[conf]: add virtualswitch module
DBImpact Resolves: ZSTAC-58532 Change-Id: I6876757566726679776f647a7870757163687275
- Loading branch information
Showing
43 changed files
with
1,386 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CREATE TABLE IF NOT EXISTS `zstack`.`L2VirtualSwitchNetworkVO` ( | ||
`uuid` varchar(32) NOT NULL UNIQUE, | ||
`isDistributed` boolean NOT NULL DEFAULT TRUE, | ||
PRIMARY KEY (`uuid`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `zstack`.`L2PortGroupNetworkVO` ( | ||
`uuid` varchar(32) NOT NULL UNIQUE, | ||
`vSwitchUuid` varchar(32) NOT NULL, | ||
`vlanMode` varchar(32) NOT NULL default 'ACCESS', | ||
`vlanId` int unsigned NOT NULL, | ||
`vlanRanges` varchar(256) default NULL, | ||
PRIMARY KEY (`uuid`), | ||
CONSTRAINT `fkL2PortGroupNetworkVOL2VirtualSwitchNetworkVO` FOREIGN KEY (`vSwitchUuid`) REFERENCES L2VirtualSwitchNetworkVO (`uuid`) ON DELETE CASCADE | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `zstack`.`L2NetworkHostRefVO` ( | ||
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT, | ||
`l2NetworkUuid` varchar(32) NOT NULL, | ||
`hostUuid` varchar(32) NOT NULL, | ||
`l2ProviderType` varchar(32) default NULL, | ||
`attachStatus` varchar(32) default NULL, | ||
`lastOpDate` timestamp ON UPDATE CURRENT_TIMESTAMP, | ||
`createDate` timestamp, | ||
PRIMARY KEY (`id`), | ||
CONSTRAINT `fkL2NetworkHostRefVOHostEO` FOREIGN KEY (`hostUuid`) REFERENCES HostEO (`uuid`) ON DELETE CASCADE, | ||
CONSTRAINT `fkL2NetworkHostRefVOL2NetworkEO` FOREIGN KEY (`l2NetworkUuid`) REFERENCES L2NetworkEO (`uuid`) ON DELETE CASCADE | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
ALTER TABLE `zstack`.`L2NetworkClusterRefVO` ADD COLUMN `l2ProviderType` varchar(32) default NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
header/src/main/java/org/zstack/header/network/l2/AttachL2NetworkToClusterMsg.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.zstack.header.network.l2; | ||
|
||
import org.zstack.header.message.NeedReplyMessage; | ||
|
||
/** | ||
*/ | ||
public class AttachL2NetworkToClusterMsg extends NeedReplyMessage implements L2NetworkMessage { | ||
private String l2NetworkUuid; | ||
private String clusterUuid; | ||
private String l2ProviderType; | ||
|
||
public String getL2NetworkUuid() { | ||
return l2NetworkUuid; | ||
} | ||
|
||
public void setL2NetworkUuid(String l2NetworkUuid) { | ||
this.l2NetworkUuid = l2NetworkUuid; | ||
} | ||
|
||
public String getClusterUuid() { | ||
return clusterUuid; | ||
} | ||
|
||
public void setClusterUuid(String clusterUuid) { | ||
this.clusterUuid = clusterUuid; | ||
} | ||
|
||
public String getL2ProviderType() { | ||
return l2ProviderType; | ||
} | ||
|
||
public void setL2ProviderType(String l2ProviderType) { | ||
this.l2ProviderType = l2ProviderType; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
header/src/main/java/org/zstack/header/network/l2/AttachL2NetworkToClusterReply.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.zstack.header.network.l2; | ||
|
||
import org.zstack.header.message.MessageReply; | ||
|
||
/** | ||
*/ | ||
public class AttachL2NetworkToClusterReply extends MessageReply { | ||
} |
8 changes: 8 additions & 0 deletions
8
header/src/main/java/org/zstack/header/network/l2/L2NetworkAttachStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.zstack.header.network.l2; | ||
|
||
public enum L2NetworkAttachStatus { | ||
None, | ||
CheckFailed, | ||
AttachFailed, | ||
Attached, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.