def bind_gslbvserver_gslbservice(self, client) :
     try :
         obj = gslbvserver_gslbservice_binding()
         obj.name = "gvip1"
         obj.servicename = "svc0"
         gslbvserver_gslbservice_binding.add(client, obj)
         print("bind_gslbvserver_gslbservice - Done ")
     except nitro_exception as e :
         print("Exception::bind_gslbvserver_gslbservice::errorcode="+str(e.errorcode)+" , Message ="+ e.message)
     except Exception as e:
         print("Exception::bind_gslbvserver_gslbservice::message="+str(e.args))
예제 #2
0
 def unbind_gslbvserver_gslbservice(self, client):
     try:
         obj = gslbvserver_gslbservice_binding()
         obj.servicename = "newsvc0"
         obj.name = "newgvip1"
         gslbvserver_gslbservice_binding.delete(client, obj)
         print("unbind_gslbvserver_gslbservice - Done")
     except nitro_exception as e:
         print("Exception::unbind_gslbvserver_gslbservice::errorcode=" +
               str(e.errorcode) + " , Message =" + e.message)
     except Exception as e:
         print("Exception::unbind_gslbvserver_gslbservice::message=" +
               str(e.args))
def get_configured_service_bindings(client, module):
    log('get_configured_service_bindings_proxys')
    configured_proxys = {}
    # Get configured domain bindings and index them by domainname
    if module.params['service_bindings'] is not None:
        for configured_binding in module.params['service_bindings']:
            binding_values = copy.deepcopy(configured_binding)
            binding_values['name'] = module.params['name']
            gslbvserver_service_binding_proxy = ConfigProxy(
                actual=gslbvserver_gslbservice_binding(),
                client=client,
                attribute_values_dict=binding_values,
                readwrite_attrs=gslbvserver_gslbservice_binding_rw_attrs,
                readonly_attrs=[],
            )
            configured_proxys[configured_binding['servicename']] = gslbvserver_service_binding_proxy
    return configured_proxys
def get_configured_service_bindings(client, module):
    log('get_configured_service_bindings_proxys')
    configured_proxys = {}
    # Get configured domain bindings and index them by domainname
    if module.params['service_bindings'] is not None:
        for configured_binding in module.params['service_bindings']:
            binding_values = copy.deepcopy(configured_binding)
            binding_values['name'] = module.params['name']
            gslbvserver_service_binding_proxy = ConfigProxy(
                actual=gslbvserver_gslbservice_binding(),
                client=client,
                attribute_values_dict=binding_values,
                readwrite_attrs=gslbvserver_gslbservice_binding_rw_attrs,
                readonly_attrs=[],
            )
            configured_proxys[configured_binding['servicename']] = gslbvserver_service_binding_proxy
    return configured_proxys