Examples of NetworkGetConfigurationResponse


Examples of com.microsoft.windowsazure.management.network.models.NetworkGetConfigurationResponse

            System.getenv(ManagementConfiguration.KEYSTORE_PASSWORD),
            KeyStoreType.fromString(System.getenv(ManagementConfiguration.KEYSTORE_TYPE)));
    }
   
    protected static void createNetwork(String networkName) throws Exception {
        NetworkGetConfigurationResponse operationResponse = networkManagementClient.getNetworksOperations().getConfiguration();

        //Assert
        Assert.assertEquals(200, operationResponse.getStatusCode());
        Assert.assertNotNull(operationResponse.getRequestId());
        Assert.assertNotNull(operationResponse.getConfiguration());

        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
        documentBuilderFactory.setNamespaceAware(true);
        DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
        Document responseDoc = documentBuilder.parse(new BOMInputStream(new ByteArrayInputStream(operationResponse.getConfiguration().getBytes())));
       
        NodeList list = responseDoc.getElementsByTagNameNS("http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration", "VirtualNetworkSite");
        boolean exist = false;
        for (int i = 0; i < list.getLength(); i++) {
            if (list.item(i).getAttributes().getNamedItem("name").getTextContent().equals(networkName)) {
View Full Code Here

Examples of com.microsoft.windowsazure.management.network.models.NetworkGetConfigurationResponse

            networkOperations.setConfiguration(parameters);
         }
    }
   
    protected static void deleteNetwork(String networkName) {
        NetworkGetConfigurationResponse operationResponse = null ;
        boolean exist = false;
       
        try {
            operationResponse = networkManagementClient.getNetworksOperations().getConfiguration();
        } catch (IOException e) {
        } catch (ServiceException e) {
        }

        //Assert
        if (operationResponse != null)
        {
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = null;
            try {
                documentBuilder = documentBuilderFactory.newDocumentBuilder();
            } catch (ParserConfigurationException e) {
                e.printStackTrace();
            }
            Document responseDoc = null;
            try {
                responseDoc = documentBuilder.parse(new BOMInputStream(new ByteArrayInputStream(operationResponse.getConfiguration().getBytes())));
            } catch (NullPointerException e) {
            } catch (SAXException e) {
            } catch (IOException e) {
            }
View Full Code Here

Examples of com.microsoft.windowsazure.management.network.models.NetworkGetConfigurationResponse

                }
                throw ex;
            }
           
            // Create Result
            NetworkGetConfigurationResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new NetworkGetConfigurationResponse();
            result.setConfiguration(StreamUtils.toString(responseContent));
           
            result.setStatusCode(statusCode);
            if (httpResponse.getHeaders("x-ms-request-id").length > 0) {
                result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue());
            }
           
            if (shouldTrace) {
                CloudTracing.exit(invocationId, result);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.