Example #1
0
 def setUp(self):
     super(TestNodeUpdate, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.profile_id_new = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id_new)
     self.node_id = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #2
0
 def setUp(self):
     super(TestNodeUpdate, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.profile_id_new = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id_new)
     self.node_id = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
 def setUp(self):
     super(TestNodeCreateNegativeBadRequest, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.profile_id2 = utils.create_a_profile(
         self, spec=constants.spec_heat_stack)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id2)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #4
0
 def setUp(self):
     super(TestClusterUpdate, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.profile_id_new = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id_new)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              desired_capacity=3)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #5
0
 def setUp(self):
     super(TestNodeCreateNegativeBadRequest, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.profile_id2 = utils.create_a_profile(
         self, spec=constants.spec_heat_stack)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id2)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #6
0
 def setUp(self):
     super(TestClusterUpdate, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.profile_id_new = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id_new)
     self.cluster_id = utils.create_a_cluster(self,
                                              self.profile_id,
                                              desired_capacity=3)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #7
0
    def setUp(self):
        super(TestClusterAddNodesNegativeProfileTypeUnmatch, self).setUp()
        self.profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id)
        self.cluster_id = utils.create_a_cluster(self, self.profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)

        self.profile_id2 = utils.create_a_profile(
            self, spec=constants.spec_heat_stack)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id2)
        self.node_id = utils.create_a_node(self, self.profile_id2)
        self.addCleanup(utils.delete_a_node, self, self.node_id)
    def setUp(self):
        super(TestClusterAddNodesNegativeProfileTypeUnmatch, self).setUp()
        self.profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id)
        self.cluster_id = utils.create_a_cluster(self, self.profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)

        self.profile_id2 = utils.create_a_profile(
            self, spec=constants.spec_heat_stack)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id2)
        self.node_id = utils.create_a_node(self, self.profile_id2)
        self.addCleanup(utils.delete_a_node, self, self.node_id)
 def setUp(self):
     super(TestClusterUpdateNegativeProfileTypeUnmatch, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     # Create a new profile of different type
     self.new_profile_id = utils.create_a_profile(
         self, spec=constants.spec_heat_stack)
     self.addCleanup(utils.delete_a_profile, self, self.new_profile_id)
Example #10
0
 def setUp(self):
     super(TestClusterUpdateNegativeProfileTypeUnmatch, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     # Create a new profile of different type
     self.new_profile_id = utils.create_a_profile(
         self, spec=constants.spec_heat_stack)
     self.addCleanup(utils.delete_a_profile, self, self.new_profile_id)
    def setUp(self):
        super(TestNodeUpdateProfile, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        new_spec = copy.deepcopy(constants.spec_nova_server)
        new_spec['properties']['flavor'] = 'new_flavor'
        new_spec['properties']['image'] = 'new_image'
        self.new_profile_id = utils.create_a_profile(self, new_spec)
        self.addCleanup(utils.delete_a_profile, self, self.new_profile_id)

        self.node_id = utils.create_a_node(self, profile_id)
        self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #12
0
 def setUp(self):
     super(TestBatchPolicy, self).setUp()
     self.new_profile2 = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.new_profile2)
     self.new_profile = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.new_profile)
     self.old_profile = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.old_profile)
     self.cluster_id = utils.create_a_cluster(self,
                                              self.old_profile,
                                              min_size=0,
                                              max_size=2,
                                              desired_capacity=2)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
    def setUp(self):
        super(TestClusterUpdateProfile, self).setUp()

        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        # create a new profile
        new_spec = copy.deepcopy(constants.spec_nova_server)
        new_spec['properties']['flavor'] = 'new_flavor'
        new_spec['properties']['image'] = 'new_image'
        self.new_profile_id = utils.create_a_profile(self, new_spec)
        self.addCleanup(utils.delete_a_profile, self, self.new_profile_id)

        self.cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #14
0
 def setUp(self):
     super(TestClusterActionScaleIn, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
    def setUp(self):
        super(TestClusterDelete, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        # cluster will be deleted by test case
        self.cluster_id = utils.create_a_cluster(self, profile_id)
    def setUp(self):
        super(TestNodeOperationNegativeEngineFailure, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        self.node_id = utils.create_a_node(self, profile_id)
        self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #17
0
    def setUp(self):
        super(TestClusterList, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        self.cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #18
0
    def setUp(self):
        super(TestClusterReplaceNodeNegativeProfileUnmatch, self).setUp()
        self.profile_id = utils.create_a_profile(
            self, spec=constants.spec_nova_server)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id)
        self.cluster_id = utils.create_a_cluster(self, self.profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
        self.old_node = utils.create_a_node(self, self.profile_id,
                                            self.cluster_id)
        self.addCleanup(utils.delete_a_node, self, self.old_node)

        self.profile_id2 = utils.create_a_profile(
            self, spec=constants.spec_heat_stack)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id2)
        self.new_node = utils.create_a_node(self, self.profile_id2)
        self.addCleanup(utils.delete_a_node, self, self.new_node)
 def setUp(self):
     super(TestClusterUpdateNegativeProfileMultichoices, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     # Create two new profiles of the same type with the same name
     new_spec = copy.deepcopy(constants.spec_nova_server)
     new_spec['properties']['flavor'] = 'new_flavor'
     new_profile_id1 = utils.create_a_profile(self, new_spec, name='p-nova')
     new_profile_id2 = utils.create_a_profile(self, new_spec, name='p-nova')
     self.addCleanup(utils.delete_a_profile, self, new_profile_id1)
     self.addCleanup(utils.delete_a_profile, self, new_profile_id2)
Example #20
0
 def setUp(self):
     super(TestClusterUpdateNegativeProfileMultichoices, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     # Create two new profiles of the same type with the same name
     new_spec = copy.deepcopy(constants.spec_nova_server)
     new_spec['properties']['flavor'] = 'new_flavor'
     new_profile_id1 = utils.create_a_profile(self, new_spec, name='p-nova')
     new_profile_id2 = utils.create_a_profile(self, new_spec, name='p-nova')
     self.addCleanup(utils.delete_a_profile, self, new_profile_id1)
     self.addCleanup(utils.delete_a_profile, self, new_profile_id2)
Example #21
0
    def setUp(self):
        super(TestClusterPolicyShowNegativePolicyNotFound, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        self.cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #22
0
    def setUp(self):
        super(TestNodeShow, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        self.node_id = utils.create_a_node(self, profile_id)
        self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #23
0
    def setUp(self):
        super(TestNodeShow, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        self.node_id = utils.create_a_node(self, profile_id)
        self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #24
0
 def setUp(self):
     super(TestReceiver, self).setUp()
     self.profile_id = utils.create_a_profile(
         self, spec=constants.spec_heat_stack)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestClusterResizeNegativeSizeCheckFailed, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id,
                                              min_size=0, max_size=5,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestNovaServerCluster, self).setUp()
     keypair_name = utils.create_a_keypair(self)
     self.spec = constants.spec_nova_server
     self.spec['properties']['key_name'] = keypair_name
     self.profile_id = utils.create_a_profile(self, self.spec)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.addCleanup(utils.delete_a_keypair, self, keypair_name)
Example #27
0
 def setUp(self):
     super(TestScalingPolicy, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              min_size=0, max_size=5,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #28
0
 def setUp(self):
     super(TestLBPolicy, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              min_size=0, max_size=5,
                                              desired_capacity=2)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestClusterPolicyUpdateNegativeUnattached, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.policy_id = utils.create_a_policy(self)
     self.addCleanup(utils.delete_a_policy, self, self.policy_id)
 def setUp(self):
     super(TestClusterDelNodesNegativeOrphanNode, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.node_id = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #31
0
 def setUp(self):
     super(TestClusterPolicyDetachNegativeUnattached, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.policy_id = utils.create_a_policy(self)
     self.addCleanup(utils.delete_a_policy, self, self.policy_id)
Example #32
0
 def setUp(self):
     super(TestClusterActionAddNodes, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.node_id = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #33
0
 def setUp(self):
     super(TestClusterReplaceNodesNegativeOldNotFound, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.new_node = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.new_node)
Example #34
0
 def setUp(self):
     super(TestClusterDelNodesNegativeOrphanNode, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.node_id = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #35
0
 def setUp(self):
     super(TestClusterScaleInOut, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              min_size=1, max_size=5,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #36
0
 def setUp(self):
     super(TestClusterResizeNegativeSizeCheckFailed, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id,
                                              min_size=2, max_size=5,
                                              desired_capacity=3)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestNodeShowNegativeBadRequest, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.node_id1 = utils.create_a_node(self, profile_id, name='n-01')
     self.node_id2 = utils.create_a_node(self, profile_id, name='n-01')
     self.addCleanup(utils.delete_a_node, self, self.node_id1)
     self.addCleanup(utils.delete_a_node, self, self.node_id2)
 def setUp(self):
     super(TestClusterScaleInNegativeBadRequest, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id,
                                              min_size=0, max_size=5,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestClusterScalingNegativeBadRequest, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id,
                                              min_size=0, max_size=5,
                                              desired_capacity=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestNodeUpdateNegativeProfileNotFound, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a node
     self.node_id = utils.create_a_node(self, profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
 def setUp(self):
     super(TestClusterUpdateNegativeProfileNotFound, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #42
0
 def setUp(self):
     super(TestClusterActionPolicyDetach, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.policy_id = utils.create_a_policy(self)
     self.addCleanup(utils.delete_a_policy, self, self.policy_id)
     utils.cluster_attach_policy(self, self.cluster_id, self.policy_id)
Example #43
0
 def setUp(self):
     super(TestClusterActionPolicyDetach, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.policy_id = utils.create_a_policy(self)
     self.addCleanup(utils.delete_a_policy, self, self.policy_id)
     utils.cluster_attach_policy(self, self.cluster_id, self.policy_id)
 def setUp(self):
     super(TestNodeUpdateNegativeProfileNotFound, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a node
     self.node_id = utils.create_a_node(self, profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
Example #45
0
 def setUp(self):
     super(TestClusterUpdateNegativeProfileNotFound, self).setUp()
     # Create a profile
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.profile_id = profile_id
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, profile_id)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
 def setUp(self):
     super(TestClusterAddNodesNegativeSizeCheckFailed, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              desired_capacity=1,
                                              max_size=1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     self.node_id = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id)
 def setUp(self):
     super(TestClusterDelNodesNegativeSizeCheckFailed, self).setUp()
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              desired_capacity=1,
                                              min_size=1)
     self.cluster = utils.get_a_cluster(self, self.cluster_id)
     self.node_id = self.cluster['nodes'][0]
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
Example #48
0
    def setUp(self):
        super(TestReceiverDelete, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, cluster_id)

        self.receiver_id = utils.create_a_receiver(self.client, cluster_id,
                                                   'CLUSTER_RESIZE')
 def setUp(self):
     super(TestClusterShowNegativeBadRequest, self).setUp()
     profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, profile_id)
     self.cluster_id1 = utils.create_a_cluster(self, profile_id,
                                               name='c-01')
     self.cluster_id2 = utils.create_a_cluster(self, profile_id,
                                               name='c-01')
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id1)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id2)
Example #50
0
    def setUp(self):
        super(TestClusterPolicyShowNegativeNoPolicyBinding, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        self.cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)

        self.policy_id = utils.create_a_policy(self)
        self.addCleanup(utils.delete_a_policy, self, self.policy_id)
Example #51
0
    def setUp(self):
        super(TestReceiverDelete, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, cluster_id)

        self.receiver_id = utils.create_a_receiver(self.client, cluster_id,
                                                   'CLUSTER_RESIZE')
    def setUp(self):
        super(TestClusterAddNodesNegativeNodeNotOrphan, self).setUp()
        self.profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, self.profile_id)
        self.cluster_id = utils.create_a_cluster(self, self.profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)

        self.cluster_id2 = utils.create_a_cluster(self, self.profile_id)
        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id2)
        self.node_id = utils.create_a_node(self, self.profile_id,
                                           cluster_id=self.cluster_id2)
    def setUp(self):
        super(TestPolicyDeleteNegativeConflict, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, cluster_id)

        self.policy_id = utils.create_a_policy(self)
        self.addCleanup(utils.delete_a_policy, self, self.policy_id)

        utils.cluster_attach_policy(self, cluster_id, self.policy_id)
        self.addCleanup(utils.cluster_detach_policy, self, cluster_id,
                        self.policy_id)
    def setUp(self):
        super(TestReceiverDeleteNegativeBadRequest, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)
        cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, cluster_id)

        self.receiver_id1 = utils.create_a_receiver(self, cluster_id,
                                                    'CLUSTER_RESIZE',
                                                    name='r-01')
        self.addCleanup(utils.delete_a_receiver, self, self.receiver_id1)
        self.receiver_id2 = utils.create_a_receiver(self, cluster_id,
                                                    'CLUSTER_RESIZE',
                                                    name='r-01')
        self.addCleanup(utils.delete_a_receiver, self, self.receiver_id2)
Example #55
0
    def setUp(self):
        super(TestWebhookTrigger, self).setUp()
        profile_id = utils.create_a_profile(self)
        self.addCleanup(utils.delete_a_profile, self, profile_id)

        cluster_id = utils.create_a_cluster(self, profile_id)
        self.addCleanup(utils.delete_a_cluster, self, cluster_id)

        params = {'max_size': 2}
        self.receiver_id = utils.create_a_receiver(self, cluster_id,
                                                   'CLUSTER_RESIZE',
                                                   params=params)
        self.addCleanup(self.client.delete_obj, 'receivers', self.receiver_id)

        receiver = self.client.get_obj('receivers', self.receiver_id)
        self.webhook_url = receiver['body']['channel']['alarm_url']
Example #56
0
 def setUp(self):
     super(TestClusterMembership, self).setUp()
     # Create a profile
     self.profile_id = utils.create_a_profile(self)
     self.addCleanup(utils.delete_a_profile, self, self.profile_id)
     # Create a cluster
     self.cluster_id = utils.create_a_cluster(self, self.profile_id,
                                              desired_capacity=0,
                                              min_size=0, max_size=3)
     self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)
     # Create three orphan nodes
     self.node_id1 = utils.create_a_node(self, self.profile_id)
     self.node_id2 = utils.create_a_node(self, self.profile_id)
     self.node_id3 = utils.create_a_node(self, self.profile_id)
     self.addCleanup(utils.delete_a_node, self, self.node_id1)
     self.addCleanup(utils.delete_a_node, self, self.node_id2)
     self.addCleanup(utils.delete_a_node, self, self.node_id3)