Improve code coverage for libs.
Change-Id: I7e6560e0af41cb9756d6eec17dee6e32df3d3ad6
Issue-ID: SO-369
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class AggregatesExtensionTest {
+
+ AggregatesExtension aggregatesExtension = new AggregatesExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ aggregatesExtension.list();
+ }
+
+ @Test
+ public void showAggregate() throws Exception {
+ aggregatesExtension.showAggregate("test");
+ }
+
+ @Test
+ public void updateAggregateMetadata() throws Exception {
+ aggregatesExtension.updateAggregateMetadata("test", "test", "test");
+ }
+
+ @Test
+ public void createAggregate() throws Exception {
+ aggregatesExtension.createAggregate("test", "test");
+ }
+
+ @Test
+ public void deleteAggregate() throws Exception {
+ aggregatesExtension.deleteAggregate("test");
+ }
+
+ @Test
+ public void addHost() throws Exception {
+ aggregatesExtension.addHost("test", "test");
+ }
+
+ @Test
+ public void removeHost() throws Exception {
+ aggregatesExtension.removeHost("test", "test");
+ }
+
+ @Test
+ public void setMetadata() throws Exception {
+ aggregatesExtension.setMetadata("test", "test", "test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import com.woorea.openstack.nova.model.Cloudpipe;
+import org.junit.Test;
+
+public class CloudpipesExtensionTest {
+
+ CloudpipesExtension cloudpipesExtension = new CloudpipesExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ cloudpipesExtension.list();
+ }
+
+ @Test
+ public void create() throws Exception {
+ cloudpipesExtension.create(new Cloudpipe());
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class CredentialsExtensionTest {
+
+ CredentialsExtension credentialsExtension = new CredentialsExtension(null);
+
+ @Test
+ public void createCertificate() throws Exception {
+ credentialsExtension.createCertificate("id");
+ }
+
+ @Test
+ public void showCertificate() throws Exception {
+ credentialsExtension.showCertificate("id");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import com.woorea.openstack.nova.model.FloatingIpDomain;
+import org.junit.Test;
+
+public class FloatingIpDnsExtensionTest {
+
+ FloatingIpDnsExtension floatingIpDnsExtension = new FloatingIpDnsExtension(null);
+
+ @Test
+ public void listFloatingIpDomains() throws Exception {
+ floatingIpDnsExtension.listFloatingIpDomains();
+ }
+
+ @Test
+ public void create() throws Exception {
+ floatingIpDnsExtension.create(new FloatingIpDomain());
+ }
+
+ @Test
+ public void show() throws Exception {
+ floatingIpDnsExtension.show("test");
+ }
+
+ @Test
+ public void update() throws Exception {
+ floatingIpDnsExtension.update(new FloatingIpDomain());
+ }
+
+ @Test
+ public void delete() throws Exception {
+ floatingIpDnsExtension.delete("id");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class FloatingIpPoolsExtensionTest {
+
+ FloatingIpPoolsExtension floatingIpPoolsExtension = new FloatingIpPoolsExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ floatingIpPoolsExtension.list();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class FloatingIpsExtensionTest {
+
+ FloatingIpsExtension floatingIpPoolsExtension = new FloatingIpsExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ floatingIpPoolsExtension.list();
+ }
+
+ @Test
+ public void allocate() throws Exception {
+ floatingIpPoolsExtension.allocate("test");
+ }
+
+ @Test
+ public void deallocate() throws Exception {
+ floatingIpPoolsExtension.deallocate("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class HostsExtensionTest {
+
+ HostsExtension hostsExtension = new HostsExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ hostsExtension.list();
+ }
+
+ @Test
+ public void show() throws Exception {
+ hostsExtension.show("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class KeyPairsExtensionTest {
+
+ KeyPairsExtension keyPairsExtension = new KeyPairsExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ keyPairsExtension.list();
+ }
+
+ @Test
+ public void create() throws Exception {
+ keyPairsExtension.create("test");
+ }
+
+ @Test
+ public void create1() throws Exception {
+ keyPairsExtension.create("test");
+ }
+
+ @Test
+ public void delete() throws Exception {
+ keyPairsExtension.delete("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class NetworksExtensionTest {
+
+ NetworksExtension networksExtension = new NetworksExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ networksExtension.list();
+ }
+
+ @Test
+ public void show() throws Exception {
+ networksExtension.show("test");
+ }
+
+ @Test
+ public void delete() throws Exception {
+ networksExtension.delete("test");
+ }
+
+ @Test
+ public void disassociate() throws Exception {
+ networksExtension.disassociate("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import org.junit.Test;
+
+public class SecurityGroupsExtensionTest {
+
+ SecurityGroupsExtension securityGroupsExtension = new SecurityGroupsExtension(null);
+
+ @Test
+ public void listSecurityGroups() throws Exception {
+ securityGroupsExtension.listSecurityGroups();
+ }
+
+ @Test
+ public void createSecurityGroup() throws Exception {
+ securityGroupsExtension.createSecurityGroup("test");
+ }
+
+ @Test
+ public void createSecurityGroup1() throws Exception {
+ securityGroupsExtension.createSecurityGroup("test", "desc");
+ }
+
+ @Test
+ public void showSecurityGroup() throws Exception {
+ securityGroupsExtension.showSecurityGroup("test");
+ }
+
+ @Test
+ public void showSecurityGroup1() throws Exception {
+ securityGroupsExtension.showSecurityGroup(1);
+ }
+
+ @Test
+ public void deleteSecurityGroup() throws Exception {
+ securityGroupsExtension.deleteSecurityGroup("test");
+ }
+
+ @Test
+ public void deleteSecurityGroup1() throws Exception {
+ securityGroupsExtension.deleteSecurityGroup(1);
+ }
+
+ @Test
+ public void createSecurityGroupRule() throws Exception {
+ securityGroupsExtension.createSecurityGroupRule("test", "test", 90, 80, "test");
+ }
+
+ @Test
+ public void createSecurityGroupRule1() throws Exception {
+ securityGroupsExtension.createSecurityGroupRule("test", "test", "test", 79, 80);
+ }
+
+ @Test
+ public void createSecurityGroupRule2() throws Exception {
+ securityGroupsExtension.createSecurityGroupRule(12,
+ "test",
+ 1,
+ 1,
+ "test");
+ }
+
+ @Test
+ public void createSecurityGroupRule3() throws Exception {
+ securityGroupsExtension.createSecurityGroupRule(1,
+ "test",
+ 1,
+ 1,
+ 1);
+ }
+
+ @Test
+ public void deleteSecurityGroupRule() throws Exception {
+ securityGroupsExtension.deleteSecurityGroupRule("test");
+ }
+
+ @Test
+ public void deleteSecurityGroupRule1() throws Exception {
+ securityGroupsExtension.deleteSecurityGroup(1);
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import com.woorea.openstack.nova.model.SnapshotForCreate;
+import org.junit.Test;
+
+public class SnapshotsExtensionTest {
+
+ SnapshotsExtension snapshotsExtension = new SnapshotsExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ snapshotsExtension.list(true);
+ }
+
+ @Test
+ public void create() throws Exception {
+ snapshotsExtension.create(new SnapshotForCreate());
+ }
+
+ @Test
+ public void show() throws Exception {
+ snapshotsExtension.show("test");
+ }
+
+ @Test
+ public void showMetadata() throws Exception {
+ snapshotsExtension.showMetadata("test");
+ }
+
+ @Test
+ public void delete() throws Exception {
+ snapshotsExtension.delete("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Licensed 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.
+ * ============LICENSE_END=========================================================
+ */
+package com.woorea.openstack.nova.api.extensions;
+
+import com.woorea.openstack.nova.model.VolumeForCreate;
+import com.woorea.openstack.nova.model.VolumeForImageCreate;
+import org.junit.Test;
+
+public class VolumesExtensionTest {
+
+ VolumesExtension volumesExtension = new VolumesExtension(null);
+
+ @Test
+ public void list() throws Exception {
+ volumesExtension.list(true);
+ }
+
+ @Test
+ public void create() throws Exception {
+ volumesExtension.create(new VolumeForCreate());
+ }
+
+ @Test
+ public void uploadToImage() throws Exception {
+ volumesExtension.uploadToImage(new VolumeForImageCreate());
+ }
+
+ @Test
+ public void show() throws Exception {
+ volumesExtension.show("test");
+ }
+
+ @Test
+ public void showMetadata() throws Exception {
+ volumesExtension.showMetadata("test");
+ }
+
+ @Test
+ public void delete() throws Exception {
+ volumesExtension.delete("test");
+ }
+
+}
\ No newline at end of file