=== added directory 'libcloud/network'
=== added file 'libcloud/network/__init__.py'
--- libcloud/network/__init__.py	1970-01-01 00:00:00 +0000
+++ libcloud/network/__init__.py	2011-10-23 00:42:48 +0000
@@ -0,0 +1,3 @@
+"""
+Module for working with virtual networks.
+"""

=== added file 'libcloud/network/base.py'
--- libcloud/network/base.py	1970-01-01 00:00:00 +0000
+++ libcloud/network/base.py	2011-10-23 02:09:11 +0000
@@ -0,0 +1,81 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Provides base classes for working with virtual networks.
+"""
+
+
+from libcloud.common.base import ConnectionUserAndKey, BaseDriver
+
+
+__all__ = ['Network',
+           'NetworkDriver']
+
+
+class Network(object):
+    """
+    A virtual network.
+
+    NodeNetwork objects are analogous to physical switches connecting 2 or more physical nodes together.
+
+    >>> from libcloud.compute.drivers.dummy import DummyNodeDriver
+    >>> driver = DummyNodeDriver(0)
+    >>> network = driver.list_networks()[0]
+    >>> network.name
+    'BlueNetwork'
+
+    Apart from name and id, there is no further standard information;
+    other parameters are stored in a driver specific "extra" variable
+    """
+
+    def __init__(self, id, name, driver, extra=None):
+        self.id = str(id)
+        self.name = name
+        self.driver = driver
+        self.extra = extra or {}
+
+    def __repr__(self):
+        return (('<NodeNetwork: id=%s, name=%s, driver=%s ...>')
+                % (self.id, self.name, self.driver.name))
+
+
+class NetworkDriver(BaseDriver):
+    """
+    A base NetworkDriver to derive from.
+    """
+
+    connectionCls = ConnectionUserAndKey
+    name = None
+    type = None
+    port = None
+
+    def __init__(self, key, secret=None, secure=True, host=None, port=None,
+                 api_version=None):
+      super(NetworkDriver, self).__init__(key=key, secret=secret, secure=secure,
+                                       host=host, port=port,
+                                       api_version=api_version)
+
+    def list_networks(self, location=None):
+        """
+        List virtual networks on a provider
+        @return: C{list} of L{NodeNetwork} objects
+        """
+        raise NotImplementedError(
+            'list_networks not implemented for this driver')
+
+if __name__ == "__main__":
+    import doctest
+    doctest.testmod()

=== added directory 'libcloud/network/drivers'
=== added file 'libcloud/network/drivers/__init__.py'
--- libcloud/network/drivers/__init__.py	1970-01-01 00:00:00 +0000
+++ libcloud/network/drivers/__init__.py	2011-10-23 02:24:26 +0000
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Drivers for working with different providers.
+"""
+
+
+__all__ = ['dummy',
+           'opennebula']

=== added file 'libcloud/network/drivers/dummy.py'
--- libcloud/network/drivers/dummy.py	1970-01-01 00:00:00 +0000
+++ libcloud/network/drivers/dummy.py	2011-10-23 02:23:40 +0000
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+from libcloud.network.base import NetworkDriver
+
+
+class DummyNetworkDriver(NetworkDriver):
+    """
+    Dummy network driver.
+
+    >>> from libcloud.compute.drivers.dummy import DummyNodeDriver
+    >>> driver = DummyNodeDriver(0)
+    >>> network = driver.list_networks()[0]
+    >>> network.name
+    'BlueNetwork'
+    """
+
+    name = 'Dummy Network Provider'
+
+
+if __name__ == "__main__":
+    import doctest
+    doctest.testmod()

=== added file 'libcloud/network/providers.py'
--- libcloud/network/providers.py	1970-01-01 00:00:00 +0000
+++ libcloud/network/providers.py	2011-10-23 00:24:38 +0000
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""
+Provider related utilities
+"""
+
+from libcloud.utils import get_driver as _get_provider_driver
+from libcloud.compute.types import Provider
+
+__all__ = [
+    "Provider",
+    "DRIVERS",
+    "get_driver"]
+
+DRIVERS = {
+    Provider.DUMMY:
+        ('libcloud.network.drivers.dummy', 'DummyNodeDriver'),
+    Provider.OPENNEBULA:
+        ('libcloud.network.drivers.opennebula', 'OpenNebulaNetworkDriver')
+}
+
+def get_driver(provider):
+    return _get_provider_driver(DRIVERS, provider)

=== added file 'libcloud/network/types.py'
--- libcloud/network/types.py	1970-01-01 00:00:00 +0000
+++ libcloud/network/types.py	2011-10-23 02:21:27 +0000
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Base types used by other parts of libcloud.
+"""
+
+
+__all__ = ['Provider']
+
+
+class Provider(object):
+    """
+    Defines for each of the supported providers
+
+    @cvar DUMMY: Example provider
+    @cvar OPENNEBULA: OpenNebula.org
+    """
+    DUMMY = 0
+    OPENNEBULA = 16

