diff --git a/scripts/network/juniper/access-profile-add.xml b/scripts/network/juniper/access-profile-add.xml
new file mode 100644
index 00000000000..7892d669fb5
--- /dev/null
+++ b/scripts/network/juniper/access-profile-add.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+%access-profile-name%
+
+%username%
+
+%password%
+
+
+
+%address-pool-name%
+
+
+
+
+
+
diff --git a/scripts/network/juniper/access-profile-getall.xml b/scripts/network/juniper/access-profile-getall.xml
new file mode 100644
index 00000000000..d4376590a34
--- /dev/null
+++ b/scripts/network/juniper/access-profile-getall.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/access-profile-getone.xml b/scripts/network/juniper/access-profile-getone.xml
new file mode 100644
index 00000000000..2e6960b6ef1
--- /dev/null
+++ b/scripts/network/juniper/access-profile-getone.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+%access-profile-name%
+
+
+
+
+
diff --git a/scripts/network/juniper/address-book-entry-getall.xml b/scripts/network/juniper/address-book-entry-getall.xml
new file mode 100644
index 00000000000..85402490458
--- /dev/null
+++ b/scripts/network/juniper/address-book-entry-getall.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+%zone%
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/address-pool-add.xml b/scripts/network/juniper/address-pool-add.xml
new file mode 100644
index 00000000000..4cbaa91d7cc
--- /dev/null
+++ b/scripts/network/juniper/address-pool-add.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+%address-pool-name%
+
+
+%guest-network-cidr%
+
+%address-range-name%
+%low-address%
+%high-address%
+
+
+%primary-dns-address%
+
+
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/address-pool-getall.xml b/scripts/network/juniper/address-pool-getall.xml
new file mode 100644
index 00000000000..9a4486c51c7
--- /dev/null
+++ b/scripts/network/juniper/address-pool-getall.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/address-pool-getone.xml b/scripts/network/juniper/address-pool-getone.xml
new file mode 100644
index 00000000000..060a5678fc6
--- /dev/null
+++ b/scripts/network/juniper/address-pool-getone.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+%address-pool-name%
+
+
+
+
+
+
diff --git a/scripts/network/juniper/dynamic-vpn-client-add.xml b/scripts/network/juniper/dynamic-vpn-client-add.xml
new file mode 100644
index 00000000000..194e9ed0f32
--- /dev/null
+++ b/scripts/network/juniper/dynamic-vpn-client-add.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+%client-name%
+
+%guest-network-cidr%
+
+
+0.0.0.0/0
+
+
+0.0.0.0/32
+
+
+1.1.1.1/24
+
+%ipsec-vpn-name%
+
+%username%
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/dynamic-vpn-client-getall.xml b/scripts/network/juniper/dynamic-vpn-client-getall.xml
new file mode 100644
index 00000000000..e8c7e280fea
--- /dev/null
+++ b/scripts/network/juniper/dynamic-vpn-client-getall.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/dynamic-vpn-client-getone.xml b/scripts/network/juniper/dynamic-vpn-client-getone.xml
new file mode 100644
index 00000000000..7ddd2ff705b
--- /dev/null
+++ b/scripts/network/juniper/dynamic-vpn-client-getone.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+%client-name%
+
+
+
+
+
+
diff --git a/scripts/network/juniper/ike-gateway-add.xml b/scripts/network/juniper/ike-gateway-add.xml
new file mode 100644
index 00000000000..6cd78fdeb59
--- /dev/null
+++ b/scripts/network/juniper/ike-gateway-add.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+%gateway-name%
+%ike-policy-name%
+
+%ike-gateway-hostname%
+
+%public-interface-name%
+
+%access-profile-name%
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/ike-gateway-getall.xml b/scripts/network/juniper/ike-gateway-getall.xml
new file mode 100644
index 00000000000..45e977e3634
--- /dev/null
+++ b/scripts/network/juniper/ike-gateway-getall.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/ike-gateway-getone.xml b/scripts/network/juniper/ike-gateway-getone.xml
new file mode 100644
index 00000000000..ae7359d3a60
--- /dev/null
+++ b/scripts/network/juniper/ike-gateway-getone.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+%gateway-name%
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/ike-policy-add.xml b/scripts/network/juniper/ike-policy-add.xml
new file mode 100644
index 00000000000..29b96e7ae64
--- /dev/null
+++ b/scripts/network/juniper/ike-policy-add.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+%policy-name%
+aggressive
+%proposal-name%
+
+%pre-shared-key%
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/ike-policy-getall.xml b/scripts/network/juniper/ike-policy-getall.xml
new file mode 100644
index 00000000000..237cf6e47b6
--- /dev/null
+++ b/scripts/network/juniper/ike-policy-getall.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/ike-policy-getone.xml b/scripts/network/juniper/ike-policy-getone.xml
new file mode 100644
index 00000000000..58d146041bf
--- /dev/null
+++ b/scripts/network/juniper/ike-policy-getone.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+%policy-name%
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/ipsec-vpn-add.xml b/scripts/network/juniper/ipsec-vpn-add.xml
new file mode 100644
index 00000000000..08b5bb45f24
--- /dev/null
+++ b/scripts/network/juniper/ipsec-vpn-add.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+%ipsec-vpn-name%
+
+%ike-gateway%
+%ipsec-policy-name%
+
+on-traffic
+
+
+
+
+
+
diff --git a/scripts/network/juniper/ipsec-vpn-getall.xml b/scripts/network/juniper/ipsec-vpn-getall.xml
new file mode 100644
index 00000000000..64dc6b43752
--- /dev/null
+++ b/scripts/network/juniper/ipsec-vpn-getall.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/network/juniper/ipsec-vpn-getone.xml b/scripts/network/juniper/ipsec-vpn-getone.xml
new file mode 100644
index 00000000000..bccf8b73f59
--- /dev/null
+++ b/scripts/network/juniper/ipsec-vpn-getone.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+%ipsec-vpn-name%
+
+
+
+
+
+
diff --git a/scripts/network/juniper/private-interface-getall.xml b/scripts/network/juniper/private-interface-getall.xml
new file mode 100644
index 00000000000..656ce4396cf
--- /dev/null
+++ b/scripts/network/juniper/private-interface-getall.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+%private-interface-name%
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/proxy-arp-getall.xml b/scripts/network/juniper/proxy-arp-getall.xml
new file mode 100644
index 00000000000..8ec41723b2b
--- /dev/null
+++ b/scripts/network/juniper/proxy-arp-getall.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+%interface-name%
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/network/juniper/security-policy-rename.xml b/scripts/network/juniper/security-policy-rename.xml
new file mode 100644
index 00000000000..14218aae190
--- /dev/null
+++ b/scripts/network/juniper/security-policy-rename.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+%from-zone%
+%to-zone%
+
+%policy-name%
+
+
+
+
+
+
+
diff --git a/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java b/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java
new file mode 100644
index 00000000000..7dc2d6a768d
--- /dev/null
+++ b/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
+ *
+ * This software is licensed under the GNU General Public License v3 or later.
+ *
+ * It is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package com.cloud.network;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name=("inline_load_balancer_nic_map"))
+public class InlineLoadBalancerNicMapVO {
+ @Id
+ @GeneratedValue(strategy=GenerationType.IDENTITY)
+ @Column(name="id")
+ private long id;
+
+ @Column(name="load_balancer_id")
+ private long loadBalancerId;
+
+ @Column(name="public_ip_address")
+ private String publicIpAddress;
+
+ @Column(name="nic_id")
+ private long nicId;
+
+ public InlineLoadBalancerNicMapVO() { }
+
+ public InlineLoadBalancerNicMapVO(long loadBalancerId, String publicIpAddress, long nicId) {
+ this.loadBalancerId = loadBalancerId;
+ this.publicIpAddress = publicIpAddress;
+ this.nicId = nicId;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public long getLoadBalancerId() {
+ return loadBalancerId;
+ }
+
+ public String getPublicIpAddress() {
+ return publicIpAddress;
+ }
+
+ public long getNicId() {
+ return nicId;
+ }
+}
diff --git a/server/src/com/cloud/network/dao/InlineLoadBalancerNicMapDao.java b/server/src/com/cloud/network/dao/InlineLoadBalancerNicMapDao.java
new file mode 100644
index 00000000000..ac2ad59e859
--- /dev/null
+++ b/server/src/com/cloud/network/dao/InlineLoadBalancerNicMapDao.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
+ *
+ * This software is licensed under the GNU General Public License v3 or later.
+ *
+ * It is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package com.cloud.network.dao;
+
+import com.cloud.network.InlineLoadBalancerNicMapVO;
+import com.cloud.utils.db.GenericDao;
+
+public interface InlineLoadBalancerNicMapDao extends GenericDao {
+ InlineLoadBalancerNicMapVO findByPublicIpAddress(String publicIpAddress);
+ InlineLoadBalancerNicMapVO findByNicId(long nicId);
+}
diff --git a/server/src/com/cloud/network/dao/InlineLoadBalancerNicMapDaoImpl.java b/server/src/com/cloud/network/dao/InlineLoadBalancerNicMapDaoImpl.java
new file mode 100644
index 00000000000..f30ba19a27e
--- /dev/null
+++ b/server/src/com/cloud/network/dao/InlineLoadBalancerNicMapDaoImpl.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
+ *
+ * This software is licensed under the GNU General Public License v3 or later.
+ *
+ * It is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package com.cloud.network.dao;
+
+import javax.ejb.Local;
+
+import com.cloud.network.InlineLoadBalancerNicMapVO;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchCriteria;
+
+@Local(value={InlineLoadBalancerNicMapDao.class})
+public class InlineLoadBalancerNicMapDaoImpl extends GenericDaoBase implements InlineLoadBalancerNicMapDao {
+
+ @Override
+ public InlineLoadBalancerNicMapVO findByPublicIpAddress(String publicIpAddress) {
+ SearchCriteria sc = createSearchCriteria();
+ sc.addAnd("publicIpAddress", SearchCriteria.Op.EQ, publicIpAddress);
+
+ return findOneBy(sc);
+ }
+
+ @Override
+ public InlineLoadBalancerNicMapVO findByNicId(long nicId) {
+ SearchCriteria sc = createSearchCriteria();
+ sc.addAnd("nicId", SearchCriteria.Op.EQ, nicId);
+
+ return findOneBy(sc);
+ }
+
+}