Пример #1
0
    def test_show_ovsvapp_cluster(self):
        """Test Show OVSvApp cluster."""

        resource = 'ovsvapp_cluster'
        cmd = ovsvapp_cluster.OVSvAppClusterShow(
            test_cli20.MyApp(sys.stdout), None)
        args = [self.test_id]
        self._test_show_resource(resource, cmd, self.test_id, args)
    def test_update_ovsvapp_clusters(self):
        """Test Update OVSvApp clusters."""

        resources = 'ovsvapp_cluster'
        cmd = ovsvapp_cluster.OVSvAppClusterUpdate(
            test_cli20.MyApp(sys.stdout), None)
        args = ['myid', '--vcenter_id', 'v1', '--clusters', 'c1']
        values = {'vcenter_id': 'v1', 'clusters': ['c1']}
        self._test_update_resource(resources, cmd, 'myid', args, values)
Пример #3
0
    def test_list_ovsvapp_clusters(self):
        """Test List OVSvApp clusters."""

        resources = "ovsvapp_clusters"
        contents = [{'vcenter-id': 'vcenter-123', }]
        cmd = ovsvapp_cluster.OVSvAppClusterList(
            test_cli20.MyApp(sys.stdout), None)
        self._test_list_resources(resources, cmd, True,
                                  response_contents=contents)
    def test_create_ovsvapp_clusters(self):
        """Test Create OVSvApp clusters."""

        resources = "ovsvapp_cluster"
        vcenter_id = 'v1'
        clusters = ['c1']
        args = ['--vcenter_id', 'v1', '--clusters', 'c1']
        position_names = ['vcenter_id', 'clusters']
        position_values = [vcenter_id, clusters]
        cmd = ovsvapp_cluster.OVSvAppClusterCreate(
            test_cli20.MyApp(sys.stdout), None)
        self._test_create_resource(resources, cmd, vcenter_id, 'myid', args,
                                   position_names, position_values)