Package com.microsoft.windowsazure.management.sql.models

Examples of com.microsoft.windowsazure.management.sql.models.Server


       
        //assert
       
        ServerListResponse serverListResponse = serverOperations.list();
        Iterator<Server> serverList = serverListResponse.iterator();
        Server createdServer = null;
        while (serverList.hasNext()) {
            Server nextServer = serverList.next();
            if (nextServer.getName().equals(serverName)) {
                createdServer = nextServer;
            }
        }
        assertNotNull(createdServer);
        assertEquals(testAdministratorUserName, createdServer.getAdministratorUserName());
View Full Code Here


        serverOperations.delete(serverName);

        // assert
        ServerListResponse serverListResponse = serverOperations.list();
        Iterator<Server> serverList = serverListResponse.iterator();
        Server createdServer = null;
        while (serverList.hasNext()) {
            Server nextServer = serverList.next();
            if (nextServer.getName().equals(serverName)) {
                createdServer = nextServer;
            }
        }
        assertNull(createdServer);
    }
View Full Code Here

           
            Element serversSequenceElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/sqlazure/2010/12/", "Servers");
            if (serversSequenceElement != null) {
                for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(serversSequenceElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "Server").size(); i1 = i1 + 1) {
                    org.w3c.dom.Element serversElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(serversSequenceElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "Server").get(i1));
                    Server serverInstance = new Server();
                    result.getServers().add(serverInstance);
                   
                    Element nameElement = XmlUtility.getElementByTagNameNS(serversElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "Name");
                    if (nameElement != null) {
                        String nameInstance;
                        nameInstance = nameElement.getTextContent();
                        serverInstance.setName(nameInstance);
                    }
                   
                    Element administratorLoginElement = XmlUtility.getElementByTagNameNS(serversElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "AdministratorLogin");
                    if (administratorLoginElement != null) {
                        String administratorLoginInstance;
                        administratorLoginInstance = administratorLoginElement.getTextContent();
                        serverInstance.setAdministratorUserName(administratorLoginInstance);
                    }
                   
                    Element locationElement = XmlUtility.getElementByTagNameNS(serversElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "Location");
                    if (locationElement != null) {
                        String locationInstance;
                        locationInstance = locationElement.getTextContent();
                        serverInstance.setLocation(locationInstance);
                    }
                   
                    Element fullyQualifiedDomainNameElement = XmlUtility.getElementByTagNameNS(serversElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "FullyQualifiedDomainName");
                    if (fullyQualifiedDomainNameElement != null) {
                        String fullyQualifiedDomainNameInstance;
                        fullyQualifiedDomainNameInstance = fullyQualifiedDomainNameElement.getTextContent();
                        serverInstance.setFullyQualifiedDomainName(fullyQualifiedDomainNameInstance);
                    }
                   
                    Element stateElement = XmlUtility.getElementByTagNameNS(serversElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "State");
                    if (stateElement != null) {
                        String stateInstance;
                        stateInstance = stateElement.getTextContent();
                        serverInstance.setState(stateInstance);
                    }
                   
                    Element versionElement = XmlUtility.getElementByTagNameNS(serversElement, "http://schemas.microsoft.com/sqlazure/2010/12/", "Version");
                    if (versionElement != null) {
                        String versionInstance;
                        versionInstance = versionElement.getTextContent();
                        serverInstance.setVersion(versionInstance);
                    }
                }
            }
           
            result.setStatusCode(statusCode);
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.management.sql.models.Server

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.