deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dko...@apache.org
Subject [1/3] FGCP: Network API rev 3 - FGCP Driver implementation
Date Fri, 24 May 2013 10:56:50 GMT
Updated Branches:
  refs/heads/master 3ebea1c47 -> 4f2faaa7d


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4f2faaa7/server/tests/drivers/fgcp/fixtures/test_0006_must_have_subnets.yml
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/fixtures/test_0006_must_have_subnets.yml b/server/tests/drivers/fgcp/fixtures/test_0006_must_have_subnets.yml
new file mode 100644
index 0000000..cb8223c
--- /dev/null
+++ b/server/tests/drivers/fgcp/fixtures/test_0006_must_have_subnets.yml
@@ -0,0 +1,94 @@
+---
+http_interactions:
+- request:
+    method: get
+    uri: https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?AccessKeyId=QVVTIEVhc3Rlcm4gU3RhbmRhcmQgVGltZSYxMzY5MzcyMTMwMDAwJjEuMCZT%0ASEExd2l0aFJTQQ==%0A&Action=ListVSYS&Locale=en&Signature=aOSUQwyYomNFglbB5QlWHIds1nVshnhchyrbo4vQb%2BCjPSrmp5xoZFkQ9Rsq%0A7ElfdCVhU2GGCgsf179gD/hKXfSej65%2BrquYlRHYtST2ofFkCzePY8B6Z/43%0AcZ1K0QfJDLPYJDWpEuXBGN4HTNgZjvURGosk8d/w48wGKtaa84iZ1DP09KOP%0Af2vWPnQkgu8c4zhXy5hhIrydZl%2BFjh5RMcU36CkXfOS9hUaHQfHdCx6EDEjc%0AuFxJpAcYKUbi9MEnWiWJIEJ6iJc0WyDA4gZWP9NlqM0VQoYhssDkMrsTv6u1%0AlPaEhW37A%2B/BBP0Q2tz4LYKI4AbF15hiOiCLhUzOpg==%0A&Version=2011-01-31
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - text/xml
+      User-Agent:
+      - OViSS-API-CLIENT
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Date:
+      - Fri, 24 May 2013 05:08:50 GMT
+      Set-Cookie:
+      - JSESSIONID=C55F8B04F49CE2DFD4753DE8FE5D7404; Path=/ovisspxy; Secure
+      Content-Type:
+      - text/xml;charset=UTF-8
+      Connection:
+      - close
+      Transfer-Encoding:
+      - chunked
+    body:
+      encoding: US-ASCII
+      string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ListVSYSResponse
xmlns=\"http://apioviss.jp.fujitsu.com\">\r\n
+        \ <responseMessage>Processing was completed.</responseMessage>\r\n  <responseStatus>SUCCESS</responseStatus>\r\n
+        \ <vsyss>\r\n    <vsys>\r\n      <baseDescriptor>2-tier Skeleton</baseDescriptor>\r\n
+        \     <creator>UZXC0GRT</creator>\r\n      <description>2-tier
Skeleton</description>\r\n
+        \     <vsysId>UZXC0GRT-ZG8ZJCJ07</vsysId>\r\n      <vsysName>Dies-DC-test</vsysName>\r\n
+        \   </vsys>\r\n  </vsyss>\r\n</ListVSYSResponse>\r\n\r\n"
+    http_version: 
+  recorded_at: Fri, 24 May 2013 05:08:50 GMT
+- request:
+    method: get
+    uri: https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?AccessKeyId=QVVTIEVhc3Rlcm4gU3RhbmRhcmQgVGltZSYxMzY5MzcyMTMwMDAwJjEuMCZT%0ASEExd2l0aFJTQQ==%0A&Action=GetVSYSConfiguration&Locale=en&Signature=aOSUQwyYomNFglbB5QlWHIds1nVshnhchyrbo4vQb%2BCjPSrmp5xoZFkQ9Rsq%0A7ElfdCVhU2GGCgsf179gD/hKXfSej65%2BrquYlRHYtST2ofFkCzePY8B6Z/43%0AcZ1K0QfJDLPYJDWpEuXBGN4HTNgZjvURGosk8d/w48wGKtaa84iZ1DP09KOP%0Af2vWPnQkgu8c4zhXy5hhIrydZl%2BFjh5RMcU36CkXfOS9hUaHQfHdCx6EDEjc%0AuFxJpAcYKUbi9MEnWiWJIEJ6iJc0WyDA4gZWP9NlqM0VQoYhssDkMrsTv6u1%0AlPaEhW37A%2B/BBP0Q2tz4LYKI4AbF15hiOiCLhUzOpg==%0A&Version=2011-01-31&vsysId=UZXC0GRT-ZG8ZJCJ07
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - text/xml
+      User-Agent:
+      - OViSS-API-CLIENT
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Date:
+      - Fri, 24 May 2013 05:08:51 GMT
+      Set-Cookie:
+      - JSESSIONID=6009BFA10821BF9263A72E7B1D064AF4; Path=/ovisspxy; Secure
+      Content-Type:
+      - text/xml;charset=UTF-8
+      Connection:
+      - close
+      Transfer-Encoding:
+      - chunked
+    body:
+      encoding: US-ASCII
+      string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetVSYSConfigurationResponse
+        xmlns=\"http://apioviss.jp.fujitsu.com\">\r\n  <responseMessage>Processing
+        was completed.</responseMessage>\r\n  <responseStatus>SUCCESS</responseStatus>\r\n
+        \ <vsys>\r\n    <baseDescriptor>2-tier Skeleton</baseDescriptor>\r\n
   <cloudCategory>PUBLIC</cloudCategory>\r\n
+        \   <creator>UZXC0GRT</creator>\r\n    <description>2-tier Skeleton</description>\r\n
+        \   <publicips>\r\n      <publicip>\r\n        <address>137.172.209.220</address>\r\n
+        \       <v4v6Flag>IPv4</v4v6Flag>\r\n      </publicip>\r\n    </publicips>\r\n
+        \   <vnets>\r\n      <vnet>\r\n        <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \     </vnet>\r\n      <vnet>\r\n        <networkId>UZXC0GRT-ZG8ZJCJ07-N-SECURE1</networkId>\r\n
+        \     </vnet>\r\n    </vnets>\r\n    <vservers>\r\n      <vserver>\r\n
       <creator>UZXC0GRT</creator>\r\n
+        \       <diskimageId>FW_EX2000AIN20130125</diskimageId>\r\n        <vdisks
+        />\r\n        <vnics>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \           <nicNo>4</nicNo>\r\n            <privateIp>192.168.0.11</privateIp>\r\n
+        \         </vnic>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-SECURE1</networkId>\r\n
+        \           <nicNo>5</nicNo>\r\n            <privateIp>192.168.1.11</privateIp>\r\n
+        \         </vnic>\r\n        </vnics>\r\n        <vserverId>UZXC0GRT-ZG8ZJCJ07-S-0001</vserverId>\r\n
+        \       <vserverName>Firewall</vserverName>\r\n        <vserverType>firewall</vserverType>\r\n
+        \     </vserver>\r\n      <vserver>\r\n        <creator>UZXC0GRT</creator>\r\n
+        \       <diskimageId>IMG_3c9820_S24FWXU0Q9VH0JK</diskimageId>\r\n   
    <vdisks
+        />\r\n        <vnics>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \           <nicNo>0</nicNo>\r\n            <privateIp>192.168.0.12</privateIp>\r\n
+        \         </vnic>\r\n        </vnics>\r\n        <vserverId>UZXC0GRT-ZG8ZJCJ07-S-0547</vserverId>\r\n
+        \       <vserverName>sdf</vserverName>\r\n        <vserverType>economy</vserverType>\r\n
+        \     </vserver>\r\n    </vservers>\r\n    <vsysId>UZXC0GRT-ZG8ZJCJ07</vsysId>\r\n
+        \   <vsysName>Dies-DC-test</vsysName>\r\n  </vsys>\r\n</GetVSYSConfigurationResponse>\r\n\r\n"
+    http_version: 
+  recorded_at: Fri, 24 May 2013 05:08:51 GMT
+recorded_with: VCR 2.5.0

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4f2faaa7/server/tests/drivers/fgcp/fixtures/test_0007_must_have_address_blocks.yml
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/fixtures/test_0007_must_have_address_blocks.yml b/server/tests/drivers/fgcp/fixtures/test_0007_must_have_address_blocks.yml
new file mode 100644
index 0000000..cf10694
--- /dev/null
+++ b/server/tests/drivers/fgcp/fixtures/test_0007_must_have_address_blocks.yml
@@ -0,0 +1,94 @@
+---
+http_interactions:
+- request:
+    method: get
+    uri: https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?AccessKeyId=QVVTIEVhc3Rlcm4gU3RhbmRhcmQgVGltZSYxMzY5MzcyMTI4MDAwJjEuMCZT%0ASEExd2l0aFJTQQ==%0A&Action=ListVSYS&Locale=en&Signature=GnNi5DtUIwvYrxvrl/e/8DBWbAuwXyk6CVtSpZRkrDHu35I3nW%2Bs4sf2EmH3%0AH0MiYLt4AtNnEF9zNtCkfPqRwZ8Tt1Q8llrACrJb6IAndW2/JZ%2BAX4sfFuv%2B%0A3ojTSZTpyvVfOVQWHGksDLciL3Rm9Vk5zfKgAXYQr%2BcJeulxnRrKgsdBg1Tw%0ASFMPcRQigOp2MUnbpOy3zxOJwCJXYGiiUmLAK5eDxr2cIcTNHlpxxtK9yzrs%0AYryEPDeoLC%2B8aWLlQdZLQ2OjVWeNpG8OcK9I3LoRR7QV1ndozqBsPA5cISM7%0Ahetnp2FBsnuJB4LZE3IS%2BDg6YmAXyWeYh7eqM1yVdw==%0A&Version=2011-01-31
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - text/xml
+      User-Agent:
+      - OViSS-API-CLIENT
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Date:
+      - Fri, 24 May 2013 05:08:48 GMT
+      Set-Cookie:
+      - JSESSIONID=35EF4CF084E9AE8F4FA5960A3A92486B; Path=/ovisspxy; Secure
+      Content-Type:
+      - text/xml;charset=UTF-8
+      Connection:
+      - close
+      Transfer-Encoding:
+      - chunked
+    body:
+      encoding: US-ASCII
+      string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ListVSYSResponse
xmlns=\"http://apioviss.jp.fujitsu.com\">\r\n
+        \ <responseMessage>Processing was completed.</responseMessage>\r\n  <responseStatus>SUCCESS</responseStatus>\r\n
+        \ <vsyss>\r\n    <vsys>\r\n      <baseDescriptor>2-tier Skeleton</baseDescriptor>\r\n
+        \     <creator>UZXC0GRT</creator>\r\n      <description>2-tier
Skeleton</description>\r\n
+        \     <vsysId>UZXC0GRT-ZG8ZJCJ07</vsysId>\r\n      <vsysName>Dies-DC-test</vsysName>\r\n
+        \   </vsys>\r\n  </vsyss>\r\n</ListVSYSResponse>\r\n\r\n"
+    http_version: 
+  recorded_at: Fri, 24 May 2013 05:08:48 GMT
+- request:
+    method: get
+    uri: https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?AccessKeyId=QVVTIEVhc3Rlcm4gU3RhbmRhcmQgVGltZSYxMzY5MzcyMTI4MDAwJjEuMCZT%0ASEExd2l0aFJTQQ==%0A&Action=GetVSYSConfiguration&Locale=en&Signature=GnNi5DtUIwvYrxvrl/e/8DBWbAuwXyk6CVtSpZRkrDHu35I3nW%2Bs4sf2EmH3%0AH0MiYLt4AtNnEF9zNtCkfPqRwZ8Tt1Q8llrACrJb6IAndW2/JZ%2BAX4sfFuv%2B%0A3ojTSZTpyvVfOVQWHGksDLciL3Rm9Vk5zfKgAXYQr%2BcJeulxnRrKgsdBg1Tw%0ASFMPcRQigOp2MUnbpOy3zxOJwCJXYGiiUmLAK5eDxr2cIcTNHlpxxtK9yzrs%0AYryEPDeoLC%2B8aWLlQdZLQ2OjVWeNpG8OcK9I3LoRR7QV1ndozqBsPA5cISM7%0Ahetnp2FBsnuJB4LZE3IS%2BDg6YmAXyWeYh7eqM1yVdw==%0A&Version=2011-01-31&vsysId=UZXC0GRT-ZG8ZJCJ07
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - text/xml
+      User-Agent:
+      - OViSS-API-CLIENT
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Date:
+      - Fri, 24 May 2013 05:08:49 GMT
+      Set-Cookie:
+      - JSESSIONID=2D0AD7E5D284A14FC366CD5232336AB6; Path=/ovisspxy; Secure
+      Content-Type:
+      - text/xml;charset=UTF-8
+      Connection:
+      - close
+      Transfer-Encoding:
+      - chunked
+    body:
+      encoding: US-ASCII
+      string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetVSYSConfigurationResponse
+        xmlns=\"http://apioviss.jp.fujitsu.com\">\r\n  <responseMessage>Processing
+        was completed.</responseMessage>\r\n  <responseStatus>SUCCESS</responseStatus>\r\n
+        \ <vsys>\r\n    <baseDescriptor>2-tier Skeleton</baseDescriptor>\r\n
   <cloudCategory>PUBLIC</cloudCategory>\r\n
+        \   <creator>UZXC0GRT</creator>\r\n    <description>2-tier Skeleton</description>\r\n
+        \   <publicips>\r\n      <publicip>\r\n        <address>137.172.209.220</address>\r\n
+        \       <v4v6Flag>IPv4</v4v6Flag>\r\n      </publicip>\r\n    </publicips>\r\n
+        \   <vnets>\r\n      <vnet>\r\n        <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \     </vnet>\r\n      <vnet>\r\n        <networkId>UZXC0GRT-ZG8ZJCJ07-N-SECURE1</networkId>\r\n
+        \     </vnet>\r\n    </vnets>\r\n    <vservers>\r\n      <vserver>\r\n
       <creator>UZXC0GRT</creator>\r\n
+        \       <diskimageId>FW_EX2000AIN20130125</diskimageId>\r\n        <vdisks
+        />\r\n        <vnics>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \           <nicNo>4</nicNo>\r\n            <privateIp>192.168.0.11</privateIp>\r\n
+        \         </vnic>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-SECURE1</networkId>\r\n
+        \           <nicNo>5</nicNo>\r\n            <privateIp>192.168.1.11</privateIp>\r\n
+        \         </vnic>\r\n        </vnics>\r\n        <vserverId>UZXC0GRT-ZG8ZJCJ07-S-0001</vserverId>\r\n
+        \       <vserverName>Firewall</vserverName>\r\n        <vserverType>firewall</vserverType>\r\n
+        \     </vserver>\r\n      <vserver>\r\n        <creator>UZXC0GRT</creator>\r\n
+        \       <diskimageId>IMG_3c9820_S24FWXU0Q9VH0JK</diskimageId>\r\n   
    <vdisks
+        />\r\n        <vnics>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \           <nicNo>0</nicNo>\r\n            <privateIp>192.168.0.12</privateIp>\r\n
+        \         </vnic>\r\n        </vnics>\r\n        <vserverId>UZXC0GRT-ZG8ZJCJ07-S-0547</vserverId>\r\n
+        \       <vserverName>sdf</vserverName>\r\n        <vserverType>economy</vserverType>\r\n
+        \     </vserver>\r\n    </vservers>\r\n    <vsysId>UZXC0GRT-ZG8ZJCJ07</vsysId>\r\n
+        \   <vsysName>Dies-DC-test</vsysName>\r\n  </vsys>\r\n</GetVSYSConfigurationResponse>\r\n\r\n"
+    http_version: 
+  recorded_at: Fri, 24 May 2013 05:08:49 GMT
+recorded_with: VCR 2.5.0

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4f2faaa7/server/tests/drivers/fgcp/fixtures/test_0007_must_have_ip_address.yml
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/fixtures/test_0007_must_have_ip_address.yml b/server/tests/drivers/fgcp/fixtures/test_0007_must_have_ip_address.yml
new file mode 100644
index 0000000..7c4ac4b
--- /dev/null
+++ b/server/tests/drivers/fgcp/fixtures/test_0007_must_have_ip_address.yml
@@ -0,0 +1,94 @@
+---
+http_interactions:
+- request:
+    method: get
+    uri: https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?AccessKeyId=QVVTIEVhc3Rlcm4gU3RhbmRhcmQgVGltZSYxMzY5MzcyMTI1MDAwJjEuMCZT%0ASEExd2l0aFJTQQ==%0A&Action=ListVSYS&Locale=en&Signature=OkvbtX30mil/ejoylfd6TDTKDz2duiLv/J8DHqFBqrxWmcI9n2x9m0fPwpT4%0AeG9i27Ef32VTUiPaGrwhpfwtCsN6MbqvkL9wifL1uN/RdyajNJHNEbD3K3ez%0Ak3xqJx2D2FkAcFsJtFx6VrugiqCl%2BWpk0p7duBVEnINDHsdpSIJhq96rx3yI%0A9SNg7Nei7U1WWr%2BnuY8HBz/zxIhqiFUVuQN7OovBW6e1xnGmgi0%2BNb%2BzfHjU%0Ar2qpf%2B7y6NHABVbisduNKoc2YDKnp748qs9WeL6daneoHdomM5coGiw1lDTd%0AXUmDdExxIwhVS2VSF/GnFITYI0wq2R44CwI1Xgy/Ew==%0A&Version=2011-01-31
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - text/xml
+      User-Agent:
+      - OViSS-API-CLIENT
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Date:
+      - Fri, 24 May 2013 05:08:45 GMT
+      Set-Cookie:
+      - JSESSIONID=503241577A663A753C2616FF2935A511; Path=/ovisspxy; Secure
+      Content-Type:
+      - text/xml;charset=UTF-8
+      Connection:
+      - close
+      Transfer-Encoding:
+      - chunked
+    body:
+      encoding: US-ASCII
+      string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ListVSYSResponse
xmlns=\"http://apioviss.jp.fujitsu.com\">\r\n
+        \ <responseMessage>Processing was completed.</responseMessage>\r\n  <responseStatus>SUCCESS</responseStatus>\r\n
+        \ <vsyss>\r\n    <vsys>\r\n      <baseDescriptor>2-tier Skeleton</baseDescriptor>\r\n
+        \     <creator>UZXC0GRT</creator>\r\n      <description>2-tier
Skeleton</description>\r\n
+        \     <vsysId>UZXC0GRT-ZG8ZJCJ07</vsysId>\r\n      <vsysName>Dies-DC-test</vsysName>\r\n
+        \   </vsys>\r\n  </vsyss>\r\n</ListVSYSResponse>\r\n\r\n"
+    http_version: 
+  recorded_at: Fri, 24 May 2013 05:08:45 GMT
+- request:
+    method: get
+    uri: https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?AccessKeyId=QVVTIEVhc3Rlcm4gU3RhbmRhcmQgVGltZSYxMzY5MzcyMTI1MDAwJjEuMCZT%0ASEExd2l0aFJTQQ==%0A&Action=GetVSYSConfiguration&Locale=en&Signature=OkvbtX30mil/ejoylfd6TDTKDz2duiLv/J8DHqFBqrxWmcI9n2x9m0fPwpT4%0AeG9i27Ef32VTUiPaGrwhpfwtCsN6MbqvkL9wifL1uN/RdyajNJHNEbD3K3ez%0Ak3xqJx2D2FkAcFsJtFx6VrugiqCl%2BWpk0p7duBVEnINDHsdpSIJhq96rx3yI%0A9SNg7Nei7U1WWr%2BnuY8HBz/zxIhqiFUVuQN7OovBW6e1xnGmgi0%2BNb%2BzfHjU%0Ar2qpf%2B7y6NHABVbisduNKoc2YDKnp748qs9WeL6daneoHdomM5coGiw1lDTd%0AXUmDdExxIwhVS2VSF/GnFITYI0wq2R44CwI1Xgy/Ew==%0A&Version=2011-01-31&vsysId=UZXC0GRT-ZG8ZJCJ07
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      Accept:
+      - text/xml
+      User-Agent:
+      - OViSS-API-CLIENT
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Date:
+      - Fri, 24 May 2013 05:08:46 GMT
+      Set-Cookie:
+      - JSESSIONID=7320D24EAC56F8B418E7BDA5D7B41961; Path=/ovisspxy; Secure
+      Content-Type:
+      - text/xml;charset=UTF-8
+      Connection:
+      - close
+      Transfer-Encoding:
+      - chunked
+    body:
+      encoding: US-ASCII
+      string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetVSYSConfigurationResponse
+        xmlns=\"http://apioviss.jp.fujitsu.com\">\r\n  <responseMessage>Processing
+        was completed.</responseMessage>\r\n  <responseStatus>SUCCESS</responseStatus>\r\n
+        \ <vsys>\r\n    <baseDescriptor>2-tier Skeleton</baseDescriptor>\r\n
   <cloudCategory>PUBLIC</cloudCategory>\r\n
+        \   <creator>UZXC0GRT</creator>\r\n    <description>2-tier Skeleton</description>\r\n
+        \   <publicips>\r\n      <publicip>\r\n        <address>137.172.209.220</address>\r\n
+        \       <v4v6Flag>IPv4</v4v6Flag>\r\n      </publicip>\r\n    </publicips>\r\n
+        \   <vnets>\r\n      <vnet>\r\n        <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \     </vnet>\r\n      <vnet>\r\n        <networkId>UZXC0GRT-ZG8ZJCJ07-N-SECURE1</networkId>\r\n
+        \     </vnet>\r\n    </vnets>\r\n    <vservers>\r\n      <vserver>\r\n
       <creator>UZXC0GRT</creator>\r\n
+        \       <diskimageId>FW_EX2000AIN20130125</diskimageId>\r\n        <vdisks
+        />\r\n        <vnics>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \           <nicNo>4</nicNo>\r\n            <privateIp>192.168.0.11</privateIp>\r\n
+        \         </vnic>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-SECURE1</networkId>\r\n
+        \           <nicNo>5</nicNo>\r\n            <privateIp>192.168.1.11</privateIp>\r\n
+        \         </vnic>\r\n        </vnics>\r\n        <vserverId>UZXC0GRT-ZG8ZJCJ07-S-0001</vserverId>\r\n
+        \       <vserverName>Firewall</vserverName>\r\n        <vserverType>firewall</vserverType>\r\n
+        \     </vserver>\r\n      <vserver>\r\n        <creator>UZXC0GRT</creator>\r\n
+        \       <diskimageId>IMG_3c9820_S24FWXU0Q9VH0JK</diskimageId>\r\n   
    <vdisks
+        />\r\n        <vnics>\r\n          <vnic>\r\n            <networkId>UZXC0GRT-ZG8ZJCJ07-N-DMZ</networkId>\r\n
+        \           <nicNo>0</nicNo>\r\n            <privateIp>192.168.0.12</privateIp>\r\n
+        \         </vnic>\r\n        </vnics>\r\n        <vserverId>UZXC0GRT-ZG8ZJCJ07-S-0547</vserverId>\r\n
+        \       <vserverName>sdf</vserverName>\r\n        <vserverType>economy</vserverType>\r\n
+        \     </vserver>\r\n    </vservers>\r\n    <vsysId>UZXC0GRT-ZG8ZJCJ07</vsysId>\r\n
+        \   <vsysName>Dies-DC-test</vsysName>\r\n  </vsys>\r\n</GetVSYSConfigurationResponse>\r\n\r\n"
+    http_version: 
+  recorded_at: Fri, 24 May 2013 05:08:46 GMT
+recorded_with: VCR 2.5.0

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4f2faaa7/server/tests/drivers/fgcp/network_interfaces_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/network_interfaces_test.rb b/server/tests/drivers/fgcp/network_interfaces_test.rb
new file mode 100644
index 0000000..25de5b8
--- /dev/null
+++ b/server/tests/drivers/fgcp/network_interfaces_test.rb
@@ -0,0 +1,69 @@
+#$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..')
+require 'require_relative' if RUBY_VERSION < '1.9'
+
+require_relative 'common.rb'
+
+describe 'FgcpDriver NetworkInterfaces' do
+
+  before do
+    @driver = Deltacloud::new(:fgcp, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.network_interfaces(OpenStruct.new(:user => 'unknown', :password
=> 'wrong'))
+    end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of network_interfaces' do
+    nics = @driver.network_interfaces
+    nics.wont_be_empty
+    nics.first.must_be_kind_of Deltacloud::NetworkInterface
+  end
+
+  it 'must allow to filter network_interfaces' do
+    nic = @driver.network_interfaces(:id => 'UZXC0GRT-ZG8ZJCJ07-S-0547-NIC-0')
+    nic.wont_be_nil
+    nic.must_be_kind_of Array
+    nic.size.must_equal 1
+    nic.first.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-S-0547-NIC-0'
+    @driver.network_interfaces(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single network_interface' do
+    nic = @driver.network_interface(:id => 'UZXC0GRT-ZG8ZJCJ07-S-0547-NIC-0')
+    nic.wont_be_nil
+    nic.must_be_kind_of Deltacloud::NetworkInterface
+    nic.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-S-0547-NIC-0'
+    @driver.network_interface(:id => 'unknown').must_be_nil
+  end
+
+  it 'must have network' do
+    nics = @driver.network_interfaces
+    nics.wont_be_nil
+    nics.must_be_kind_of Array
+	nics.each do |nic|
+	  nic.network.wont_be_empty
+	end
+  end
+
+  it 'must have instance' do
+    nics = @driver.network_interfaces
+    nics.wont_be_nil
+    nics.must_be_kind_of Array
+	nics.each { |nic| nic.instance.wont_be_nil}
+  end
+
+  it 'must have ip address' do
+    nics = @driver.network_interfaces
+    nics.wont_be_nil
+    nics.must_be_kind_of Array
+	nics.each { |nic| nic.ip_address.wont_be_nil}
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4f2faaa7/server/tests/drivers/fgcp/networks_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/networks_test.rb b/server/tests/drivers/fgcp/networks_test.rb
new file mode 100644
index 0000000..dcf911c
--- /dev/null
+++ b/server/tests/drivers/fgcp/networks_test.rb
@@ -0,0 +1,68 @@
+#$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..')
+require 'require_relative' if RUBY_VERSION < '1.9'
+
+require_relative 'common.rb'
+
+describe 'FgcpDriver Networks' do
+
+  before do
+    @driver = Deltacloud::new(:fgcp, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.networks(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of networks' do
+    networks = @driver.networks
+    networks.wont_be_empty
+    networks.first.must_be_kind_of Deltacloud::Network
+  end
+
+  it 'must allow to filter networks' do
+    network = @driver.networks(:id => 'UZXC0GRT-ZG8ZJCJ07-N')
+    network.wont_be_nil
+    network.must_be_kind_of Array
+    network.size.must_equal 1
+    network.first.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-N'
+    @driver.networks(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single network' do
+    network = @driver.network(:id => 'UZXC0GRT-ZG8ZJCJ07-N')
+    network.wont_be_nil
+    network.must_be_kind_of Deltacloud::Network
+    network.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-N'
+    @driver.network(:id => 'unknown').must_be_nil
+  end
+
+  it 'must be starter' do
+    networks = @driver.networks
+    networks.wont_be_empty
+	networks.each { |network| network.state.must_equal 'STARTED'}
+  end
+
+  it 'must have subnets' do
+    networks = @driver.networks
+    networks.wont_be_empty
+	networks.each { |network| network.subnets.wont_be_empty}
+  end
+
+  it 'must have address blocks' do
+    networks = @driver.networks
+    networks.wont_be_empty
+    networks.must_be_kind_of Array
+	networks.each do |network|
+	  network.address_blocks.wont_be_empty
+	  network.address_blocks.must_be_kind_of Array
+	end
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4f2faaa7/server/tests/drivers/fgcp/subnets_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/subnets_test.rb b/server/tests/drivers/fgcp/subnets_test.rb
new file mode 100644
index 0000000..6bc0684
--- /dev/null
+++ b/server/tests/drivers/fgcp/subnets_test.rb
@@ -0,0 +1,65 @@
+#$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..')
+require 'require_relative' if RUBY_VERSION < '1.9'
+
+require_relative 'common.rb'
+
+describe 'FgcpDriver Subnets' do
+
+  before do
+    @driver = Deltacloud::new(:fgcp, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.subnets(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of subnets' do
+    subnets = @driver.subnets
+    subnets.wont_be_empty
+    subnets.first.must_be_kind_of Deltacloud::Subnet
+  end
+
+  it 'must allow to filter subnets' do
+    subnet = @driver.subnets(:id => 'UZXC0GRT-ZG8ZJCJ07-N-DMZ')
+    subnet.wont_be_nil
+    subnet.must_be_kind_of Array
+    subnet.size.must_equal 1
+    subnet.first.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-N-DMZ'
+    @driver.subnets(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single subnet' do
+    subnet = @driver.subnet(:id => 'UZXC0GRT-ZG8ZJCJ07-N-DMZ')
+    subnet.wont_be_nil
+    subnet.must_be_kind_of Deltacloud::Subnet
+    subnet.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-N-DMZ'
+    @driver.subnet(:id => 'unknown').must_be_nil
+  end
+
+  it 'must have network' do
+    subnets = @driver.subnets
+    subnets.wont_be_empty
+    subnets.must_be_kind_of Array
+	subnets.each { |subnet| subnet.network.wont_be_nil}
+	subnets.each do |subnet|
+	  subnet.network.wont_be_nil
+	end
+  end
+
+  it 'must have address block' do
+    subnets = @driver.subnets
+    subnets.wont_be_empty
+    subnets.must_be_kind_of Array
+	subnets.each do |subnet|
+	  subnet.address_block.wont_be_empty
+	end
+  end
+
+end


Mime
View raw message