Exemplo n.º 1
0
 /**
  * Use this API to fetch filtered set of dnskey resources. filter string should be in JSON
  * format.eg: "port:80,servicetype:HTTP".
  */
 public static dnskey[] get_filtered(nitro_service service, String filter) throws Exception {
   dnskey obj = new dnskey();
   options option = new options();
   option.set_filter(filter);
   dnskey[] response = (dnskey[]) obj.getfiltered(service, option);
   return response;
 }
Exemplo n.º 2
0
 /** Use this API to count the dnskey resources configured on NetScaler. */
 public static long count(nitro_service service) throws Exception {
   dnskey obj = new dnskey();
   options option = new options();
   option.set_count(true);
   dnskey[] response = (dnskey[]) obj.get_resources(service, option);
   if (response != null) {
     return response[0].__count;
   }
   return 0;
 }
Exemplo n.º 3
0
 /**
  * Use this API to count the filtered set of dnskey resources. set the filter parameter values in
  * filtervalue object.
  */
 public static long count_filtered(nitro_service service, filtervalue[] filter) throws Exception {
   dnskey obj = new dnskey();
   options option = new options();
   option.set_count(true);
   option.set_filter(filter);
   dnskey[] response = (dnskey[]) obj.getfiltered(service, option);
   if (response != null) {
     return response[0].__count;
   }
   return 0;
 }
Exemplo n.º 4
0
 /** Use this API to add dnskey. */
 public static base_response add(nitro_service client, dnskey resource) throws Exception {
   dnskey addresource = new dnskey();
   addresource.keyname = resource.keyname;
   addresource.publickey = resource.publickey;
   addresource.privatekey = resource.privatekey;
   addresource.expires = resource.expires;
   addresource.units1 = resource.units1;
   addresource.notificationperiod = resource.notificationperiod;
   addresource.units2 = resource.units2;
   addresource.ttl = resource.ttl;
   return addresource.add_resource(client);
 }
Exemplo n.º 5
0
 /** Use this API to update dnskey. */
 public static base_response update(nitro_service client, dnskey resource) throws Exception {
   dnskey updateresource = new dnskey();
   updateresource.keyname = resource.keyname;
   updateresource.expires = resource.expires;
   updateresource.units1 = resource.units1;
   updateresource.notificationperiod = resource.notificationperiod;
   updateresource.units2 = resource.units2;
   updateresource.ttl = resource.ttl;
   return updateresource.update_resource(client);
 }
Exemplo n.º 6
0
 /** Use this API to create dnskey. */
 public static base_response create(nitro_service client, dnskey resource) throws Exception {
   dnskey createresource = new dnskey();
   createresource.zonename = resource.zonename;
   createresource.keytype = resource.keytype;
   createresource.algorithm = resource.algorithm;
   createresource.keysize = resource.keysize;
   createresource.filenameprefix = resource.filenameprefix;
   return createresource.perform_operation(client, "create");
 }
Exemplo n.º 7
0
 /** Use this API to fetch dnskey resource of given name . */
 public static dnskey get(nitro_service service, String keyname) throws Exception {
   dnskey obj = new dnskey();
   obj.set_keyname(keyname);
   dnskey response = (dnskey) obj.get_resource(service);
   return response;
 }
Exemplo n.º 8
0
 /** Use this API to fetch all the dnskey resources that are configured on netscaler. */
 public static dnskey[] get(nitro_service service, options option) throws Exception {
   dnskey obj = new dnskey();
   dnskey[] response = (dnskey[]) obj.get_resources(service, option);
   return response;
 }
Exemplo n.º 9
0
 /** Use this API to delete dnskey. */
 public static base_response delete(nitro_service client, dnskey resource) throws Exception {
   dnskey deleteresource = new dnskey();
   deleteresource.keyname = resource.keyname;
   return deleteresource.delete_resource(client);
 }
Exemplo n.º 10
0
 /**
  * Use this API to unset the properties of dnskey resource. Properties that need to be unset are
  * specified in args array.
  */
 public static base_response unset(nitro_service client, dnskey resource, String[] args)
     throws Exception {
   dnskey unsetresource = new dnskey();
   unsetresource.keyname = resource.keyname;
   return unsetresource.unset_resource(client, args);
 }