This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @POST | |
| @Consumes(MediaType.APPLICATION_OCTET_STREAM) | |
| @Produces(MediaType.TEXT_PLAIN) | |
| public String postIf(InputStream is) throws IOException, SAXException, | |
| TikaException { | |
| java.nio.file.Path path = Files.createTempFile(null, null); | |
| FileOutputStream fos = new FileOutputStream(path.toFile()); | |
| ByteStreams.copy(is, fos); | |
| fos.close(); | |
| is.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package testtype; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.function.Consumer; | |
| import java.util.stream.Stream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.viotech; | |
| import javax.ws.rs.Consumes; | |
| import javax.ws.rs.GET; | |
| import javax.ws.rs.POST; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.Produces; | |
| import javax.ws.rs.core.MediaType; | |
| import javax.ws.rs.core.Response; | |
| import javax.ws.rs.core.Response.ResponseBuilder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| storage_net 14.0.0.0/24 | |
| ______________________________________________________________________________ ___________________ | |
| || | |
| || | |
| core_net 10.0.0.0/24 || | |
| ___________________________ ____________ ________________ __________ _____||__________ _________ | |
| || || || || || || || | |
| || ____||_____ __||_______ ____||_____ _||_____||_ ___||_____ | |
| || | CORE-NODE1| | CORE-NODE2| | SWIFT PROXY| | SWIFT NODES| | CONTROLLER| | |
| || |___________| |___________| |____________| |____________| |___________| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@proxy1:~# cat /etc/salt/grains | |
| roles: | |
| swift_proxy | |
| root@object1:~# cat /etc/salt/grains | |
| roles: | |
| swift_object | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test; | |
| import javax.ws.rs.client.Client; | |
| import javax.ws.rs.client.ClientBuilder; | |
| import javax.ws.rs.core.Response; | |
| import org.glassfish.jersey.client.ClientConfig; | |
| import org.glassfish.jersey.client.ClientProperties; | |
| import org.glassfish.jersey.client.JerseyClientBuilder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # This is a hello world HOT template just defining a single compute | |
| # server. | |
| # | |
| heat_template_version: 2013-05-23 | |
| description: > | |
| Hello world HOT template that just defines a single server. | |
| Contains just base features to verify base HOT support. | |
| parameters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| description: Template to deploy one instance with a private network developed on the | |
| spot | |
| heat_template_version: '2014-10-16' | |
| parameters: | |
| availability_zone: {default: 'nova:cnode3', description: The Availability Zone to | |
| launch the instance., type: string} | |
| flavor: {default: m1.medium, description: flavor to be used, label: flavor, type: string} | |
| image: {default: 16cd76bb-af7d-46b9-b208-79dadbd45eca, description: Image to be used for compute instance, label: Image | |
| name or ID, type: string} | |
| public_net: {default: 121ad8e8-a656-4baf-a306-9b88db8de2a8, description: Id of the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import json | |
| subprocess.call(["apt-get install salt-master --yes"],shell=True) | |
| with open("data.json") as f: | |
| data=json.loads(f.read()) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "description" : "viotech vHG", | |
| "version" : "0.0.1", | |
| "vdus" : [ | |
| { | |
| "id" : "vdu0", | |
| "monitoring_parameters" : [ | |
| { | |
| "desc" : "CPU Idle", | |
| "metric" : "cpuidle", |