Package com.citrix.netscaler.nitro.resource.config.gslb

Examples of com.citrix.netscaler.nitro.resource.config.gslb.gslbsite$triggermonitorEnum


        // create a 'gslbsite' object representing a site
        private static void createSite(nitro_service client, String siteName,
                                       String siteType, String siteIP, String sitePublicIP) throws  ExecutionException{
            try {
                gslbsite site;
                site = getSiteObject(client, siteName);

                boolean isUpdateSite = false;
                if (site == null) {
                    site = new gslbsite();
                } else {
                    isUpdateSite = true;
                }

                assert("LOCAL".equalsIgnoreCase(siteType) || "REMOTE".equalsIgnoreCase(siteType));
                site.set_sitetype(siteType);
                site.set_sitename(siteName);
                site.set_siteipaddress(siteIP);
                site.set_publicip(sitePublicIP);
                site.set_metricexchange("ENABLED");
                site.set_nwmetricexchange("ENABLED");
                site.set_sessionexchange("ENABLED");
                if (isUpdateSite) {
                    gslbsite.update(client, site);
                } else {
                    gslbsite.add(client, site);
                }
View Full Code Here


        }

        // delete 'gslbsite' object representing a site
        private static void deleteSite(nitro_service client, String siteName) throws ExecutionException{
            try {
                gslbsite site = getSiteObject(client, siteName);
                if (site != null) {
                    gslbsite_gslbservice_binding[] serviceBindings = gslbsite_gslbservice_binding.get(client, siteName);
                    if (serviceBindings != null && serviceBindings.length > 0) {
                        if (s_logger.isDebugEnabled()) {
                            s_logger.debug("There are services associated with GSLB site: "
View Full Code Here

        // update 'gslbsite' object representing a site
        private static void updateSite(nitro_service client, String siteType, String siteName,
                                       String siteIP, String sitePublicIP) throws ExecutionException {
            try {
                gslbsite site;
                site = getSiteObject(client, siteName);
                if (site == null) {
                    if (s_logger.isDebugEnabled()) {
                        s_logger.warn("Ignoring update request for non existing  GSLB site: " + siteName);
                    }
                    return;
                }
                assert ("LOCAL".equalsIgnoreCase(siteType) || "REMOTE".equalsIgnoreCase(siteType));
                site.set_sitetype(siteType);
                site.set_sitename(siteName);
                site.set_siteipaddress(siteIP);
                site.set_publicip(sitePublicIP);
                site.set_metricexchange("ENABLED");
                site.set_nwmetricexchange("ENABLED");
                site.set_sessionexchange("ENABLED");
                gslbsite.update(client, site);

                if (s_logger.isDebugEnabled()) {
                    s_logger.debug("Successfully updated GSLB site: " + siteName);
                }
View Full Code Here

        }

        // get 'gslbsite' object corresponding to a site name
        private static gslbsite getSiteObject(nitro_service client, String siteName) {
            try {
                gslbsite site = gslbsite.get(client, siteName);
                if (site != null) {
                    return site;
                }
            } catch (Exception e) {
View Full Code Here

        // create a 'gslbsite' object representing a site
        private static void createSite(nitro_service client, String siteName,
                                       String siteType, String siteIP, String sitePublicIP) throws  ExecutionException{
            try {
                gslbsite site;
                site = getSiteObject(client, siteName);

                boolean isUpdateSite = false;
                if (site == null) {
                    site = new gslbsite();
                } else {
                    isUpdateSite = true;
                }

                assert("LOCAL".equalsIgnoreCase(siteType) || "REMOTE".equalsIgnoreCase(siteType));
                site.set_sitetype(siteType);
                site.set_sitename(siteName);
                site.set_siteipaddress(siteIP);
                site.set_publicip(sitePublicIP);
                site.set_metricexchange("ENABLED");
                site.set_nwmetricexchange("ENABLED");
                site.set_sessionexchange("ENABLED");
                if (isUpdateSite) {
                    gslbsite.update(client, site);
                } else {
                    gslbsite.add(client, site);
                }
View Full Code Here

        }

        // delete 'gslbsite' object representing a site
        private static void deleteSite(nitro_service client, String siteName) throws ExecutionException{
            try {
                gslbsite site = getSiteObject(client, siteName);
                if (site != null) {
                    gslbsite_gslbservice_binding[] serviceBindings = gslbsite_gslbservice_binding.get(client, siteName);
                    if (serviceBindings != null && serviceBindings.length > 0) {
                        if (s_logger.isDebugEnabled()) {
                            s_logger.debug("There are services associated with GSLB site: "
View Full Code Here

        // update 'gslbsite' object representing a site
        private static void updateSite(nitro_service client, String siteType, String siteName,
                                       String siteIP, String sitePublicIP) throws ExecutionException {
            try {
                gslbsite site;
                site = getSiteObject(client, siteName);
                if (site == null) {
                    if (s_logger.isDebugEnabled()) {
                        s_logger.warn("Ignoring update request for non existing  GSLB site: " + siteName);
                    }
                    return;
                }
                assert ("LOCAL".equalsIgnoreCase(siteType) || "REMOTE".equalsIgnoreCase(siteType));
                site.set_sitetype(siteType);
                site.set_sitename(siteName);
                site.set_siteipaddress(siteIP);
                site.set_publicip(sitePublicIP);
                site.set_metricexchange("ENABLED");
                site.set_nwmetricexchange("ENABLED");
                site.set_sessionexchange("ENABLED");
                gslbsite.update(client, site);

                if (s_logger.isDebugEnabled()) {
                    s_logger.debug("Successfully updated GSLB site: " + siteName);
                }
View Full Code Here

        }

        // get 'gslbsite' object corresponding to a site name
        private static gslbsite getSiteObject(nitro_service client, String siteName) {
            try {
                gslbsite site = gslbsite.get(client, siteName);
                if (site != null) {
                    return site;
                }
            } catch (Exception e) {
View Full Code Here

    private static class GSLB {

        // create a 'gslbsite' object representing a site
        private static void createSite(nitro_service client, String siteName, String siteType, String siteIP, String sitePublicIP) throws ExecutionException {
            try {
                gslbsite site;
                site = getSiteObject(client, siteName);

                boolean isUpdateSite = false;
                if (site == null) {
                    site = new gslbsite();
                } else {
                    isUpdateSite = true;
                }

                assert ("LOCAL".equalsIgnoreCase(siteType) || "REMOTE".equalsIgnoreCase(siteType));
                site.set_sitetype(siteType);
                site.set_sitename(siteName);
                site.set_siteipaddress(siteIP);
                site.set_publicip(sitePublicIP);
                site.set_metricexchange("ENABLED");
                site.set_nwmetricexchange("ENABLED");
                site.set_sessionexchange("ENABLED");
                if (isUpdateSite) {
                    gslbsite.update(client, site);
                } else {
                    gslbsite.add(client, site);
                }
View Full Code Here

        }

        // delete 'gslbsite' object representing a site
        private static void deleteSite(nitro_service client, String siteName) throws ExecutionException {
            try {
                gslbsite site = getSiteObject(client, siteName);
                if (site != null) {
                    gslbsite_gslbservice_binding[] serviceBindings = gslbsite_gslbservice_binding.get(client, siteName);
                    if (serviceBindings != null && serviceBindings.length > 0) {
                        if (s_logger.isDebugEnabled()) {
                            s_logger.debug("There are services associated with GSLB site: " + siteName + " so ignoring site deletion");
View Full Code Here

TOP

Related Classes of com.citrix.netscaler.nitro.resource.config.gslb.gslbsite$triggermonitorEnum

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.