Change to use monasca everywhere

Change packages from com.hpcloud.mon to monasca.api

Rename service from mon-api to monasca-api. Move config file
to /etc/monasca, jar to /opt/monasca

Renamed files from mon- to monasca-

Use the monasca group.  Required so API can write to
/var/log/monasca and read config file in /etc/monasca

Change user from mon_api to monasca_api

Change-Id: Idaefe138629595507f3d38a533381408cc6f32e3
This commit is contained in:
Craig Bryant 2014-10-10 14:30:36 -06:00
parent 7a9200536a
commit b57e7a81f8
132 changed files with 446 additions and 447 deletions

12
pom.xml
View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>monasca-api</groupId> <groupId>monasca-api</groupId>
<artifactId>mon-api</artifactId> <artifactId>monasca-api</artifactId>
<version>0.1.0</version> <version>0.1.0</version>
<url>http://github.com/stackforge/monasca-api</url> <url>http://github.com/stackforge/monasca-api</url>
<packaging>jar</packaging> <packaging>jar</packaging>
@ -361,18 +361,18 @@
<data> <data>
<type>file</type> <type>file</type>
<src>${project.build.directory}/${computedName}.jar</src> <src>${project.build.directory}/${computedName}.jar</src>
<dst>/opt/mon/mon-api.jar</dst> <dst>/opt/monasca/monasca-api.jar</dst>
</data> </data>
<data> <data>
<type>file</type> <type>file</type>
<src>${project.basedir}/src/deb/init/mon-api.conf</src> <src>${project.basedir}/src/deb/init/monasca-api.conf</src>
<dst>/etc/init/mon-api.conf</dst> <dst>/etc/init/monasca-api.conf</dst>
</data> </data>
<data> <data>
<type>file</type> <type>file</type>
<src>${project.basedir}/src/deb/etc/mon-api-config.yml-sample <src>${project.basedir}/src/deb/etc/api-config.yml-sample
</src> </src>
<dst>/etc/mon/mon-api-config.yml-sample</dst> <dst>/etc/monasca/api-config.yml-sample</dst>
</data> </data>
</dataSet> </dataSet>
</configuration> </configuration>

View File

@ -19,14 +19,14 @@
<file> <file>
<source>${project.build.directory}/${computedName}.jar</source> <source>${project.build.directory}/${computedName}.jar</source>
<outputDirectory>/</outputDirectory> <outputDirectory>/</outputDirectory>
<destName>mon-api.jar</destName> <destName>monasca-api.jar</destName>
</file> </file>
<file> <file>
<source>${project.basedir}/src/deb/etc/mon-api-config.yml-sample</source> <source>${project.basedir}/src/deb/etc/api-config.yml-sample</source>
<outputDirectory>examples</outputDirectory> <outputDirectory>examples</outputDirectory>
</file> </file>
<file> <file>
<source>${project.basedir}/src/deb/init/mon-api.conf</source> <source>${project.basedir}/src/deb/init/monasca-api.conf</source>
<outputDirectory>examples</outputDirectory> <outputDirectory>examples</outputDirectory>
</file> </file>
</files> </files>

View File

@ -4,6 +4,6 @@ Priority: optional
Architecture: all Architecture: all
Depends: openjdk-7-jre-headless | openjdk-7-jre Depends: openjdk-7-jre-headless | openjdk-7-jre
Version: [[version]]-[[timestamp]]-[[buildNumber]] Version: [[version]]-[[timestamp]]-[[buildNumber]]
Maintainer: HPCloud SOM <hpcs-mon-som@hp.com> Maintainer: Monasca Team <monasca@lists.launchpad.net>
Description: MON-API Description: Monasca-API
RESTful API for all MON data. RESTful API for all Monasca data.

View File

@ -2,13 +2,13 @@
case "$1" in case "$1" in
configure) configure)
if ! [ `getent passwd mon_api` ]; then if ! [ `getent passwd monasca_api` ]; then
adduser --system --group mon_api adduser --system --group monasca_api
fi fi
#Restart does not pick up upstart job config changes stop/start is needed #Restart does not pick up upstart job config changes stop/start is needed
stop mon-api stop monasca-api
start mon-api start monasca-api
;; ;;
esac esac

View File

@ -2,7 +2,7 @@
case "$1" in case "$1" in
remove|purge) remove|purge)
userdel mon_api userdel monasca_api
;; ;;
esac esac

View File

@ -2,7 +2,7 @@
case "$1" in case "$1" in
remove) remove)
stop mon-api stop monasca-api
;; ;;
esac esac

View File

@ -19,7 +19,6 @@ kafka:
mysql: mysql:
driverClass: com.mysql.jdbc.Driver driverClass: com.mysql.jdbc.Driver
#url: jdbc:mysql://localhost:3306/mon?connectTimeout=5000&autoReconnect=true
url: jdbc:mysql://192.168.10.6:3306/mon?connectTimeout=5000&autoReconnect=true url: jdbc:mysql://192.168.10.6:3306/mon?connectTimeout=5000&autoReconnect=true
user: monapi user: monapi
password: password password: password
@ -45,13 +44,13 @@ middleware:
enabled: false enabled: false
serviceIds: 100 serviceIds: 100
endpointIds: 160 endpointIds: 160
serverVIP: region-a.geo-1.identity-admin.hpcloudsvc.com #15.184.9.181 serverVIP: identity.example.com
serverPort: 9543 serverPort: 9543
connTimeout: 500 connTimeout: 500
connSSLClientAuth: true connSSLClientAuth: true
keystore: etc/security/prod-hpmiddleware-keystore.jks keystore: etc/monasca/keystore.jks
keystorePass: changeit keystorePass: changeit
truststore: etc/security/prod-hpmiddleware-truststore.jks truststore: etc/monasca/truststore.jks
truststorePass: changeit truststorePass: changeit
connPoolMaxActive: 3 connPoolMaxActive: 3
connPoolMaxIdle: 3 connPoolMaxIdle: 3
@ -82,10 +81,10 @@ logging:
logFormat: # TODO logFormat: # TODO
- type: file - type: file
currentLogFilename: ./log/mon-api.log currentLogFilename: ./log/monasca-api.log
threshold: ALL threshold: ALL
archive: true archive: true
archivedLogFilenamePattern: ./log/mon-api-%d.log archivedLogFilenamePattern: ./log/monasca-api-%d.log
archivedFileCount: 5 archivedFileCount: 5
timeZone: UTC timeZone: UTC
logFormat: # TODO logFormat: # TODO

View File

@ -1,11 +0,0 @@
# Startup script for the SOM-Service
description "SOM API java app"
start on runlevel [2345]
console log
respawn
setgid mon_api
setuid mon_api
exec /usr/bin/java -Xmx8g -cp /opt/mon/mon-api.jar:/opt/mon/vertica/vertica_jdbc.jar com.hpcloud.mon.MonApiApplication server /etc/mon/mon-api-config.yml

View File

@ -0,0 +1,11 @@
# Startup script for the Monasca API
description "Monasca API java app"
start on runlevel [2345]
console log
respawn
setgid monasca
setuid monasca_api
exec /usr/bin/java -Xmx8g -cp /opt/monasca/monasca-api.jar:/opt/monasca/vertica/vertica_jdbc.jar monasca.api.MonApiApplication server /etc/monasca/api-config.yml

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon; package monasca.api;
import io.dropwizard.Application; import io.dropwizard.Application;
import io.dropwizard.jdbi.bundles.DBIExceptionsBundle; import io.dropwizard.jdbi.bundles.DBIExceptionsBundle;
@ -34,27 +34,27 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.module.SimpleModule;
import com.hpcloud.messaging.kafka.KafkaHealthCheck; import com.hpcloud.messaging.kafka.KafkaHealthCheck;
import com.hpcloud.middleware.TokenAuth; import com.hpcloud.middleware.TokenAuth;
import com.hpcloud.mon.bundle.SwaggerBundle; import monasca.api.bundle.SwaggerBundle;
import com.hpcloud.mon.infrastructure.servlet.MockAuthenticationFilter; import monasca.api.infrastructure.servlet.MockAuthenticationFilter;
import com.hpcloud.mon.infrastructure.servlet.PostAuthenticationFilter; import monasca.api.infrastructure.servlet.PostAuthenticationFilter;
import com.hpcloud.mon.infrastructure.servlet.PreAuthenticationFilter; import monasca.api.infrastructure.servlet.PreAuthenticationFilter;
import com.hpcloud.mon.infrastructure.servlet.RoleAuthorizationFilter; import monasca.api.infrastructure.servlet.RoleAuthorizationFilter;
import com.hpcloud.mon.resource.AlarmDefinitionResource; import monasca.api.resource.AlarmDefinitionResource;
import com.hpcloud.mon.resource.AlarmResource; import monasca.api.resource.AlarmResource;
import com.hpcloud.mon.resource.MeasurementResource; import monasca.api.resource.MeasurementResource;
import com.hpcloud.mon.resource.MetricResource; import monasca.api.resource.MetricResource;
import com.hpcloud.mon.resource.NotificationMethodResource; import monasca.api.resource.NotificationMethodResource;
import com.hpcloud.mon.resource.StatisticResource; import monasca.api.resource.StatisticResource;
import com.hpcloud.mon.resource.VersionResource; import monasca.api.resource.VersionResource;
import com.hpcloud.mon.resource.exception.ConstraintViolationExceptionMapper; import monasca.api.resource.exception.ConstraintViolationExceptionMapper;
import com.hpcloud.mon.resource.exception.EntityExistsExceptionMapper; import monasca.api.resource.exception.EntityExistsExceptionMapper;
import com.hpcloud.mon.resource.exception.EntityNotFoundExceptionMapper; import monasca.api.resource.exception.EntityNotFoundExceptionMapper;
import com.hpcloud.mon.resource.exception.IllegalArgumentExceptionMapper; import monasca.api.resource.exception.IllegalArgumentExceptionMapper;
import com.hpcloud.mon.resource.exception.InvalidEntityExceptionMapper; import monasca.api.resource.exception.InvalidEntityExceptionMapper;
import com.hpcloud.mon.resource.exception.JsonMappingExceptionManager; import monasca.api.resource.exception.JsonMappingExceptionManager;
import com.hpcloud.mon.resource.exception.JsonProcessingExceptionMapper; import monasca.api.resource.exception.JsonProcessingExceptionMapper;
import com.hpcloud.mon.resource.exception.ThrowableExceptionMapper; import monasca.api.resource.exception.ThrowableExceptionMapper;
import com.hpcloud.mon.resource.serialization.SubAlarmExpressionSerializer; import monasca.api.resource.serialization.SubAlarmExpressionSerializer;
import com.hpcloud.util.Injector; import com.hpcloud.util.Injector;
/** /**

View File

@ -11,11 +11,11 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon; package monasca.api;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.hpcloud.messaging.kafka.KafkaConfiguration; import com.hpcloud.messaging.kafka.KafkaConfiguration;
import com.hpcloud.mon.infrastructure.middleware.MiddlewareConfiguration; import monasca.api.infrastructure.middleware.MiddlewareConfiguration;
import com.hpcloud.configuration.DatabaseConfiguration; import com.hpcloud.configuration.DatabaseConfiguration;
import com.hpcloud.configuration.InfluxDbConfiguration; import com.hpcloud.configuration.InfluxDbConfiguration;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon; package monasca.api;
import io.dropwizard.db.DataSourceFactory; import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.jdbi.DBIFactory; import io.dropwizard.jdbi.DBIFactory;
@ -33,9 +33,9 @@ import com.google.inject.AbstractModule;
import com.google.inject.Provides; import com.google.inject.Provides;
import com.google.inject.ProvisionException; import com.google.inject.ProvisionException;
import com.google.inject.name.Names; import com.google.inject.name.Names;
import com.hpcloud.mon.app.ApplicationModule; import monasca.api.app.ApplicationModule;
import com.hpcloud.mon.domain.DomainModule; import monasca.api.domain.DomainModule;
import com.hpcloud.mon.infrastructure.InfrastructureModule; import monasca.api.infrastructure.InfrastructureModule;
/** /**
* Monitoring API server bindings. * Monitoring API server bindings.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app; package monasca.api.app;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
@ -34,8 +34,8 @@ import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap; import com.google.common.collect.HashBiMap;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.app.command.UpdateAlarmDefinitionCommand; import monasca.api.app.command.UpdateAlarmDefinitionCommand;
import com.hpcloud.mon.common.event.AlarmDefinitionCreatedEvent; import com.hpcloud.mon.common.event.AlarmDefinitionCreatedEvent;
import com.hpcloud.mon.common.event.AlarmDefinitionDeletedEvent; import com.hpcloud.mon.common.event.AlarmDefinitionDeletedEvent;
import com.hpcloud.mon.common.event.AlarmDefinitionUpdatedEvent; import com.hpcloud.mon.common.event.AlarmDefinitionUpdatedEvent;
@ -44,14 +44,14 @@ import com.hpcloud.mon.common.model.alarm.AlarmExpression;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.exception.EntityExistsException; import monasca.api.domain.exception.EntityExistsException;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.domain.exception.InvalidEntityException; import monasca.api.domain.exception.InvalidEntityException;
import com.hpcloud.mon.domain.model.alarm.Alarm; import monasca.api.domain.model.alarm.Alarm;
import com.hpcloud.mon.domain.model.alarm.AlarmRepository; import monasca.api.domain.model.alarm.AlarmRepository;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinition; import monasca.api.domain.model.alarmdefinition.AlarmDefinition;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinitionRepository; import monasca.api.domain.model.alarmdefinition.AlarmDefinitionRepository;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodRepository; import monasca.api.domain.model.notificationmethod.NotificationMethodRepository;
import com.hpcloud.util.Exceptions; import com.hpcloud.util.Exceptions;
import com.hpcloud.util.Serialization; import com.hpcloud.util.Serialization;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app; package monasca.api.app;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -24,20 +24,20 @@ import kafka.producer.KeyedMessage;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.app.command.UpdateAlarmCommand; import monasca.api.app.command.UpdateAlarmCommand;
import com.hpcloud.mon.common.event.AlarmDeletedEvent; import com.hpcloud.mon.common.event.AlarmDeletedEvent;
import com.hpcloud.mon.common.event.AlarmStateTransitionedEvent; import com.hpcloud.mon.common.event.AlarmStateTransitionedEvent;
import com.hpcloud.mon.common.event.AlarmUpdatedEvent; import com.hpcloud.mon.common.event.AlarmUpdatedEvent;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.domain.exception.InvalidEntityException; import monasca.api.domain.exception.InvalidEntityException;
import com.hpcloud.mon.domain.model.alarm.Alarm; import monasca.api.domain.model.alarm.Alarm;
import com.hpcloud.mon.domain.model.alarm.AlarmRepository; import monasca.api.domain.model.alarm.AlarmRepository;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinition; import monasca.api.domain.model.alarmdefinition.AlarmDefinition;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinitionRepository; import monasca.api.domain.model.alarmdefinition.AlarmDefinitionRepository;
import com.hpcloud.util.Exceptions; import com.hpcloud.util.Exceptions;
import com.hpcloud.util.Serialization; import com.hpcloud.util.Serialization;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app; package monasca.api.app;
import javax.inject.Singleton; import javax.inject.Singleton;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app; package monasca.api.app;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -26,7 +26,7 @@ import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.MetricRegistry;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.ImmutableMap.Builder;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.common.model.metric.Metric; import com.hpcloud.mon.common.model.metric.Metric;
import com.hpcloud.mon.common.model.metric.MetricEnvelope; import com.hpcloud.mon.common.model.metric.MetricEnvelope;
import com.hpcloud.mon.common.model.metric.MetricEnvelopes; import com.hpcloud.mon.common.model.metric.MetricEnvelopes;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import java.util.List; import java.util.List;
@ -19,7 +19,7 @@ import javax.annotation.Nullable;
import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.constraints.NotEmpty;
import com.hpcloud.mon.app.validation.AlarmValidation; import monasca.api.app.validation.AlarmValidation;
public class CreateAlarmDefinitionCommand { public class CreateAlarmDefinitionCommand {
@NotEmpty @NotEmpty

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
@ -22,11 +22,11 @@ import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.constraints.NotEmpty;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.hpcloud.mon.app.validation.DimensionValidation; import monasca.api.app.validation.DimensionValidation;
import com.hpcloud.mon.app.validation.MetricNameValidation; import monasca.api.app.validation.MetricNameValidation;
import com.hpcloud.mon.common.model.Services; import com.hpcloud.mon.common.model.Services;
import com.hpcloud.mon.common.model.metric.Metric; import com.hpcloud.mon.common.model.metric.Metric;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
public class CreateMetricCommand { public class CreateMetricCommand {
private static final long TIME_2MIN = 120; private static final long TIME_2MIN = 120;

View File

@ -11,15 +11,15 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.constraints.NotEmpty;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodType; import monasca.api.domain.model.notificationmethod.NotificationMethodType;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
public class CreateNotificationMethodCommand { public class CreateNotificationMethodCommand {
@NotEmpty @NotEmpty

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import java.util.List; import java.util.List;

View File

@ -17,4 +17,4 @@
* *
* @see http://martinfowler.com/eaaCatalog/serviceLayer.html * @see http://martinfowler.com/eaaCatalog/serviceLayer.html
*/ */
package com.hpcloud.mon.app; package monasca.api.app;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.validation; package monasca.api.app.validation;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -22,7 +22,7 @@ import com.hpcloud.mon.common.model.Services;
import com.hpcloud.mon.common.model.alarm.AlarmExpression; import com.hpcloud.mon.common.model.alarm.AlarmExpression;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
/** /**
* Utilities for validating AlarmExpressions. * Utilities for validating AlarmExpressions.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.validation; package monasca.api.app.validation;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -24,7 +24,7 @@ import com.google.common.base.CharMatcher;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.primitives.Ints; import com.google.common.primitives.Ints;
import com.hpcloud.mon.common.model.Services; import com.hpcloud.mon.common.model.Services;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
/** /**
* Utilities for validating dimensions. * Utilities for validating dimensions.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.validation; package monasca.api.app.validation;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -20,7 +20,7 @@ import javax.annotation.Nullable;
import com.google.common.base.CharMatcher; import com.google.common.base.CharMatcher;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.hpcloud.mon.common.model.Services; import com.hpcloud.mon.common.model.Services;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
import com.sun.jersey.spi.container.WebApplication; import com.sun.jersey.spi.container.WebApplication;
/** /**

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.app.validation; package monasca.api.app.validation;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -30,7 +30,7 @@ import com.google.common.base.Splitter;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.hpcloud.mon.common.model.Services; import com.hpcloud.mon.common.model.Services;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
/** /**
* Validation related utilities. * Validation related utilities.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.bundle; package monasca.api.bundle;
import io.dropwizard.Configuration; import io.dropwizard.Configuration;
import io.dropwizard.assets.AssetsBundle; import io.dropwizard.assets.AssetsBundle;

View File

@ -11,13 +11,13 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain; package monasca.api.domain;
import javax.inject.Singleton; import javax.inject.Singleton;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
import com.hpcloud.mon.domain.model.version.VersionRepository; import monasca.api.domain.model.version.VersionRepository;
import com.hpcloud.mon.domain.service.impl.VersionRepositoryImpl; import monasca.api.domain.service.impl.VersionRepositoryImpl;
/** /**
* Domain layer bindings. * Domain layer bindings.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.exception; package monasca.api.domain.exception;
/** /**
* Indicates that a domain entity already exists. * Indicates that a domain entity already exists.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.exception; package monasca.api.domain.exception;
/** /**
* Indicates that a domain entity is unknown. * Indicates that a domain entity is unknown.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.exception; package monasca.api.domain.exception;
/** /**
* Indicates that an entity is invalid. * Indicates that an entity is invalid.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.alarm; package monasca.api.domain.model.alarm;
import java.util.List; import java.util.List;
@ -21,8 +21,8 @@ import javax.xml.bind.annotation.XmlRootElement;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.common.AbstractEntity; import com.hpcloud.mon.domain.common.AbstractEntity;
import com.hpcloud.mon.domain.model.common.Link; import monasca.api.domain.model.common.Link;
import com.hpcloud.mon.domain.model.common.Linked; import monasca.api.domain.model.common.Linked;
import com.wordnik.swagger.annotations.ApiModelProperty; import com.wordnik.swagger.annotations.ApiModelProperty;
@XmlRootElement(name = "Alarm") @XmlRootElement(name = "Alarm")

View File

@ -1,4 +1,4 @@
package com.hpcloud.mon.domain.model.alarm; package monasca.api.domain.model.alarm;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -6,7 +6,7 @@ import java.util.Map;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
public interface AlarmRepository { public interface AlarmRepository {
/** /**

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.alarmdefinition; package monasca.api.domain.model.alarmdefinition;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ -22,8 +22,8 @@ import javax.xml.bind.annotation.XmlRootElement;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hpcloud.mon.common.model.alarm.AlarmExpression; import com.hpcloud.mon.common.model.alarm.AlarmExpression;
import com.hpcloud.mon.domain.common.AbstractEntity; import com.hpcloud.mon.domain.common.AbstractEntity;
import com.hpcloud.mon.domain.model.common.Link; import monasca.api.domain.model.common.Link;
import com.hpcloud.mon.domain.model.common.Linked; import monasca.api.domain.model.common.Linked;
import com.wordnik.swagger.annotations.ApiModel; import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty; import com.wordnik.swagger.annotations.ApiModelProperty;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.alarmdefinition; package monasca.api.domain.model.alarmdefinition;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -19,7 +19,7 @@ import java.util.Map;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
/** /**
* Repository for alarm definitions. * Repository for alarm definitions.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.alarmstatehistory; package monasca.api.domain.model.alarmstatehistory;
import java.util.List; import java.util.List;

View File

@ -11,9 +11,9 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.alarmstatehistory; package monasca.api.domain.model.alarmstatehistory;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.common; package monasca.api.domain.model.common;
public class Link { public class Link {
public String rel; public String rel;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.common; package monasca.api.domain.model.common;
import java.util.List; import java.util.List;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.measurement; package monasca.api.domain.model.measurement;
import org.joda.time.DateTime; import org.joda.time.DateTime;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.measurement; package monasca.api.domain.model.measurement;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.metric; package monasca.api.domain.model.metric;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;

View File

@ -11,13 +11,13 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.notificationmethod; package monasca.api.domain.model.notificationmethod;
import java.util.List; import java.util.List;
import com.hpcloud.mon.domain.common.AbstractEntity; import com.hpcloud.mon.domain.common.AbstractEntity;
import com.hpcloud.mon.domain.model.common.Link; import monasca.api.domain.model.common.Link;
import com.hpcloud.mon.domain.model.common.Linked; import monasca.api.domain.model.common.Linked;
public class NotificationMethod extends AbstractEntity implements Linked { public class NotificationMethod extends AbstractEntity implements Linked {
private List<Link> links; private List<Link> links;

View File

@ -11,11 +11,11 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.notificationmethod; package monasca.api.domain.model.notificationmethod;
import java.util.List; import java.util.List;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
/** /**
* Repository for notification methods. * Repository for notification methods.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.notificationmethod; package monasca.api.domain.model.notificationmethod;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.statistic; package monasca.api.domain.model.statistic;
import org.joda.time.DateTime; import org.joda.time.DateTime;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.statistic; package monasca.api.domain.model.statistic;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -11,15 +11,15 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.version; package monasca.api.domain.model.version;
import java.util.List; import java.util.List;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import com.hpcloud.mon.domain.common.AbstractEntity; import com.hpcloud.mon.domain.common.AbstractEntity;
import com.hpcloud.mon.domain.model.common.Link; import monasca.api.domain.model.common.Link;
import com.hpcloud.mon.domain.model.common.Linked; import monasca.api.domain.model.common.Linked;
public class Version extends AbstractEntity implements Linked { public class Version extends AbstractEntity implements Linked {
private List<Link> links; private List<Link> links;

View File

@ -11,9 +11,9 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model.version; package monasca.api.domain.model.version;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import java.util.List; import java.util.List;

View File

@ -15,4 +15,4 @@
/** /**
* Houses the domain layer. * Houses the domain layer.
*/ */
package com.hpcloud.mon.domain; package monasca.api.domain;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.service.impl; package monasca.api.domain.service.impl;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -19,10 +19,10 @@ import java.util.List;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.DateTimeZone; import org.joda.time.DateTimeZone;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.domain.model.version.Version; import monasca.api.domain.model.version.Version;
import com.hpcloud.mon.domain.model.version.Version.VersionStatus; import monasca.api.domain.model.version.Version.VersionStatus;
import com.hpcloud.mon.domain.model.version.VersionRepository; import monasca.api.domain.model.version.VersionRepository;
/** /**
* Version repository implementation. * Version repository implementation.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure; package monasca.api.infrastructure;
import javax.inject.Singleton; import javax.inject.Singleton;
@ -21,25 +21,25 @@ import org.influxdb.InfluxDBFactory;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
import com.google.inject.Provides; import com.google.inject.Provides;
import com.google.inject.ProvisionException; import com.google.inject.ProvisionException;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.domain.model.alarm.AlarmRepository; import monasca.api.domain.model.alarm.AlarmRepository;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinitionRepository; import monasca.api.domain.model.alarmdefinition.AlarmDefinitionRepository;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistoryRepository; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistoryRepository;
import com.hpcloud.mon.domain.model.measurement.MeasurementRepository; import monasca.api.domain.model.measurement.MeasurementRepository;
import com.hpcloud.mon.domain.model.metric.MetricDefinitionRepository; import monasca.api.domain.model.metric.MetricDefinitionRepository;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodRepository; import monasca.api.domain.model.notificationmethod.NotificationMethodRepository;
import com.hpcloud.mon.domain.model.statistic.StatisticRepository; import monasca.api.domain.model.statistic.StatisticRepository;
import com.hpcloud.mon.infrastructure.persistence.influxdb.AlarmStateHistoryInfluxDbRepositoryImpl; import monasca.api.infrastructure.persistence.influxdb.AlarmStateHistoryInfluxDbRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.influxdb.MeasurementInfluxDbRepositoryImpl; import monasca.api.infrastructure.persistence.influxdb.MeasurementInfluxDbRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.influxdb.MetricDefinitionInfluxDbRepositoryImpl; import monasca.api.infrastructure.persistence.influxdb.MetricDefinitionInfluxDbRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.influxdb.StatisticInfluxDbRepositoryImpl; import monasca.api.infrastructure.persistence.influxdb.StatisticInfluxDbRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.mysql.AlarmDefinitionMySqlRepositoryImpl; import monasca.api.infrastructure.persistence.mysql.AlarmDefinitionMySqlRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.mysql.AlarmMySqlRepositoryImpl; import monasca.api.infrastructure.persistence.mysql.AlarmMySqlRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.mysql.NotificationMethodMySqlRepositoryImpl; import monasca.api.infrastructure.persistence.mysql.NotificationMethodMySqlRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.vertica.AlarmStateHistoryVerticaRepositoryImpl; import monasca.api.infrastructure.persistence.vertica.AlarmStateHistoryVerticaRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.vertica.MeasurementVerticaRepositoryImpl; import monasca.api.infrastructure.persistence.vertica.MeasurementVerticaRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.vertica.MetricDefinitionVerticaRepositoryImpl; import monasca.api.infrastructure.persistence.vertica.MetricDefinitionVerticaRepositoryImpl;
import com.hpcloud.mon.infrastructure.persistence.vertica.StatisticVerticaRepositoryImpl; import monasca.api.infrastructure.persistence.vertica.StatisticVerticaRepositoryImpl;
/** /**
* Infrastructure layer bindings. * Infrastructure layer bindings.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.middleware; package monasca.api.infrastructure.middleware;
import java.util.List; import java.util.List;

View File

@ -15,4 +15,4 @@
/** /**
* Houses the infrastructure layer. * Houses the infrastructure layer.
*/ */
package com.hpcloud.mon.infrastructure; package monasca.api.infrastructure;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence; package monasca.api.infrastructure.persistence;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence; package monasca.api.infrastructure.persistence;
import java.util.Map; import java.util.Map;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.influxdb; package monasca.api.infrastructure.persistence.influxdb;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@ -38,13 +38,13 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistory; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistory;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistoryRepository; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistoryRepository;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
import com.hpcloud.mon.infrastructure.persistence.SubAlarmQueries; import monasca.api.infrastructure.persistence.SubAlarmQueries;
public class AlarmStateHistoryInfluxDbRepositoryImpl implements AlarmStateHistoryRepository { public class AlarmStateHistoryInfluxDbRepositoryImpl implements AlarmStateHistoryRepository {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();

View File

@ -11,13 +11,13 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.influxdb; package monasca.api.infrastructure.persistence.influxdb;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.domain.model.measurement.MeasurementRepository; import monasca.api.domain.model.measurement.MeasurementRepository;
import com.hpcloud.mon.domain.model.measurement.Measurements; import monasca.api.domain.model.measurement.Measurements;
import org.influxdb.InfluxDB; import org.influxdb.InfluxDB;
import org.influxdb.dto.Serie; import org.influxdb.dto.Serie;
@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import static com.hpcloud.mon.infrastructure.persistence.influxdb.Utils.buildSerieNameRegex; import static monasca.api.infrastructure.persistence.influxdb.Utils.buildSerieNameRegex;
public class MeasurementInfluxDbRepositoryImpl implements MeasurementRepository { public class MeasurementInfluxDbRepositoryImpl implements MeasurementRepository {

View File

@ -11,13 +11,13 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.influxdb; package monasca.api.infrastructure.persistence.influxdb;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.model.metric.MetricDefinitionRepository; import monasca.api.domain.model.metric.MetricDefinitionRepository;
import org.influxdb.InfluxDB; import org.influxdb.InfluxDB;
import org.influxdb.dto.Serie; import org.influxdb.dto.Serie;
@ -29,7 +29,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static com.hpcloud.mon.infrastructure.persistence.influxdb.Utils.buildSerieNameRegex; import static monasca.api.infrastructure.persistence.influxdb.Utils.buildSerieNameRegex;
public class MetricDefinitionInfluxDbRepositoryImpl implements MetricDefinitionRepository { public class MetricDefinitionInfluxDbRepositoryImpl implements MetricDefinitionRepository {

View File

@ -11,13 +11,13 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.influxdb; package monasca.api.infrastructure.persistence.influxdb;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.domain.model.statistic.StatisticRepository; import monasca.api.domain.model.statistic.StatisticRepository;
import com.hpcloud.mon.domain.model.statistic.Statistics; import monasca.api.domain.model.statistic.Statistics;
import org.influxdb.InfluxDB; import org.influxdb.InfluxDB;
import org.influxdb.dto.Serie; import org.influxdb.dto.Serie;
@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import static com.hpcloud.mon.infrastructure.persistence.influxdb.Utils.buildSerieNameRegex; import static monasca.api.infrastructure.persistence.influxdb.Utils.buildSerieNameRegex;
public class StatisticInfluxDbRepositoryImpl implements StatisticRepository { public class StatisticInfluxDbRepositoryImpl implements StatisticRepository {

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.influxdb; package monasca.api.infrastructure.persistence.influxdb;
import org.joda.time.DateTime; import org.joda.time.DateTime;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.mysql; package monasca.api.infrastructure.persistence.mysql;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@ -34,11 +34,11 @@ import com.hpcloud.mon.common.model.alarm.AlarmOperator;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinition; import monasca.api.domain.model.alarmdefinition.AlarmDefinition;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinitionRepository; import monasca.api.domain.model.alarmdefinition.AlarmDefinitionRepository;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
import com.hpcloud.mon.infrastructure.persistence.SubAlarmQueries; import monasca.api.infrastructure.persistence.SubAlarmQueries;
import com.hpcloud.persistence.BeanMapper; import com.hpcloud.persistence.BeanMapper;
/** /**

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.mysql; package monasca.api.infrastructure.persistence.mysql;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -28,10 +28,10 @@ import org.skife.jdbi.v2.Query;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.domain.model.alarm.Alarm; import monasca.api.domain.model.alarm.Alarm;
import com.hpcloud.mon.domain.model.alarm.AlarmRepository; import monasca.api.domain.model.alarm.AlarmRepository;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
import com.hpcloud.persistence.BeanMapper; import com.hpcloud.persistence.BeanMapper;
import com.hpcloud.persistence.SqlQueries; import com.hpcloud.persistence.SqlQueries;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.mysql; package monasca.api.infrastructure.persistence.mysql;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -24,11 +24,11 @@ import org.skife.jdbi.v2.Handle;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.hpcloud.mon.domain.exception.EntityExistsException; import monasca.api.domain.exception.EntityExistsException;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethod; import monasca.api.domain.model.notificationmethod.NotificationMethod;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodRepository; import monasca.api.domain.model.notificationmethod.NotificationMethodRepository;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodType; import monasca.api.domain.model.notificationmethod.NotificationMethodType;
import com.hpcloud.persistence.BeanMapper; import com.hpcloud.persistence.BeanMapper;
/** /**

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.vertica; package monasca.api.infrastructure.persistence.vertica;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Collection; import java.util.Collection;
@ -31,10 +31,10 @@ import org.skife.jdbi.v2.Handle;
import org.skife.jdbi.v2.Query; import org.skife.jdbi.v2.Query;
import org.skife.jdbi.v2.util.StringMapper; import org.skife.jdbi.v2.util.StringMapper;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistory; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistory;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistoryRepository; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistoryRepository;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
import com.hpcloud.mon.infrastructure.persistence.SubAlarmQueries; import monasca.api.infrastructure.persistence.SubAlarmQueries;
import com.hpcloud.persistence.BeanMapper; import com.hpcloud.persistence.BeanMapper;
/** /**

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.vertica; package monasca.api.infrastructure.persistence.vertica;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.sql.Timestamp; import java.sql.Timestamp;
@ -32,9 +32,9 @@ import org.skife.jdbi.v2.DBI;
import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.Handle;
import org.skife.jdbi.v2.Query; import org.skife.jdbi.v2.Query;
import com.hpcloud.mon.domain.model.measurement.MeasurementRepository; import monasca.api.domain.model.measurement.MeasurementRepository;
import com.hpcloud.mon.domain.model.measurement.Measurements; import monasca.api.domain.model.measurement.Measurements;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
/** /**
* Vertica measurement repository implementation. * Vertica measurement repository implementation.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.vertica; package monasca.api.infrastructure.persistence.vertica;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -27,8 +27,8 @@ import org.skife.jdbi.v2.Handle;
import org.skife.jdbi.v2.Query; import org.skife.jdbi.v2.Query;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.model.metric.MetricDefinitionRepository; import monasca.api.domain.model.metric.MetricDefinitionRepository;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
/** /**
* Vertica metric definition repository implementation. * Vertica metric definition repository implementation.

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.vertica; package monasca.api.infrastructure.persistence.vertica;
import java.util.Map; import java.util.Map;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.persistence.vertica; package monasca.api.infrastructure.persistence.vertica;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
@ -31,9 +31,9 @@ import org.skife.jdbi.v2.DBI;
import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.Handle;
import org.skife.jdbi.v2.Query; import org.skife.jdbi.v2.Query;
import com.hpcloud.mon.domain.model.statistic.StatisticRepository; import monasca.api.domain.model.statistic.StatisticRepository;
import com.hpcloud.mon.domain.model.statistic.Statistics; import monasca.api.domain.model.statistic.Statistics;
import com.hpcloud.mon.infrastructure.persistence.DimensionQueries; import monasca.api.infrastructure.persistence.DimensionQueries;
/** /**
* Vertica statistic repository implementation. * Vertica statistic repository implementation.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.servlet; package monasca.api.infrastructure.servlet;
import java.io.IOException; import java.io.IOException;
import java.util.Collections; import java.util.Collections;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.servlet; package monasca.api.infrastructure.servlet;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import com.hpcloud.mon.infrastructure.servlet.PreAuthenticationFilter.ErrorCapturingServletResponseWrapper; import monasca.api.infrastructure.servlet.PreAuthenticationFilter.ErrorCapturingServletResponseWrapper;
/** /**
* Authenticates requests using header information from the CsMiddleware. Provides the X-TENANT-ID * Authenticates requests using header information from the CsMiddleware. Provides the X-TENANT-ID

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.servlet; package monasca.api.infrastructure.servlet;
import java.io.IOException; import java.io.IOException;
@ -29,8 +29,8 @@ import javax.ws.rs.core.MediaType;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
/** /**
* Authenticates requests using header information from the CsMiddleware. Provides the X-TENANT-ID * Authenticates requests using header information from the CsMiddleware. Provides the X-TENANT-ID

View File

@ -12,15 +12,15 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.infrastructure.servlet; package monasca.api.infrastructure.servlet;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
import com.sun.jersey.spi.container.ContainerRequest; import com.sun.jersey.spi.container.ContainerRequest;
import com.sun.jersey.spi.container.ContainerRequestFilter; import com.sun.jersey.spi.container.ContainerRequestFilter;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import static com.hpcloud.mon.infrastructure.servlet.PostAuthenticationFilter.X_MONASCA_AGENT; import static monasca.api.infrastructure.servlet.PostAuthenticationFilter.X_MONASCA_AGENT;
public class RoleAuthorizationFilter implements ContainerRequestFilter { public class RoleAuthorizationFilter implements ContainerRequestFilter {

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import java.net.URI; import java.net.URI;
import java.util.List; import java.util.List;
@ -39,16 +39,16 @@ import org.hibernate.validator.constraints.NotEmpty;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonMappingException;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.hpcloud.mon.app.AlarmDefinitionService; import monasca.api.app.AlarmDefinitionService;
import com.hpcloud.mon.app.command.CreateAlarmDefinitionCommand; import monasca.api.app.command.CreateAlarmDefinitionCommand;
import com.hpcloud.mon.app.command.UpdateAlarmDefinitionCommand; import monasca.api.app.command.UpdateAlarmDefinitionCommand;
import com.hpcloud.mon.app.validation.AlarmValidation; import monasca.api.app.validation.AlarmValidation;
import com.hpcloud.mon.app.validation.Validation; import monasca.api.app.validation.Validation;
import com.hpcloud.mon.common.model.alarm.AlarmExpression; import com.hpcloud.mon.common.model.alarm.AlarmExpression;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinition; import monasca.api.domain.model.alarmdefinition.AlarmDefinition;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinitionRepository; import monasca.api.domain.model.alarmdefinition.AlarmDefinitionRepository;
import com.hpcloud.mon.resource.annotation.PATCH; import monasca.api.resource.annotation.PATCH;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiParam;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -38,16 +38,16 @@ import org.joda.time.DateTime;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonMappingException;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.hpcloud.mon.app.AlarmService; import monasca.api.app.AlarmService;
import com.hpcloud.mon.app.command.UpdateAlarmCommand; import monasca.api.app.command.UpdateAlarmCommand;
import com.hpcloud.mon.app.validation.Validation; import monasca.api.app.validation.Validation;
import com.hpcloud.mon.common.model.alarm.AlarmState; import com.hpcloud.mon.common.model.alarm.AlarmState;
import com.hpcloud.mon.domain.model.alarm.Alarm; import monasca.api.domain.model.alarm.Alarm;
import com.hpcloud.mon.domain.model.alarm.AlarmRepository; import monasca.api.domain.model.alarm.AlarmRepository;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinition; import monasca.api.domain.model.alarmdefinition.AlarmDefinition;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistory; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistory;
import com.hpcloud.mon.domain.model.alarmstatehistory.AlarmStateHistoryRepository; import monasca.api.domain.model.alarmstatehistory.AlarmStateHistoryRepository;
import com.hpcloud.mon.resource.annotation.PATCH; import monasca.api.resource.annotation.PATCH;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiParam;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -19,10 +19,10 @@ import java.util.List;
import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.UriInfo;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.domain.common.AbstractEntity; import com.hpcloud.mon.domain.common.AbstractEntity;
import com.hpcloud.mon.domain.model.common.Link; import monasca.api.domain.model.common.Link;
import com.hpcloud.mon.domain.model.common.Linked; import monasca.api.domain.model.common.Linked;
import com.hpcloud.util.Injector; import com.hpcloud.util.Injector;
/** /**

View File

@ -11,13 +11,13 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.hpcloud.mon.app.validation.Validation; import monasca.api.app.validation.Validation;
import com.hpcloud.mon.domain.model.measurement.MeasurementRepository; import monasca.api.domain.model.measurement.MeasurementRepository;
import com.hpcloud.mon.domain.model.measurement.Measurements; import monasca.api.domain.model.measurement.Measurements;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;
import org.joda.time.DateTime; import org.joda.time.DateTime;

View File

@ -11,19 +11,19 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.google.common.base.Splitter; import com.google.common.base.Splitter;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.hpcloud.mon.app.MetricService; import monasca.api.app.MetricService;
import com.hpcloud.mon.app.command.CreateMetricCommand; import monasca.api.app.command.CreateMetricCommand;
import com.hpcloud.mon.app.validation.Validation; import monasca.api.app.validation.Validation;
import com.hpcloud.mon.common.model.Services; import com.hpcloud.mon.common.model.Services;
import com.hpcloud.mon.common.model.metric.Metric; import com.hpcloud.mon.common.model.metric.Metric;
import com.hpcloud.mon.common.model.metric.MetricDefinition; import com.hpcloud.mon.common.model.metric.MetricDefinition;
import com.hpcloud.mon.domain.model.metric.MetricDefinitionRepository; import monasca.api.domain.model.metric.MetricDefinitionRepository;
import com.hpcloud.mon.resource.exception.Exceptions; import monasca.api.resource.exception.Exceptions;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import java.net.URI; import java.net.URI;
import java.util.List; import java.util.List;
@ -33,9 +33,9 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.UriInfo;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.hpcloud.mon.app.command.CreateNotificationMethodCommand; import monasca.api.app.command.CreateNotificationMethodCommand;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethod; import monasca.api.domain.model.notificationmethod.NotificationMethod;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodRepository; import monasca.api.domain.model.notificationmethod.NotificationMethodRepository;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;

View File

@ -11,14 +11,14 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.google.common.base.Splitter; import com.google.common.base.Splitter;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.hpcloud.mon.app.validation.Validation; import monasca.api.app.validation.Validation;
import com.hpcloud.mon.domain.model.statistic.StatisticRepository; import monasca.api.domain.model.statistic.StatisticRepository;
import com.hpcloud.mon.domain.model.statistic.Statistics; import monasca.api.domain.model.statistic.Statistics;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;
import org.joda.time.DateTime; import org.joda.time.DateTime;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource; package monasca.api.resource;
import java.util.List; import java.util.List;
@ -25,8 +25,8 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.UriInfo;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import com.hpcloud.mon.domain.model.version.Version; import monasca.api.domain.model.version.Version;
import com.hpcloud.mon.domain.model.version.VersionRepository; import monasca.api.domain.model.version.VersionRepository;
import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiOperation;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.annotation; package monasca.api.resource.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import io.dropwizard.jersey.validation.ValidationErrorMessage; import io.dropwizard.jersey.validation.ValidationErrorMessage;
@ -21,7 +21,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
@Provider @Provider
public class ConstraintViolationExceptionMapper implements public class ConstraintViolationExceptionMapper implements

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -19,8 +19,8 @@ import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.hpcloud.mon.domain.exception.EntityExistsException; import monasca.api.domain.exception.EntityExistsException;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
@Provider @Provider
public class EntityExistsExceptionMapper implements ExceptionMapper<EntityExistsException> { public class EntityExistsExceptionMapper implements ExceptionMapper<EntityExistsException> {

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -19,8 +19,8 @@ import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.hpcloud.mon.domain.exception.EntityNotFoundException; import monasca.api.domain.exception.EntityNotFoundException;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
@Provider @Provider
public class EntityNotFoundExceptionMapper implements ExceptionMapper<EntityNotFoundException> { public class EntityNotFoundExceptionMapper implements ExceptionMapper<EntityNotFoundException> {

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import java.util.Random; import java.util.Random;

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -19,7 +19,7 @@ import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
@Provider @Provider
public class IllegalArgumentExceptionMapper implements ExceptionMapper<IllegalArgumentException> { public class IllegalArgumentExceptionMapper implements ExceptionMapper<IllegalArgumentException> {

View File

@ -11,15 +11,15 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.hpcloud.mon.domain.exception.InvalidEntityException; import monasca.api.domain.exception.InvalidEntityException;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
@Provider @Provider
public class InvalidEntityExceptionMapper implements ExceptionMapper<InvalidEntityException> { public class InvalidEntityExceptionMapper implements ExceptionMapper<InvalidEntityException> {

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -19,7 +19,7 @@ import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonMappingException;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
/** /**
* Adapted from Dropwizard's JsonMappingExceptionManager. * Adapted from Dropwizard's JsonMappingExceptionManager.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -21,7 +21,7 @@ import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.core.JsonGenerationException; import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
/** /**
* Adapted from Dropwizard's JsonProcessingExceptionMapper. * Adapted from Dropwizard's JsonProcessingExceptionMapper.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.exception; package monasca.api.resource.exception;
import javax.ws.rs.WebApplicationException; import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
@ -20,7 +20,7 @@ import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType; import monasca.api.resource.exception.Exceptions.FaultType;
/** /**
* Adapted from Dropwizard's LoggingExceptionMapper. * Adapted from Dropwizard's LoggingExceptionMapper.

View File

@ -11,7 +11,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package com.hpcloud.mon.resource.serialization; package monasca.api.resource.serialization;
import java.io.IOException; import java.io.IOException;
import java.util.Collections; import java.util.Collections;

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon; package monasca.api;
public class MonApiApplicationRunner { public class MonApiApplicationRunner {
public static void main(String... args) throws Exception { public static void main(String... args) throws Exception {

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.app; package monasca.api.app;
import static org.mockito.Matchers.any; import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.anyString;
@ -37,15 +37,15 @@ import org.mockito.stubbing.Answer;
import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.hpcloud.mon.MonApiConfiguration; import monasca.api.MonApiConfiguration;
import com.hpcloud.mon.app.AlarmDefinitionService.SubExpressions; import monasca.api.app.AlarmDefinitionService.SubExpressions;
import com.hpcloud.mon.app.command.UpdateAlarmDefinitionCommand; import monasca.api.app.command.UpdateAlarmDefinitionCommand;
import com.hpcloud.mon.common.model.alarm.AlarmExpression; import com.hpcloud.mon.common.model.alarm.AlarmExpression;
import com.hpcloud.mon.common.model.alarm.AlarmSubExpression; import com.hpcloud.mon.common.model.alarm.AlarmSubExpression;
import com.hpcloud.mon.domain.model.alarm.AlarmRepository; import monasca.api.domain.model.alarm.AlarmRepository;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinition; import monasca.api.domain.model.alarmdefinition.AlarmDefinition;
import com.hpcloud.mon.domain.model.alarmdefinition.AlarmDefinitionRepository; import monasca.api.domain.model.alarmdefinition.AlarmDefinitionRepository;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodRepository; import monasca.api.domain.model.notificationmethod.NotificationMethodRepository;
@Test @Test
public class AlarmDefinitionServiceTest { public class AlarmDefinitionServiceTest {

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import static com.hpcloud.dropwizard.JsonHelpers.jsonFixture; import static com.hpcloud.dropwizard.JsonHelpers.jsonFixture;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -23,7 +23,7 @@ import java.util.Map;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.hpcloud.mon.domain.model.AbstractModelTest; import monasca.api.domain.model.AbstractModelTest;
@Test @Test
public class CreateAlarmDefinitionCommandTest extends AbstractModelTest { public class CreateAlarmDefinitionCommandTest extends AbstractModelTest {

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.app.command; package monasca.api.app.command;
import static com.hpcloud.dropwizard.JsonHelpers.jsonFixture; import static com.hpcloud.dropwizard.JsonHelpers.jsonFixture;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@ -20,9 +20,9 @@ import static org.testng.Assert.assertEquals;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonMappingException;
import com.hpcloud.mon.app.command.CreateNotificationMethodCommand; import monasca.api.app.command.CreateNotificationMethodCommand;
import com.hpcloud.mon.domain.model.AbstractModelTest; import monasca.api.domain.model.AbstractModelTest;
import com.hpcloud.mon.domain.model.notificationmethod.NotificationMethodType; import monasca.api.domain.model.notificationmethod.NotificationMethodType;
@Test @Test
public class CreateNotificationMethodTest extends AbstractModelTest { public class CreateNotificationMethodTest extends AbstractModelTest {

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.app.validation; package monasca.api.app.validation;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.app.validation; package monasca.api.app.validation;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -12,7 +12,7 @@
* the License. * the License.
*/ */
package com.hpcloud.mon.domain.model; package monasca.api.domain.model;
import java.io.IOException; import java.io.IOException;
@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.joda.JodaModule; import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.hpcloud.mon.resource.serialization.SubAlarmExpressionSerializer; import monasca.api.resource.serialization.SubAlarmExpressionSerializer;
/** /**
* Base model test. * Base model test.

Some files were not shown because too many files have changed in this diff Show More