예제 #1
0
 def test_create_simple_host(self):
     host = UnityHost.create(t_rest(), name='host1',
                             host_type=HostTypeEnum.HOST_MANUAL,
                             os='customized os')
     assert_that(host.get_id(), equal_to('Host_11'))
     assert_that(host.name, equal_to('host1'))
     assert_that(host.os_type, equal_to('customized os'))
예제 #2
0
파일: test_host.py 프로젝트: crook/storops
 def test_create_simple_host(self):
     host = UnityHost.create(t_rest(), name='host1',
                             host_type=HostTypeEnum.HOST_MANUAL,
                             os='customized os')
     assert_that(host.get_id(), equal_to('Host_11'))
     assert_that(host.name, equal_to('host1'))
     assert_that(host.os_type, equal_to('customized os'))
예제 #3
0
파일: system.py 프로젝트: crook/storops
    def create_host(self, name, host_type=None, desc=None, os=None):
        host = UnityHostList.get(self._cli, name=name).first_item
        if host and host.existed:
            raise ex.UnityHostNameInUseError()
        else:
            host = UnityHost.create(self._cli, name, host_type=host_type,
                                    desc=desc, os=os)

        return host
예제 #4
0
    def create_host(self, name, host_type=None, desc=None, os=None,
                    tenant=None):
        host = UnityHostList.get(self._cli, name=name)
        if host:
            raise storops.exception.UnityHostNameInUseError()
        else:
            host = UnityHost.create(self._cli, name, host_type=host_type,
                                    desc=desc, os=os, tenant=tenant)

        return host
예제 #5
0
    def create_host(self, name, host_type=None, desc=None, os=None):
        host = UnityHostList.get(self._cli, name=name)
        if host:
            raise ex.UnityHostNameInUseError()
        else:
            host = UnityHost.create(self._cli,
                                    name,
                                    host_type=host_type,
                                    desc=desc,
                                    os=os)

        return host