You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/03/01 11:06:30 UTC
[25/42] marvin-refactor: split base into multiple modules
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/LBStickinessPolicyFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/LBStickinessPolicyFactory.py b/tools/marvin/marvin/integration/lib/factory/LBStickinessPolicyFactory.py
index d05b375..a23c533 100644
--- a/tools/marvin/marvin/integration/lib/factory/LBStickinessPolicyFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/LBStickinessPolicyFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import LBStickinessPolicy
class LBStickinessPolicyFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/LoadBalancerRuleFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/LoadBalancerRuleFactory.py b/tools/marvin/marvin/integration/lib/factory/LoadBalancerRuleFactory.py
index 469f425..5b911c6 100644
--- a/tools/marvin/marvin/integration/lib/factory/LoadBalancerRuleFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/LoadBalancerRuleFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import LoadBalancerRule
class LoadBalancerRuleFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/NetworkACLFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/NetworkACLFactory.py b/tools/marvin/marvin/integration/lib/factory/NetworkACLFactory.py
index aab418c..7923cb2 100644
--- a/tools/marvin/marvin/integration/lib/factory/NetworkACLFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/NetworkACLFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import NetworkACL
class NetworkACLFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/NetworkFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/NetworkFactory.py b/tools/marvin/marvin/integration/lib/factory/NetworkFactory.py
index 17368f9..239df4d 100644
--- a/tools/marvin/marvin/integration/lib/factory/NetworkFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/NetworkFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Network
class NetworkFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/NetworkOfferingFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/NetworkOfferingFactory.py b/tools/marvin/marvin/integration/lib/factory/NetworkOfferingFactory.py
index 18629db..b1acff9 100644
--- a/tools/marvin/marvin/integration/lib/factory/NetworkOfferingFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/NetworkOfferingFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import NetworkOffering
class NetworkOfferingFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/PhysicalNetworkFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/PhysicalNetworkFactory.py b/tools/marvin/marvin/integration/lib/factory/PhysicalNetworkFactory.py
index 61ae19d..8a93fe2 100644
--- a/tools/marvin/marvin/integration/lib/factory/PhysicalNetworkFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/PhysicalNetworkFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import PhysicalNetwork
class PhysicalNetworkFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/PodFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/PodFactory.py b/tools/marvin/marvin/integration/lib/factory/PodFactory.py
index 117cf26..65740ba 100644
--- a/tools/marvin/marvin/integration/lib/factory/PodFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/PodFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Pod
class PodFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/PortForwardingRuleFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/PortForwardingRuleFactory.py b/tools/marvin/marvin/integration/lib/factory/PortForwardingRuleFactory.py
index dfb4635..681dc68 100644
--- a/tools/marvin/marvin/integration/lib/factory/PortForwardingRuleFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/PortForwardingRuleFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import PortForwardingRule
class PortForwardingRuleFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/PrivateGatewayFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/PrivateGatewayFactory.py b/tools/marvin/marvin/integration/lib/factory/PrivateGatewayFactory.py
index 0573757..929f2dd 100644
--- a/tools/marvin/marvin/integration/lib/factory/PrivateGatewayFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/PrivateGatewayFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import PrivateGateway
class PrivateGatewayFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/ProjectFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/ProjectFactory.py b/tools/marvin/marvin/integration/lib/factory/ProjectFactory.py
index 0b91585..01ba771 100644
--- a/tools/marvin/marvin/integration/lib/factory/ProjectFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/ProjectFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Project
class ProjectFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/RemoteAccessVpnFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/RemoteAccessVpnFactory.py b/tools/marvin/marvin/integration/lib/factory/RemoteAccessVpnFactory.py
index 445a8d3..c34b824 100644
--- a/tools/marvin/marvin/integration/lib/factory/RemoteAccessVpnFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/RemoteAccessVpnFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import RemoteAccessVpn
class RemoteAccessVpnFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/SSHKeyPairFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/SSHKeyPairFactory.py b/tools/marvin/marvin/integration/lib/factory/SSHKeyPairFactory.py
index 7181c8b..784e8d8 100644
--- a/tools/marvin/marvin/integration/lib/factory/SSHKeyPairFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/SSHKeyPairFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import SSHKeyPair
class SSHKeyPairFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/SecurityGroupFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/SecurityGroupFactory.py b/tools/marvin/marvin/integration/lib/factory/SecurityGroupFactory.py
index 6b7cc8a..fd15db3 100644
--- a/tools/marvin/marvin/integration/lib/factory/SecurityGroupFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/SecurityGroupFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import SecurityGroup
class SecurityGroupFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/ServiceOfferingFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/ServiceOfferingFactory.py b/tools/marvin/marvin/integration/lib/factory/ServiceOfferingFactory.py
index 0a654cd..c9710e4 100644
--- a/tools/marvin/marvin/integration/lib/factory/ServiceOfferingFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/ServiceOfferingFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import ServiceOffering
class ServiceOfferingFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/SnapshotFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/SnapshotFactory.py b/tools/marvin/marvin/integration/lib/factory/SnapshotFactory.py
index 0bf7188..ae08414 100644
--- a/tools/marvin/marvin/integration/lib/factory/SnapshotFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/SnapshotFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Snapshot
class SnapshotFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/SnapshotPolicyFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/SnapshotPolicyFactory.py b/tools/marvin/marvin/integration/lib/factory/SnapshotPolicyFactory.py
index 6749f89..6be23a5 100644
--- a/tools/marvin/marvin/integration/lib/factory/SnapshotPolicyFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/SnapshotPolicyFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import SnapshotPolicy
class SnapshotPolicyFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/StaticRouteFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/StaticRouteFactory.py b/tools/marvin/marvin/integration/lib/factory/StaticRouteFactory.py
index 765a25a..1b7c948 100644
--- a/tools/marvin/marvin/integration/lib/factory/StaticRouteFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/StaticRouteFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import StaticRoute
class StaticRouteFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/StorageNetworkIpRangeFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/StorageNetworkIpRangeFactory.py b/tools/marvin/marvin/integration/lib/factory/StorageNetworkIpRangeFactory.py
index 2233c64..1a8cc56 100644
--- a/tools/marvin/marvin/integration/lib/factory/StorageNetworkIpRangeFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/StorageNetworkIpRangeFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import StorageNetworkIpRange
class StorageNetworkIpRangeFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/StoragePoolFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/StoragePoolFactory.py b/tools/marvin/marvin/integration/lib/factory/StoragePoolFactory.py
index 62baff9..74092ff 100644
--- a/tools/marvin/marvin/integration/lib/factory/StoragePoolFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/StoragePoolFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import StoragePool
class StoragePoolFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/TagsFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/TagsFactory.py b/tools/marvin/marvin/integration/lib/factory/TagsFactory.py
index eedf1fd..55a23fa 100644
--- a/tools/marvin/marvin/integration/lib/factory/TagsFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/TagsFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Tags
class TagsFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/TemplateFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/TemplateFactory.py b/tools/marvin/marvin/integration/lib/factory/TemplateFactory.py
index 93a1526..fc142e1 100644
--- a/tools/marvin/marvin/integration/lib/factory/TemplateFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/TemplateFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Template
class TemplateFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/UserFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/UserFactory.py b/tools/marvin/marvin/integration/lib/factory/UserFactory.py
index ed857f9..0fc97b0 100644
--- a/tools/marvin/marvin/integration/lib/factory/UserFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/UserFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import User
class UserFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/UserKeysFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/UserKeysFactory.py b/tools/marvin/marvin/integration/lib/factory/UserKeysFactory.py
index 9c16c18..7594ac4 100644
--- a/tools/marvin/marvin/integration/lib/factory/UserKeysFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/UserKeysFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import UserKeys
class UserKeysFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VPCFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VPCFactory.py b/tools/marvin/marvin/integration/lib/factory/VPCFactory.py
index 47f0ffc..7d7f55e 100644
--- a/tools/marvin/marvin/integration/lib/factory/VPCFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VPCFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VPC
class VPCFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VPCOfferingFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VPCOfferingFactory.py b/tools/marvin/marvin/integration/lib/factory/VPCOfferingFactory.py
index 92be188..b73f47f 100644
--- a/tools/marvin/marvin/integration/lib/factory/VPCOfferingFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VPCOfferingFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VPCOffering
class VPCOfferingFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VirtualMachineFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VirtualMachineFactory.py b/tools/marvin/marvin/integration/lib/factory/VirtualMachineFactory.py
index 96b1eac..28300fd 100644
--- a/tools/marvin/marvin/integration/lib/factory/VirtualMachineFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VirtualMachineFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VirtualMachine
class VirtualMachineFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VirtualRouterElementFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VirtualRouterElementFactory.py b/tools/marvin/marvin/integration/lib/factory/VirtualRouterElementFactory.py
index f8dd5f2..e21489d 100644
--- a/tools/marvin/marvin/integration/lib/factory/VirtualRouterElementFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VirtualRouterElementFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VirtualRouterElement
class VirtualRouterElementFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VlanIpRangeFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VlanIpRangeFactory.py b/tools/marvin/marvin/integration/lib/factory/VlanIpRangeFactory.py
index ff64183..45120f7 100644
--- a/tools/marvin/marvin/integration/lib/factory/VlanIpRangeFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VlanIpRangeFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VlanIpRange
class VlanIpRangeFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VolumeFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VolumeFactory.py b/tools/marvin/marvin/integration/lib/factory/VolumeFactory.py
index 483cf82..cde08c1 100644
--- a/tools/marvin/marvin/integration/lib/factory/VolumeFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VolumeFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Volume
class VolumeFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VpnConnectionFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VpnConnectionFactory.py b/tools/marvin/marvin/integration/lib/factory/VpnConnectionFactory.py
index eb104c2..d969ab2 100644
--- a/tools/marvin/marvin/integration/lib/factory/VpnConnectionFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VpnConnectionFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VpnConnection
class VpnConnectionFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VpnCustomerGatewayFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VpnCustomerGatewayFactory.py b/tools/marvin/marvin/integration/lib/factory/VpnCustomerGatewayFactory.py
index 77c3b80..87d0b75 100644
--- a/tools/marvin/marvin/integration/lib/factory/VpnCustomerGatewayFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VpnCustomerGatewayFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VpnCustomerGateway
class VpnCustomerGatewayFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/VpnGatewayFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VpnGatewayFactory.py b/tools/marvin/marvin/integration/lib/factory/VpnGatewayFactory.py
index 5cce2c4..8685740 100644
--- a/tools/marvin/marvin/integration/lib/factory/VpnGatewayFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VpnGatewayFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import VpnGateway
class VpnGatewayFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py b/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
index 9b9e415..90989e6 100644
--- a/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
@@ -1,3 +1,19 @@
+# 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
from marvin.integration.lib.newbase import Zone
class ZoneFactory(factory.Factory):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6595deed/tools/marvin/marvin/integration/lib/generateBase.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/generateBase.py b/tools/marvin/marvin/integration/lib/generateBase.py
index 75aa1bf..7524414 100644
--- a/tools/marvin/marvin/integration/lib/generateBase.py
+++ b/tools/marvin/marvin/integration/lib/generateBase.py
@@ -29,7 +29,23 @@ grammar = ['create', 'list', 'delete', 'update',
'copy', 'extract', 'migrate', 'restore', 'suspend',
'get', 'query', 'prepare', 'deploy', 'upload', 'lock', 'disassociate']
-aslv2 = ""
+LICENSE = """# 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.
+"""
def get_api_cmds():
@@ -89,11 +105,11 @@ def get_actionable_entities():
def write_entity_classes(entities):
tabspace = ' '
- classlist = []
+ entitydict = {}
#TODO: Add license header for ASLv2
- code = ''
for entity, actions in entities.iteritems():
- code += 'class %s:'%entity
+ code = ''
+ code += 'class %s(CloudStackEntity):'%entity
for action, args in actions.iteritems():
code += '\n\n'
code += tabspace
@@ -110,9 +126,12 @@ def write_entity_classes(entities):
code += tabspace*2
code += 'pass'
code += '\n\n'
- classlist.append(code)
+ entitydict[entity] = code
write_entity_factory(entity, actions)
- return list(set(classlist))
+ with open("./base/%s.py"%entity, "w") as writer:
+ writer.write(LICENSE)
+ writer.write(code)
+
def write_entity_factory(entity, actions):
tabspace = ' '
@@ -133,6 +152,10 @@ def write_entity_factory(entity, actions):
if os.path.exists("./factory/%sFactory.py"%entity):
for arg in factory_defaults[0]:
code += tabspace + '%s = None\n'%arg
+ with open("./factory/%sFactory.py"%entity, "r") as reader:
+ rcode = reader.read()
+ if rcode.find(code) > 0:
+ return
with open("./factory/%sFactory.py"%entity, "a") as writer:
writer.write(code)
else:
@@ -144,10 +167,9 @@ def write_entity_factory(entity, actions):
for arg in factory_defaults[0]:
code += tabspace + '%s = None\n'%arg
with open("./factory/%sFactory.py"%entity, "w") as writer:
+ writer.write(LICENSE)
writer.write(code)
if __name__=='__main__':
entities = get_actionable_entities()
- clslist = write_entity_classes(entities)
- for cls in clslist:
- print cls
+ write_entity_classes(entities)