cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [08/50] [abbrv] git commit: updated refs/heads/marvin-refactor to bbaf354
Date Wed, 02 Oct 2013 16:41:38 GMT
marvin_refactor: docs updates

- fix the xml/json compilation
- need ability to send in identifiers for cloud resources

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8a1743c0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8a1743c0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8a1743c0

Branch: refs/heads/marvin-refactor
Commit: 8a1743c0cc8416c513a31aa68731210490038e06
Parents: 1a6006c
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Fri Sep 6 16:33:53 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Wed Oct 2 20:27:20 2013 +0530

----------------------------------------------------------------------
 .../marvin/factory/CloudStackBaseFactory.py     | 55 --------------------
 1 file changed, 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a1743c0/tools/marvin/marvin/factory/CloudStackBaseFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/CloudStackBaseFactory.py b/tools/marvin/marvin/factory/CloudStackBaseFactory.py
deleted file mode 100644
index 4b33a52..0000000
--- a/tools/marvin/marvin/factory/CloudStackBaseFactory.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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.
-
-import factory
-import inspect
-
-CREATORS = ["create", "deploy", "register"]
-
-
-class CloudStackBaseFactory(factory.Factory):
-    ABSTRACT_FACTORY = True
-
-    @classmethod
-    def _build(cls, target_class, *args, **kwargs):
-        if len(args) == 0:
-            return target_class(kwargs)
-        return target_class(*args, **kwargs)
-
-    @classmethod
-    def _create(cls, target_class, *args, **kwargs):
-        if hasattr(cls, 'apiclient'):
-            members = inspect.getmembers(target_class,
-                predicate=inspect.ismethod)
-            creators = filter(lambda x: x[0] in CREATORS, members)
-            assert creators, "How do I bring this guy into existence?"
-            assert inspect.ismethod(creators[0][1])
-            creator = creators[0][1]
-            return creator(cls.apiclient, factory=cls._build(target_class,
-                *args, **kwargs))
-        else:
-            cls._build(target_class, *args, **kwargs)
-
-    @classmethod
-    def _adjust_kwargs(cls, **kwargs):
-        if "apiclient" in kwargs:
-            cls.apiclient = kwargs["apiclient"]
-            clean_kwargs = dict((k, v) for k, v in kwargs.iteritems()
-                if k != "apiclient")
-            return clean_kwargs
-        else:
-            return kwargs
\ No newline at end of file


Mime
View raw message