diff --git a/.travis.yml b/.travis.yml index e9d80b5afa1..8dfa31fc29b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,9 +81,9 @@ jobs: - ./tests/performance/preparation/deploy.sh - TERM=dumb ./tests/performance/wrk_tests/latency.sh "https://172.17.0.1:10001" "$(cat ansible/files/auth.guest)" 2m - TERM=dumb ./tests/performance/wrk_tests/throughput.sh "https://172.17.0.1:10001" "$(cat ansible/files/auth.guest)" 4 2 2m - - OPENWHISK_HOST="172.17.0.1" CONNECTIONS="100" REQUESTS_PER_SEC="1" ./gradlew gatlingRun-ApiV1Simulation - - OPENWHISK_HOST="172.17.0.1" MEAN_RESPONSE_TIME="1000" API_KEY="$(cat ansible/files/auth.guest)" EXCLUDED_KINDS="python:default,java:default,swift:default" PAUSE_BETWEEN_INVOKES="100" ./gradlew gatlingRun-LatencySimulation - - OPENWHISK_HOST="172.17.0.1" API_KEY="$(cat ansible/files/auth.guest)" CONNECTIONS="100" REQUESTS_PER_SEC="1" ./gradlew gatlingRun-BlockingInvokeOneActionSimulation + - OPENWHISK_HOST="172.17.0.1" CONNECTIONS="100" REQUESTS_PER_SEC="1" ./gradlew gatlingRun-org.apache.openwhisk.ApiV1Simulation + - OPENWHISK_HOST="172.17.0.1" MEAN_RESPONSE_TIME="1000" API_KEY="$(cat ansible/files/auth.guest)" EXCLUDED_KINDS="python:default,java:default,swift:default" PAUSE_BETWEEN_INVOKES="100" ./gradlew gatlingRun-org.apache.openwhisk.LatencySimulation + - OPENWHISK_HOST="172.17.0.1" API_KEY="$(cat ansible/files/auth.guest)" CONNECTIONS="100" REQUESTS_PER_SEC="1" ./gradlew gatlingRun-org.apache.openwhisk.BlockingInvokeOneActionSimulation # The following configuration does not make much sense. But we do not have enough users. But it's good to verify, that the test is still working. - - OPENWHISK_HOST="172.17.0.1" USERS="1" REQUESTS_PER_SEC="1" ./gradlew gatlingRun-ColdBlockingInvokeSimulation + - OPENWHISK_HOST="172.17.0.1" USERS="1" REQUESTS_PER_SEC="1" ./gradlew gatlingRun-org.apache.openwhisk.ColdBlockingInvokeSimulation name: "Performance Tests" diff --git a/ansible/group_vars/all b/ansible/group_vars/all index 86c231ad048..f43da469dd3 100755 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -36,7 +36,7 @@ whisk: date: "{{ansible_date_time.iso8601}}" ## -# configuration parameters related to support runtimes (see whisk.core.entity.ExecManifest for schema of the manifest). +# configuration parameters related to support runtimes (see org.apache.openwhisk.core.entity.ExecManifest for schema of the manifest). # briefly the parameters are: # # runtimes_registry: optional registry (with trailing slack) where to pull docker images from for runtimes and backbox images @@ -199,7 +199,7 @@ invoker: name: "{{ __invoker_ssl_keyPrefix }}openwhisk-keystore.p12" userLogs: - spi: "{{ userLogs_spi | default('whisk.core.containerpool.logging.DockerToActivationLogStoreProvider') }}" + spi: "{{ userLogs_spi | default('org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider') }}" nginx: confdir: "{{ config_root_dir }}/nginx" diff --git a/common/scala/src/main/resources/reference.conf b/common/scala/src/main/resources/reference.conf index b671f020246..ad3beddb3bc 100644 --- a/common/scala/src/main/resources/reference.conf +++ b/common/scala/src/main/resources/reference.conf @@ -4,14 +4,14 @@ include "s3-reference.conf" whisk.spi { - ArtifactStoreProvider = whisk.core.database.CouchDbStoreProvider - ActivationStoreProvider = whisk.core.database.ArtifactActivationStoreProvider - MessagingProvider = whisk.connector.kafka.KafkaMessagingProvider - ContainerFactoryProvider = whisk.core.containerpool.docker.DockerContainerFactoryProvider - LogStoreProvider = whisk.core.containerpool.logging.DockerToActivationLogStoreProvider - LoadBalancerProvider = whisk.core.loadBalancer.ShardingContainerPoolBalancer - EntitlementSpiProvider = whisk.core.entitlement.LocalEntitlementProvider - AuthenticationDirectiveProvider = whisk.core.controller.BasicAuthenticationDirective + ArtifactStoreProvider = org.apache.openwhisk.core.database.CouchDbStoreProvider + ActivationStoreProvider = org.apache.openwhisk.core.database.ArtifactActivationStoreProvider + MessagingProvider = org.apache.openwhisk.connector.kafka.KafkaMessagingProvider + ContainerFactoryProvider = org.apache.openwhisk.core.containerpool.docker.DockerContainerFactoryProvider + LogStoreProvider = org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider + LoadBalancerProvider = org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer + EntitlementSpiProvider = org.apache.openwhisk.core.entitlement.LocalEntitlementProvider + AuthenticationDirectiveProvider = org.apache.openwhisk.core.controller.BasicAuthenticationDirective } dispatchers { diff --git a/common/scala/src/main/scala/whisk/common/CausedBy.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/CausedBy.scala similarity index 96% rename from common/scala/src/main/scala/whisk/common/CausedBy.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/CausedBy.scala index caa2ba4d0d6..a76acf2f3ac 100644 --- a/common/scala/src/main/scala/whisk/common/CausedBy.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/CausedBy.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common /** * Helper to match on exceptions caused by other exceptions. diff --git a/common/scala/src/main/scala/whisk/common/Config.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Config.scala similarity index 99% rename from common/scala/src/main/scala/whisk/common/Config.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/Config.scala index 8289f4a91bb..b9fd333982a 100644 --- a/common/scala/src/main/scala/whisk/common/Config.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Config.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/common/Counter.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Counter.scala similarity index 97% rename from common/scala/src/main/scala/whisk/common/Counter.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/Counter.scala index e7fdfe0e4aa..cbf49b9c205 100644 --- a/common/scala/src/main/scala/whisk/common/Counter.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Counter.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.util.concurrent.atomic.AtomicLong diff --git a/common/scala/src/main/scala/whisk/common/ForcibleSemaphore.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/ForcibleSemaphore.scala similarity index 99% rename from common/scala/src/main/scala/whisk/common/ForcibleSemaphore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/ForcibleSemaphore.scala index 8eb1252e858..1040d268022 100644 --- a/common/scala/src/main/scala/whisk/common/ForcibleSemaphore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/ForcibleSemaphore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.util.concurrent.locks.AbstractQueuedSynchronizer diff --git a/common/scala/src/main/scala/whisk/common/Https.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Https.scala similarity index 98% rename from common/scala/src/main/scala/whisk/common/Https.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/Https.scala index 4f2fb4d4308..13c4bf81f32 100644 --- a/common/scala/src/main/scala/whisk/common/Https.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Https.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.io.{FileInputStream, InputStream} import java.security.{KeyStore, SecureRandom} diff --git a/common/scala/src/main/scala/whisk/common/Logging.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala similarity index 99% rename from common/scala/src/main/scala/whisk/common/Logging.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala index c60efc32ddf..902bccc4e9a 100644 --- a/common/scala/src/main/scala/whisk/common/Logging.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.io.PrintStream import java.time.{Clock, Instant, ZoneId} @@ -23,7 +23,7 @@ import java.time.format.DateTimeFormatter import akka.event.Logging._ import akka.event.LoggingAdapter import kamon.Kamon -import whisk.core.entity.ControllerInstanceId +import org.apache.openwhisk.core.entity.ControllerInstanceId trait Logging { diff --git a/common/scala/src/main/scala/whisk/common/RingBuffer.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/RingBuffer.scala similarity index 96% rename from common/scala/src/main/scala/whisk/common/RingBuffer.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/RingBuffer.scala index 8c4713db649..0d3541d6abb 100644 --- a/common/scala/src/main/scala/whisk/common/RingBuffer.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/RingBuffer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import org.apache.commons.collections.buffer.CircularFifoBuffer diff --git a/common/scala/src/main/scala/whisk/common/Scheduler.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Scheduler.scala similarity index 99% rename from common/scala/src/main/scala/whisk/common/Scheduler.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/Scheduler.scala index 28d150260ed..48e6a07847b 100644 --- a/common/scala/src/main/scala/whisk/common/Scheduler.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Scheduler.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/common/scala/src/main/scala/whisk/common/TransactionId.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/TransactionId.scala similarity index 98% rename from common/scala/src/main/scala/whisk/common/TransactionId.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/TransactionId.scala index ac9e73cf462..9242ecb8b78 100644 --- a/common/scala/src/main/scala/whisk/common/TransactionId.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/TransactionId.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.time.{Clock, Duration, Instant} @@ -23,9 +23,9 @@ import akka.event.Logging.{DebugLevel, InfoLevel, LogLevel, WarningLevel} import akka.http.scaladsl.model.headers.RawHeader import pureconfig.loadConfigOrThrow import spray.json._ -import whisk.core.ConfigKeys +import org.apache.openwhisk.core.ConfigKeys import pureconfig._ -import whisk.common.tracing.WhiskTracerProvider +import org.apache.openwhisk.common.tracing.WhiskTracerProvider import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/common/UserEvents.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/UserEvents.scala similarity index 87% rename from common/scala/src/main/scala/whisk/common/UserEvents.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/UserEvents.scala index 0bff0203abd..18aa6e18852 100644 --- a/common/scala/src/main/scala/whisk/common/UserEvents.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/UserEvents.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import pureconfig.loadConfigOrThrow -import whisk.core.ConfigKeys -import whisk.core.connector.{EventMessage, MessageProducer} +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.connector.{EventMessage, MessageProducer} object UserEvents { diff --git a/common/scala/src/main/scala/whisk/common/tracing/OpenTracingProvider.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/tracing/OpenTracingProvider.scala similarity index 97% rename from common/scala/src/main/scala/whisk/common/tracing/OpenTracingProvider.scala rename to common/scala/src/main/scala/org/apache/openwhisk/common/tracing/OpenTracingProvider.scala index 41025325db6..f7e5499809f 100644 --- a/common/scala/src/main/scala/whisk/common/tracing/OpenTracingProvider.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/common/tracing/OpenTracingProvider.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common.tracing +package org.apache.openwhisk.common.tracing import java.util.concurrent.TimeUnit @@ -27,8 +27,8 @@ import io.opentracing.propagation.{Format, TextMapExtractAdapter, TextMapInjectA import io.opentracing.util.GlobalTracer import io.opentracing.{Span, SpanContext, Tracer} import pureconfig._ -import whisk.common.{LogMarkerToken, TransactionId} -import whisk.core.ConfigKeys +import org.apache.openwhisk.common.{LogMarkerToken, TransactionId} +import org.apache.openwhisk.core.ConfigKeys import zipkin2.reporter.okhttp3.OkHttpSender import zipkin2.reporter.{AsyncReporter, Sender} diff --git a/common/scala/src/main/scala/whisk/connector/kafka/KafkaConsumerConnector.scala b/common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaConsumerConnector.scala similarity index 95% rename from common/scala/src/main/scala/whisk/connector/kafka/KafkaConsumerConnector.scala rename to common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaConsumerConnector.scala index 0891cee806d..51ef83e506d 100644 --- a/common/scala/src/main/scala/whisk/connector/kafka/KafkaConsumerConnector.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaConsumerConnector.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.connector.kafka +package org.apache.openwhisk.connector.kafka import akka.actor.ActorSystem import org.apache.kafka.clients.consumer.{ConsumerConfig, KafkaConsumer} @@ -23,12 +23,12 @@ import org.apache.kafka.common.TopicPartition import org.apache.kafka.common.errors.{RetriableException, WakeupException} import org.apache.kafka.common.serialization.ByteArrayDeserializer import pureconfig.loadConfigOrThrow -import whisk.common.{Logging, LoggingMarkers, MetricEmitter, Scheduler} -import whisk.connector.kafka.KafkaConfiguration._ -import whisk.core.ConfigKeys -import whisk.core.connector.MessageConsumer -import whisk.utils.Exceptions -import whisk.utils.TimeHelpers._ +import org.apache.openwhisk.common.{Logging, LoggingMarkers, MetricEmitter, Scheduler} +import org.apache.openwhisk.connector.kafka.KafkaConfiguration._ +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.connector.MessageConsumer +import org.apache.openwhisk.utils.Exceptions +import org.apache.openwhisk.utils.TimeHelpers._ import scala.collection.JavaConverters._ import scala.concurrent.duration._ diff --git a/common/scala/src/main/scala/whisk/connector/kafka/KafkaMessagingProvider.scala b/common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaMessagingProvider.scala similarity index 94% rename from common/scala/src/main/scala/whisk/connector/kafka/KafkaMessagingProvider.scala rename to common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaMessagingProvider.scala index f7a79fc3c1b..5cd719d0bd6 100644 --- a/common/scala/src/main/scala/whisk/connector/kafka/KafkaMessagingProvider.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaMessagingProvider.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.connector.kafka +package org.apache.openwhisk.connector.kafka import java.util.Properties @@ -23,10 +23,10 @@ import akka.actor.ActorSystem import org.apache.kafka.clients.admin.{AdminClient, AdminClientConfig, NewTopic} import org.apache.kafka.common.errors.{RetriableException, TopicExistsException} import pureconfig._ -import whisk.common.{CausedBy, Logging} -import whisk.core.{ConfigKeys, WhiskConfig} -import whisk.core.connector.{MessageConsumer, MessageProducer, MessagingProvider} -import whisk.core.entity.ByteSize +import org.apache.openwhisk.common.{CausedBy, Logging} +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.core.connector.{MessageConsumer, MessageProducer, MessagingProvider} +import org.apache.openwhisk.core.entity.ByteSize import scala.collection.JavaConverters._ import scala.concurrent.duration._ diff --git a/common/scala/src/main/scala/whisk/connector/kafka/KafkaProducerConnector.scala b/common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaProducerConnector.scala similarity index 92% rename from common/scala/src/main/scala/whisk/connector/kafka/KafkaProducerConnector.scala rename to common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaProducerConnector.scala index 7af5c187fe6..6af2e41228b 100644 --- a/common/scala/src/main/scala/whisk/connector/kafka/KafkaProducerConnector.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaProducerConnector.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.connector.kafka +package org.apache.openwhisk.connector.kafka import akka.actor.ActorSystem import akka.pattern.after @@ -23,12 +23,12 @@ import org.apache.kafka.clients.producer._ import org.apache.kafka.common.errors._ import org.apache.kafka.common.serialization.StringSerializer import pureconfig._ -import whisk.common.{Counter, Logging, TransactionId} -import whisk.connector.kafka.KafkaConfiguration._ -import whisk.core.ConfigKeys -import whisk.core.connector.{Message, MessageProducer} -import whisk.core.entity.{ByteSize, UUIDs} -import whisk.utils.Exceptions +import org.apache.openwhisk.common.{Counter, Logging, TransactionId} +import org.apache.openwhisk.connector.kafka.KafkaConfiguration._ +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.connector.{Message, MessageProducer} +import org.apache.openwhisk.core.entity.{ByteSize, UUIDs} +import org.apache.openwhisk.utils.Exceptions import scala.collection.JavaConverters._ import scala.concurrent.duration._ diff --git a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/WhiskConfig.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/WhiskConfig.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/WhiskConfig.scala index d500a996d43..38942b527f8 100644 --- a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/WhiskConfig.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core +package org.apache.openwhisk.core import java.io.File import scala.io.Source -import whisk.common.{Config, Logging} +import org.apache.openwhisk.common.{Config, Logging} /** * A set of properties which might be needed to run a whisk microservice implemented diff --git a/common/scala/src/main/scala/whisk/core/connector/Message.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/connector/Message.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala index 5122ef347c7..07277cff509 100644 --- a/common/scala/src/main/scala/whisk/core/connector/Message.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.connector +package org.apache.openwhisk.core.connector import scala.util.Try import spray.json._ -import whisk.common.TransactionId -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity._ /** Basic trait for messages that are sent on a message bus connector. */ trait Message { diff --git a/common/scala/src/main/scala/whisk/core/connector/MessageConsumer.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageConsumer.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/connector/MessageConsumer.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageConsumer.scala index 4c21545f418..8713b4afde5 100644 --- a/common/scala/src/main/scala/whisk/core/connector/MessageConsumer.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageConsumer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.connector +package org.apache.openwhisk.core.connector import scala.annotation.tailrec import scala.collection.immutable @@ -26,8 +26,8 @@ import scala.util.Failure import org.apache.kafka.clients.consumer.CommitFailedException import akka.actor.FSM import akka.pattern.pipe -import whisk.common.Logging -import whisk.common.TransactionId +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId trait MessageConsumer { diff --git a/common/scala/src/main/scala/whisk/core/connector/MessageProducer.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageProducer.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/connector/MessageProducer.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageProducer.scala index de37c339170..e527f6960c2 100644 --- a/common/scala/src/main/scala/whisk/core/connector/MessageProducer.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageProducer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.connector +package org.apache.openwhisk.core.connector import scala.concurrent.Future diff --git a/common/scala/src/main/scala/whisk/core/connector/MessagingProvider.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessagingProvider.scala similarity index 88% rename from common/scala/src/main/scala/whisk/core/connector/MessagingProvider.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessagingProvider.scala index 298058a8af9..73b8441adf7 100644 --- a/common/scala/src/main/scala/whisk/core/connector/MessagingProvider.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessagingProvider.scala @@ -15,16 +15,16 @@ * limitations under the License. */ -package whisk.core.connector +package org.apache.openwhisk.core.connector import akka.actor.ActorSystem import scala.concurrent.duration.DurationInt import scala.concurrent.duration.FiniteDuration -import whisk.common.Logging -import whisk.core.WhiskConfig -import whisk.core.entity.ByteSize -import whisk.spi.Spi +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.spi.Spi import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/containerpool/AkkaContainerClient.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/AkkaContainerClient.scala similarity index 94% rename from common/scala/src/main/scala/whisk/core/containerpool/AkkaContainerClient.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/AkkaContainerClient.scala index 4462712a308..eb23b825643 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/AkkaContainerClient.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/AkkaContainerClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import akka.actor.ActorSystem import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ @@ -40,15 +40,15 @@ import scala.concurrent.duration._ import scala.util.Try import scala.util.control.NonFatal import spray.json._ -import whisk.common.Logging -import whisk.common.LoggingMarkers.CONTAINER_CLIENT_RETRIES -import whisk.common.MetricEmitter -import whisk.common.TransactionId -import whisk.core.entity.ActivationResponse.ContainerHttpError -import whisk.core.entity.ActivationResponse._ -import whisk.core.entity.ByteSize -import whisk.core.entity.size.SizeLong -import whisk.http.PoolingRestClient +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.LoggingMarkers.CONTAINER_CLIENT_RETRIES +import org.apache.openwhisk.common.MetricEmitter +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.ActivationResponse.ContainerHttpError +import org.apache.openwhisk.core.entity.ActivationResponse._ +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size.SizeLong +import org.apache.openwhisk.http.PoolingRestClient /** * This HTTP client is used only in the invoker to communicate with the action container. diff --git a/common/scala/src/main/scala/whisk/core/containerpool/ApacheBlockingContainerClient.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ApacheBlockingContainerClient.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/containerpool/ApacheBlockingContainerClient.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ApacheBlockingContainerClient.scala index 9db36a3d636..2bd87a9aa9e 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/ApacheBlockingContainerClient.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ApacheBlockingContainerClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import java.net.NoRouteToHostException import java.nio.charset.StandardCharsets @@ -32,10 +32,10 @@ import org.apache.http.impl.client.HttpClientBuilder import org.apache.http.impl.conn.PoolingHttpClientConnectionManager import org.apache.http.util.EntityUtils import spray.json._ -import whisk.common.{Logging, TransactionId} -import whisk.core.entity.ActivationResponse._ -import whisk.core.entity.ByteSize -import whisk.core.entity.size.SizeLong +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.entity.ActivationResponse._ +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size.SizeLong import scala.annotation.tailrec import scala.concurrent._ diff --git a/common/scala/src/main/scala/whisk/core/containerpool/Container.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/Container.scala similarity index 95% rename from common/scala/src/main/scala/whisk/core/containerpool/Container.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/Container.scala index 3167176abdd..1911e786698 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/Container.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/Container.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import java.time.Instant @@ -26,12 +26,12 @@ import akka.util.ByteString import pureconfig._ import spray.json.DefaultJsonProtocol._ import spray.json.JsObject -import whisk.common.{Logging, LoggingMarkers, TransactionId} -import whisk.core.ConfigKeys -import whisk.core.entity.ActivationResponse.{ContainerConnectionError, ContainerResponse} -import whisk.core.entity.{ActivationEntityLimit, ActivationResponse, ByteSize} -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.common.{Logging, LoggingMarkers, TransactionId} +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.entity.ActivationResponse.{ContainerConnectionError, ContainerResponse} +import org.apache.openwhisk.core.entity.{ActivationEntityLimit, ActivationResponse, ByteSize} +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration.{Duration, FiniteDuration, _} diff --git a/common/scala/src/main/scala/whisk/core/containerpool/ContainerClient.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerClient.scala similarity index 81% rename from common/scala/src/main/scala/whisk/core/containerpool/ContainerClient.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerClient.scala index b8161192cd1..0720a03420e 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/ContainerClient.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerClient.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import scala.concurrent.Future import spray.json._ -import whisk.common.TransactionId -import whisk.core.entity.ActivationResponse.ContainerHttpError -import whisk.core.entity.ActivationResponse._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.ActivationResponse.ContainerHttpError +import org.apache.openwhisk.core.entity.ActivationResponse._ trait ContainerClient { def post(endpoint: String, body: JsValue, retry: Boolean)( diff --git a/common/scala/src/main/scala/whisk/core/containerpool/ContainerFactory.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala similarity index 92% rename from common/scala/src/main/scala/whisk/core/containerpool/ContainerFactory.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala index 7b77f5f394b..0e4c2b82ef7 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/ContainerFactory.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import akka.actor.ActorSystem -import whisk.common.{Logging, TransactionId} -import whisk.core.WhiskConfig -import whisk.core.entity.{ByteSize, ExecManifest, InvokerInstanceId} -import whisk.spi.Spi +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entity.{ByteSize, ExecManifest, InvokerInstanceId} +import org.apache.openwhisk.spi.Spi import scala.concurrent.Future diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/DockerToActivationFileLogStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala similarity index 94% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/DockerToActivationFileLogStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala index 523c68611b5..868b9cfb810 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/DockerToActivationFileLogStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import java.nio.file.{Files, Path, Paths} import java.nio.file.attribute.PosixFilePermission.{ @@ -36,11 +36,11 @@ import akka.stream.{Graph, SinkShape, UniformFanOutShape} import akka.stream.scaladsl.{Broadcast, Flow, GraphDSL, Keep, MergeHub, RestartSink, Sink, Source} import akka.util.ByteString -import whisk.common.{AkkaLogging, TransactionId} -import whisk.core.containerpool.Container -import whisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.common.{AkkaLogging, TransactionId} +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages import spray.json._ import spray.json.DefaultJsonProtocol._ diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/DockerToActivationLogStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationLogStore.scala similarity index 90% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/DockerToActivationLogStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationLogStore.scala index f0ab49ff517..7fa1ac6be21 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/DockerToActivationLogStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationLogStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import akka.NotUsed import akka.actor.ActorSystem @@ -24,11 +24,11 @@ import akka.stream.scaladsl.Sink import akka.stream.scaladsl.Flow import akka.util.ByteString -import whisk.common.TransactionId -import whisk.core.containerpool.Container -import whisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} -import whisk.http.Messages -import whisk.core.database.UserContext +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchLogStore.scala similarity index 93% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchLogStore.scala index 58da7fa4309..7b0a9b96039 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchLogStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import java.nio.file.{Path, Paths} @@ -23,10 +23,10 @@ import akka.actor.ActorSystem import akka.stream.scaladsl.Flow import akka.http.scaladsl.model._ -import whisk.core.entity.{ActivationLogs, Identity, WhiskActivation} -import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._ -import whisk.core.ConfigKeys -import whisk.core.database.UserContext +import org.apache.openwhisk.core.entity.{ActivationLogs, Identity, WhiskActivation} +import org.apache.openwhisk.core.containerpool.logging.ElasticSearchJsonProtocol._ +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.{Future, Promise} import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchRestClient.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchRestClient.scala index 9218958b6ec..edd7d857ffa 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchRestClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import scala.concurrent.Future import scala.util.{Either, Try} @@ -31,8 +31,8 @@ import scala.util.Try import spray.json._ -import whisk.http.PoolingRestClient -import whisk.http.PoolingRestClient._ +import org.apache.openwhisk.http.PoolingRestClient +import org.apache.openwhisk.http.PoolingRestClient._ trait EsQueryMethod trait EsOrder diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/LogDriverLogStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStore.scala similarity index 88% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/LogDriverLogStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStore.scala index daa3acbaf2b..be53aacef5b 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/LogDriverLogStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStore.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import akka.actor.ActorSystem -import whisk.common.TransactionId -import whisk.core.containerpool.Container -import whisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} -import whisk.core.database.UserContext +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.Future diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/LogStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogStore.scala similarity index 90% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/LogStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogStore.scala index 29433d9da92..1b209c046f0 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/LogStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogStore.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import akka.actor.ActorSystem -import whisk.common.TransactionId -import whisk.core.containerpool.Container -import whisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} -import whisk.spi.Spi -import whisk.core.database.UserContext +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.entity.{ActivationLogs, ExecutableWhiskAction, Identity, WhiskActivation} +import org.apache.openwhisk.spi.Spi +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.Future diff --git a/common/scala/src/main/scala/whisk/core/containerpool/logging/SplunkLogStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/SplunkLogStore.scala similarity index 94% rename from common/scala/src/main/scala/whisk/core/containerpool/logging/SplunkLogStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/SplunkLogStore.scala index f22ce33978d..d550f8c3d46 100644 --- a/common/scala/src/main/scala/whisk/core/containerpool/logging/SplunkLogStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/SplunkLogStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import akka.actor.ActorSystem import akka.http.scaladsl.Http @@ -49,11 +49,11 @@ import scala.util.Try import spray.json._ -import whisk.common.AkkaLogging -import whisk.core.ConfigKeys -import whisk.core.entity.ActivationLogs -import whisk.core.entity.WhiskActivation -import whisk.core.database.UserContext +import org.apache.openwhisk.common.AkkaLogging +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.entity.ActivationLogs +import org.apache.openwhisk.core.entity.WhiskActivation +import org.apache.openwhisk.core.database.UserContext case class SplunkLogStoreConfig(host: String, port: Int, @@ -137,7 +137,7 @@ class SplunkLogStore( ActivationLogs( r.results .map(l => - //format same as whisk.core.containerpool.logging.LogLine.toFormattedString + //format same as org.apache.openwhisk.core.containerpool.logging.LogLine.toFormattedString f"${l.fields(splunkConfig.logTimestampField).convertTo[String]}%-30s ${l .fields(splunkConfig.logStreamField) .convertTo[String]}: ${l.fields(splunkConfig.logMessageField).convertTo[String].trim}")) diff --git a/common/scala/src/main/scala/whisk/core/database/ActivationStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationStore.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/ActivationStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationStore.scala index 9a821c93d46..174261afdd2 100644 --- a/common/scala/src/main/scala/whisk/core/database/ActivationStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.time.Instant @@ -23,9 +23,9 @@ import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.http.scaladsl.model.HttpRequest import spray.json.JsObject -import whisk.common.{Logging, TransactionId} -import whisk.core.entity._ -import whisk.spi.Spi +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.spi.Spi import scala.concurrent.Future diff --git a/common/scala/src/main/scala/whisk/core/database/ArtifactActivationStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactActivationStore.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/ArtifactActivationStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactActivationStore.scala index d6f5ad5f1dc..828273b1398 100644 --- a/common/scala/src/main/scala/whisk/core/database/ArtifactActivationStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactActivationStore.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.time.Instant import akka.actor.ActorSystem import akka.stream.ActorMaterializer import spray.json.JsObject -import whisk.common.{Logging, TransactionId} -import whisk.core.entity._ +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.entity._ import scala.concurrent.Future import scala.util.{Failure, Success} diff --git a/common/scala/src/main/scala/whisk/core/database/ArtifactStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStore.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/ArtifactStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStore.scala index 4a70e40c1a6..b63269a0254 100644 --- a/common/scala/src/main/scala/whisk/core/database/ArtifactStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import scala.concurrent.ExecutionContext import scala.concurrent.Future @@ -24,10 +24,10 @@ import akka.http.scaladsl.model._ import akka.stream.scaladsl._ import akka.util.ByteString import spray.json.JsObject -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.entity.Attachments.Attached -import whisk.core.entity.DocInfo +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity.DocInfo abstract class StaleParameter(val value: Option[String]) diff --git a/common/scala/src/main/scala/whisk/core/database/ArtifactStoreExceptions.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/database/ArtifactStoreExceptions.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala index 6ff97724b8c..fb6a0722110 100644 --- a/common/scala/src/main/scala/whisk/core/database/ArtifactStoreExceptions.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database sealed abstract class ArtifactStoreException(message: String) extends Exception(message) diff --git a/common/scala/src/main/scala/whisk/core/database/ArtifactStoreProvider.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreProvider.scala similarity index 90% rename from common/scala/src/main/scala/whisk/core/database/ArtifactStoreProvider.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreProvider.scala index 32d61501410..d9622a40dcf 100644 --- a/common/scala/src/main/scala/whisk/core/database/ArtifactStoreProvider.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreProvider.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import akka.actor.ActorSystem import akka.stream.ActorMaterializer import com.typesafe.config.ConfigFactory import spray.json.RootJsonFormat -import whisk.common.Logging -import whisk.spi.{Spi, SpiLoader} -import whisk.core.entity.DocumentReader +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.spi.{Spi, SpiLoader} +import org.apache.openwhisk.core.entity.DocumentReader import scala.reflect.ClassTag diff --git a/common/scala/src/main/scala/whisk/core/database/AttachmentStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/AttachmentStore.scala similarity index 93% rename from common/scala/src/main/scala/whisk/core/database/AttachmentStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/AttachmentStore.scala index e606f1db7a5..48c711bab86 100644 --- a/common/scala/src/main/scala/whisk/core/database/AttachmentStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/AttachmentStore.scala @@ -14,16 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import akka.actor.ActorSystem import akka.http.scaladsl.model.ContentType import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Sink, Source} import akka.util.ByteString -import whisk.common.{Logging, TransactionId} -import whisk.core.entity.DocId -import whisk.spi.Spi +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.entity.DocId +import org.apache.openwhisk.spi.Spi import scala.concurrent.{ExecutionContext, Future} import scala.reflect.ClassTag diff --git a/common/scala/src/main/scala/whisk/core/database/AttachmentSupport.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/AttachmentSupport.scala similarity index 95% rename from common/scala/src/main/scala/whisk/core/database/AttachmentSupport.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/AttachmentSupport.scala index 600e8b676aa..173a3eed72c 100644 --- a/common/scala/src/main/scala/whisk/core/database/AttachmentSupport.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/AttachmentSupport.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.util.Base64 @@ -25,10 +25,10 @@ import akka.stream.Materializer import akka.stream.scaladsl.{Sink, Source} import akka.util.ByteString import spray.json.DefaultJsonProtocol -import whisk.common.TransactionId -import whisk.core.database.AttachmentSupport.MemScheme -import whisk.core.entity.Attachments.Attached -import whisk.core.entity.{ByteSize, DocId, DocInfo, UUID} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.AttachmentSupport.MemScheme +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity.{ByteSize, DocId, DocInfo, UUID} import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/database/Batcher.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/Batcher.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/Batcher.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/Batcher.scala index 25a6d9e76b8..222d0098512 100644 --- a/common/scala/src/main/scala/whisk/core/database/Batcher.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/Batcher.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import scala.collection.immutable.Queue import scala.concurrent.{ExecutionContext, Future, Promise} diff --git a/common/scala/src/main/scala/whisk/core/database/ConcurrentMapBackedCache.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ConcurrentMapBackedCache.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/ConcurrentMapBackedCache.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/ConcurrentMapBackedCache.scala index 4133466b0a0..f9205408774 100644 --- a/common/scala/src/main/scala/whisk/core/database/ConcurrentMapBackedCache.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ConcurrentMapBackedCache.scala @@ -20,7 +20,7 @@ * Copyright (C) 2011-2015 the spray project */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.util.concurrent.ConcurrentMap diff --git a/common/scala/src/main/scala/whisk/core/database/CouchDbRestClient.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestClient.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/database/CouchDbRestClient.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestClient.scala index b1e3b420f96..3201fd3fe58 100644 --- a/common/scala/src/main/scala/whisk/core/database/CouchDbRestClient.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.net.URLEncoder import java.nio.charset.StandardCharsets @@ -27,9 +27,9 @@ import akka.stream.scaladsl._ import akka.util.ByteString import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.Logging -import whisk.http.PoolingRestClient -import whisk.http.PoolingRestClient._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.http.PoolingRestClient +import org.apache.openwhisk.http.PoolingRestClient._ import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/database/CouchDbRestStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/CouchDbRestStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala index 49a62906b05..4707781e0ab 100644 --- a/common/scala/src/main/scala/whisk/core/database/CouchDbRestStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import akka.actor.ActorSystem import akka.event.Logging.ErrorLevel @@ -26,11 +26,11 @@ import akka.util.ByteString import scala.concurrent.Await import scala.concurrent.duration._ import spray.json._ -import whisk.common.{Logging, LoggingMarkers, MetricEmitter, TransactionId} -import whisk.core.database.StoreUtils._ -import whisk.core.entity.Attachments.Attached -import whisk.core.entity.{BulkEntityResult, DocInfo, DocumentReader, UUID} -import whisk.http.Messages +import org.apache.openwhisk.common.{Logging, LoggingMarkers, MetricEmitter, TransactionId} +import org.apache.openwhisk.core.database.StoreUtils._ +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity.{BulkEntityResult, DocInfo, DocumentReader, UUID} +import org.apache.openwhisk.http.Messages import scala.concurrent.Future import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbStoreProvider.scala similarity index 92% rename from common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbStoreProvider.scala index 1fc11a1de94..a163c3cf781 100644 --- a/common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbStoreProvider.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import akka.actor.ActorSystem import akka.stream.ActorMaterializer import spray.json.RootJsonFormat -import whisk.common.Logging -import whisk.core.ConfigKeys -import whisk.core.entity.DocumentReader -import whisk.core.entity.size._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.entity.DocumentReader +import org.apache.openwhisk.core.entity.size._ import pureconfig._ import scala.reflect.ClassTag diff --git a/common/scala/src/main/scala/whisk/core/database/DocumentFactory.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/DocumentFactory.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/DocumentFactory.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/DocumentFactory.scala index f05d39c0160..b32ec9ad2a5 100644 --- a/common/scala/src/main/scala/whisk/core/database/DocumentFactory.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/DocumentFactory.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.io.InputStream import java.io.OutputStream @@ -28,12 +28,12 @@ import akka.http.scaladsl.model.ContentType import akka.stream.IOResult import akka.stream.scaladsl.StreamConverters import spray.json.JsObject -import whisk.common.TransactionId -import whisk.core.entity.Attachments.Attached -import whisk.core.entity.CacheKey -import whisk.core.entity.DocId -import whisk.core.entity.DocInfo -import whisk.core.entity.DocRevision +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity.CacheKey +import org.apache.openwhisk.core.entity.DocId +import org.apache.openwhisk.core.entity.DocInfo +import org.apache.openwhisk.core.entity.DocRevision /** * An interface for modifying the revision number on a document. Hides the details of diff --git a/common/scala/src/main/scala/whisk/core/database/DocumentHandler.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/DocumentHandler.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/DocumentHandler.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/DocumentHandler.scala index e5a9709131d..00a875f95bd 100644 --- a/common/scala/src/main/scala/whisk/core/database/DocumentHandler.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/DocumentHandler.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.entity.{DocId, UserLimits} -import whisk.core.entity.EntityPath.PATHSEP -import whisk.utils.JsHelpers +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.{DocId, UserLimits} +import org.apache.openwhisk.core.entity.EntityPath.PATHSEP +import org.apache.openwhisk.utils.JsHelpers import scala.collection.immutable.Seq import scala.concurrent.Future diff --git a/common/scala/src/main/scala/whisk/core/database/MultipleReadersSingleWriterCache.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/MultipleReadersSingleWriterCache.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/MultipleReadersSingleWriterCache.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/MultipleReadersSingleWriterCache.scala index 0155e655f98..1b4e46c910b 100644 --- a/common/scala/src/main/scala/whisk/core/database/MultipleReadersSingleWriterCache.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/MultipleReadersSingleWriterCache.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicReference @@ -24,10 +24,10 @@ import scala.concurrent.{ExecutionContext, Future, Promise} import scala.util.Failure import scala.util.Success import com.github.benmanes.caffeine.cache.Caffeine -import whisk.common.Logging -import whisk.common.LoggingMarkers -import whisk.common.TransactionId -import whisk.core.entity.CacheKey +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.LoggingMarkers +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.CacheKey /** * A cache that allows multiple readers, but only a single writer, at diff --git a/common/scala/src/main/scala/whisk/core/database/RemoteCacheInvalidation.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala similarity index 81% rename from common/scala/src/main/scala/whisk/core/database/RemoteCacheInvalidation.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala index 1bfd5aaefdc..9fca79eb6a6 100644 --- a/common/scala/src/main/scala/whisk/core/database/RemoteCacheInvalidation.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.nio.charset.StandardCharsets @@ -28,19 +28,19 @@ import scala.util.Try import akka.actor.ActorSystem import akka.actor.Props import spray.json._ -import whisk.common.Logging -import whisk.core.WhiskConfig -import whisk.core.connector.Message -import whisk.core.connector.MessageFeed -import whisk.core.connector.MessagingProvider -import whisk.core.entity.CacheKey -import whisk.core.entity.ControllerInstanceId -import whisk.core.entity.WhiskAction -import whisk.core.entity.WhiskActionMetaData -import whisk.core.entity.WhiskPackage -import whisk.core.entity.WhiskRule -import whisk.core.entity.WhiskTrigger -import whisk.spi.SpiLoader +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.Message +import org.apache.openwhisk.core.connector.MessageFeed +import org.apache.openwhisk.core.connector.MessagingProvider +import org.apache.openwhisk.core.entity.CacheKey +import org.apache.openwhisk.core.entity.ControllerInstanceId +import org.apache.openwhisk.core.entity.WhiskAction +import org.apache.openwhisk.core.entity.WhiskActionMetaData +import org.apache.openwhisk.core.entity.WhiskPackage +import org.apache.openwhisk.core.entity.WhiskRule +import org.apache.openwhisk.core.entity.WhiskTrigger +import org.apache.openwhisk.spi.SpiLoader case class CacheInvalidationMessage(key: CacheKey, instanceId: String) extends Message { override def serialize = CacheInvalidationMessage.serdes.write(this).compactPrint diff --git a/common/scala/src/main/scala/whisk/core/database/StoreUtils.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/StoreUtils.scala similarity index 95% rename from common/scala/src/main/scala/whisk/core/database/StoreUtils.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/StoreUtils.scala index 21ac05aa0c8..2c168d4a971 100644 --- a/common/scala/src/main/scala/whisk/core/database/StoreUtils.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/StoreUtils.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.security.MessageDigest @@ -25,8 +25,8 @@ import akka.stream.scaladsl.{Broadcast, Flow, GraphDSL, Keep, Sink} import akka.util.ByteString import spray.json.DefaultJsonProtocol._ import spray.json.{JsObject, RootJsonFormat} -import whisk.common.{Logging, StartMarker, TransactionId} -import whisk.core.entity.{DocInfo, DocRevision, DocumentReader, WhiskDocument} +import org.apache.openwhisk.common.{Logging, StartMarker, TransactionId} +import org.apache.openwhisk.core.entity.{DocInfo, DocRevision, DocumentReader, WhiskDocument} import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStore.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStore.scala index a03dd8e43da..09e8351c6b1 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import java.io.ByteArrayInputStream @@ -28,14 +28,14 @@ import akka.util.{ByteString, ByteStringBuilder} import com.microsoft.azure.cosmosdb._ import com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient import spray.json.{DefaultJsonProtocol, JsObject, JsString, JsValue, RootJsonFormat, _} -import whisk.common.{LogMarkerToken, Logging, LoggingMarkers, MetricEmitter, TransactionId} -import whisk.core.database.StoreUtils.{checkDocHasRevision, deserialize, reportFailure} -import whisk.core.database._ -import whisk.core.database.cosmosdb.CosmosDBArtifactStoreProvider.DocumentClientRef -import whisk.core.database.cosmosdb.CosmosDBConstants._ -import whisk.core.entity.Attachments.Attached -import whisk.core.entity._ -import whisk.http.Messages +import org.apache.openwhisk.common.{LogMarkerToken, Logging, LoggingMarkers, MetricEmitter, TransactionId} +import org.apache.openwhisk.core.database.StoreUtils.{checkDocHasRevision, deserialize, reportFailure} +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.database.cosmosdb.CosmosDBArtifactStoreProvider.DocumentClientRef +import org.apache.openwhisk.core.database.cosmosdb.CosmosDBConstants._ +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.Messages import scala.collection.JavaConverters._ import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala similarity index 91% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala index 869baf01ac2..a93a6d047cc 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import java.io.Closeable @@ -23,13 +23,13 @@ import akka.actor.ActorSystem import akka.stream.ActorMaterializer import com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient import spray.json.RootJsonFormat -import whisk.common.Logging -import whisk.core.database._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.database._ import pureconfig._ -import whisk.core.entity.size._ -import whisk.core.ConfigKeys -import whisk.core.database.cosmosdb.CosmosDBUtil.createClient -import whisk.core.entity.{DocumentReader, WhiskActivation, WhiskAuth, WhiskEntity} +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.cosmosdb.CosmosDBUtil.createClient +import org.apache.openwhisk.core.entity.{DocumentReader, WhiskActivation, WhiskAuth, WhiskEntity} import scala.reflect.ClassTag diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBSupport.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBSupport.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBSupport.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBSupport.scala index f32fc8715bd..c5349115319 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBSupport.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBSupport.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb._ import com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBUtil.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBUtil.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBUtil.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBUtil.scala index 4fd01c5935b..a82e73def6e 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBUtil.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBUtil.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb._ import com.microsoft.azure.cosmosdb.internal.Constants.Properties.{AGGREGATE, E_TAG, ID, SELF_LINK} import com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient -import whisk.core.database.cosmosdb.CosmosDBConstants._ +import org.apache.openwhisk.core.database.cosmosdb.CosmosDBConstants._ import scala.collection.immutable.Iterable diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBViewMapper.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBViewMapper.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBViewMapper.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBViewMapper.scala index 3a5bd891413..47a2bb86281 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBViewMapper.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBViewMapper.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import java.util.Collections @@ -23,10 +23,10 @@ import com.microsoft.azure.cosmosdb.DataType.{Number, String} import com.microsoft.azure.cosmosdb.IndexKind.{Hash, Range} import com.microsoft.azure.cosmosdb.IndexingMode.Lazy import com.microsoft.azure.cosmosdb.{PartitionKeyDefinition, SqlParameter, SqlParameterCollection, SqlQuerySpec} -import whisk.core.database.ActivationHandler.NS_PATH -import whisk.core.database.WhisksHandler.ROOT_NS -import whisk.core.database.cosmosdb.CosmosDBConstants.{alias, computed} -import whisk.core.database.{ +import org.apache.openwhisk.core.database.ActivationHandler.NS_PATH +import org.apache.openwhisk.core.database.WhisksHandler.ROOT_NS +import org.apache.openwhisk.core.database.cosmosdb.CosmosDBConstants.{alias, computed} +import org.apache.openwhisk.core.database.{ ActivationHandler, DocumentHandler, SubjectHandler, @@ -34,7 +34,7 @@ import whisk.core.database.{ UnsupportedView, WhisksHandler } -import whisk.core.entity.WhiskEntityQueries.TOP +import org.apache.openwhisk.core.entity.WhiskEntityQueries.TOP private[cosmosdb] trait CosmosDBViewMapper { protected val NOTHING = "" diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/IndexingPolicy.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/IndexingPolicy.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/IndexingPolicy.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/IndexingPolicy.scala index 83c182ed7bd..c10dbfc5b3d 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/IndexingPolicy.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/IndexingPolicy.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb.{ DataType, diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/ReferenceCounted.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/ReferenceCounted.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/ReferenceCounted.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/ReferenceCounted.scala index 693cad373fd..1a4a741d19a 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/ReferenceCounted.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/ReferenceCounted.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import java.util.concurrent.atomic.{AtomicBoolean, AtomicInteger} diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/RxObservableImplicits.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/RxObservableImplicits.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/database/cosmosdb/RxObservableImplicits.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/RxObservableImplicits.scala index f9812760ef6..cf9e79c3e15 100644 --- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/RxObservableImplicits.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/RxObservableImplicits.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb.{FeedResponse, Resource, ResourceResponse} import rx.lang.scala.JavaConverters._ diff --git a/common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStore.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStore.scala index 39f94c87fd9..049bcbe0de0 100644 --- a/common/scala/src/main/scala/whisk/core/database/memory/MemoryArtifactStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.memory +package org.apache.openwhisk.core.database.memory import akka.actor.ActorSystem import akka.http.scaladsl.model.{ContentType, Uri} @@ -24,14 +24,14 @@ import akka.stream.scaladsl.{Sink, Source} import akka.util.ByteString import pureconfig.loadConfigOrThrow import spray.json.{DefaultJsonProtocol, DeserializationException, JsObject, JsString, RootJsonFormat} -import whisk.common.{Logging, LoggingMarkers, TransactionId} -import whisk.core.ConfigKeys -import whisk.core.database.StoreUtils._ -import whisk.core.database._ -import whisk.core.entity.Attachments.Attached -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.common.{Logging, LoggingMarkers, TransactionId} +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.StoreUtils._ +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages import scala.collection.concurrent.TrieMap import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/database/memory/MemoryAttachmentStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryAttachmentStore.scala similarity index 93% rename from common/scala/src/main/scala/whisk/core/database/memory/MemoryAttachmentStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryAttachmentStore.scala index cb80c24cef4..2d7d934ead6 100644 --- a/common/scala/src/main/scala/whisk/core/database/memory/MemoryAttachmentStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryAttachmentStore.scala @@ -15,18 +15,23 @@ * limitations under the License. */ -package whisk.core.database.memory +package org.apache.openwhisk.core.database.memory import akka.actor.ActorSystem import akka.http.scaladsl.model.ContentType import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Keep, Sink, Source} import akka.util.{ByteString, ByteStringBuilder} -import whisk.common.LoggingMarkers.{DATABASE_ATTS_DELETE, DATABASE_ATT_DELETE, DATABASE_ATT_GET, DATABASE_ATT_SAVE} -import whisk.common.{Logging, TransactionId} -import whisk.core.database.StoreUtils._ -import whisk.core.database._ -import whisk.core.entity.DocId +import org.apache.openwhisk.common.LoggingMarkers.{ + DATABASE_ATTS_DELETE, + DATABASE_ATT_DELETE, + DATABASE_ATT_GET, + DATABASE_ATT_SAVE +} +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.database.StoreUtils._ +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entity.DocId import scala.collection.concurrent.TrieMap import scala.concurrent.{ExecutionContext, Future} diff --git a/common/scala/src/main/scala/whisk/core/database/memory/MemoryViewMapper.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryViewMapper.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/database/memory/MemoryViewMapper.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryViewMapper.scala index c6dcbbe35b3..bf2b9512b29 100644 --- a/common/scala/src/main/scala/whisk/core/database/memory/MemoryViewMapper.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/memory/MemoryViewMapper.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database.memory +package org.apache.openwhisk.core.database.memory import spray.json.{JsArray, JsBoolean, JsNumber, JsObject, JsString, JsTrue} -import whisk.core.database.{ActivationHandler, UnsupportedQueryKeys, UnsupportedView, WhisksHandler} -import whisk.core.entity.{UserLimits, WhiskEntityQueries} -import whisk.utils.JsHelpers +import org.apache.openwhisk.core.database.{ActivationHandler, UnsupportedQueryKeys, UnsupportedView, WhisksHandler} +import org.apache.openwhisk.core.entity.{UserLimits, WhiskEntityQueries} +import org.apache.openwhisk.utils.JsHelpers /** * Maps the CouchDB view logic to expressed in javascript to Scala logic so as to enable diff --git a/common/scala/src/main/scala/whisk/core/database/s3/S3AttachmentStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStore.scala similarity index 94% rename from common/scala/src/main/scala/whisk/core/database/s3/S3AttachmentStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStore.scala index df9056e2845..bc786b4bd32 100644 --- a/common/scala/src/main/scala/whisk/core/database/s3/S3AttachmentStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import akka.actor.ActorSystem import akka.http.scaladsl.model.ContentType @@ -26,12 +26,17 @@ import akka.stream.scaladsl.{Sink, Source} import akka.util.ByteString import com.typesafe.config.Config import pureconfig.loadConfigOrThrow -import whisk.common.LoggingMarkers.{DATABASE_ATTS_DELETE, DATABASE_ATT_DELETE, DATABASE_ATT_GET, DATABASE_ATT_SAVE} -import whisk.common.{Logging, TransactionId} -import whisk.core.ConfigKeys -import whisk.core.database.StoreUtils._ -import whisk.core.database._ -import whisk.core.entity.DocId +import org.apache.openwhisk.common.LoggingMarkers.{ + DATABASE_ATTS_DELETE, + DATABASE_ATT_DELETE, + DATABASE_ATT_GET, + DATABASE_ATT_SAVE +} +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.StoreUtils._ +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entity.DocId import scala.concurrent.{ExecutionContext, Future} import scala.reflect.ClassTag diff --git a/common/scala/src/main/scala/whisk/core/entitlement/Privilege.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entitlement/Privilege.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entitlement/Privilege.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entitlement/Privilege.scala index 30ab86ad0d7..9b25f64eb08 100644 --- a/common/scala/src/main/scala/whisk/core/entitlement/Privilege.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entitlement/Privilege.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/entity/ActivationEntityLimit.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationEntityLimit.scala similarity index 92% rename from common/scala/src/main/scala/whisk/core/entity/ActivationEntityLimit.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationEntityLimit.scala index 6ac2a474a46..89b24d030aa 100644 --- a/common/scala/src/main/scala/whisk/core/entity/ActivationEntityLimit.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationEntityLimit.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import pureconfig._ -import whisk.core.ConfigKeys -import whisk.core.entity.size.SizeLong +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.entity.size.SizeLong case class ActivationEntityPayload(max: ByteSize) case class ActivationEntityLimitConf(serdesOverhead: ByteSize, payload: ActivationEntityPayload) diff --git a/common/scala/src/main/scala/whisk/core/entity/ActivationId.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationId.scala similarity index 93% rename from common/scala/src/main/scala/whisk/core/entity/ActivationId.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationId.scala index c6b983cfc08..a5546b055b0 100644 --- a/common/scala/src/main/scala/whisk/core/entity/ActivationId.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationId.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json.DefaultJsonProtocol.StringJsonFormat import spray.json._ -import whisk.http.Messages +import org.apache.openwhisk.http.Messages -import whisk.core.entity.size._ +import org.apache.openwhisk.core.entity.size._ import scala.util.{Failure, Success, Try} @@ -35,7 +35,7 @@ import scala.util.{Failure, Success, Try} * * @param asString the activation id */ -protected[whisk] case class ActivationId private (val asString: String) extends AnyVal { +protected[openwhisk] case class ActivationId private (val asString: String) extends AnyVal { override def toString: String = asString def toJsObject: JsObject = JsObject("activationId" -> asString.toJson) } diff --git a/common/scala/src/main/scala/whisk/core/entity/ActivationLogs.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationLogs.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entity/ActivationLogs.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationLogs.scala index bc0b6d18655..1c1085a7db3 100644 --- a/common/scala/src/main/scala/whisk/core/entity/ActivationLogs.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationLogs.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json._ import spray.json.DefaultJsonProtocol._ diff --git a/common/scala/src/main/scala/whisk/core/entity/ActivationResult.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationResult.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/ActivationResult.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationResult.scala index 3448ced14f1..c7764cd386a 100644 --- a/common/scala/src/main/scala/whisk/core/entity/ActivationResult.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ActivationResult.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.Try @@ -24,8 +24,8 @@ import akka.http.scaladsl.model.StatusCodes.OK import spray.json._ import spray.json.DefaultJsonProtocol -import whisk.common.Logging -import whisk.http.Messages._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.http.Messages._ protected[core] case class ActivationResponse private (val statusCode: Int, val result: Option[JsValue]) { diff --git a/common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ArgNormalizer.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/ArgNormalizer.scala index 3b1894c971e..2064e4ab83d 100644 --- a/common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ArgNormalizer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json._ import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/entity/Attachments.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Attachments.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entity/Attachments.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Attachments.scala index dc2c837456b..46f194972fa 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Attachments.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Attachments.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import akka.http.scaladsl.model.ContentType import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.entity.size._ +import org.apache.openwhisk.core.entity.size._ import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/entity/BasicAuthenticationAuthKey.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/BasicAuthenticationAuthKey.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/BasicAuthenticationAuthKey.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/BasicAuthenticationAuthKey.scala index 7007711fddc..5bcd839294f 100644 --- a/common/scala/src/main/scala/whisk/core/entity/BasicAuthenticationAuthKey.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/BasicAuthenticationAuthKey.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import akka.http.scaladsl.model.headers.{BasicHttpCredentials, HttpCredentials} import spray.json._ diff --git a/common/scala/src/main/scala/whisk/core/entity/CacheKey.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/CacheKey.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/CacheKey.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/CacheKey.scala index bc60a644927..9933158cc2e 100644 --- a/common/scala/src/main/scala/whisk/core/entity/CacheKey.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/CacheKey.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json.DefaultJsonProtocol diff --git a/common/scala/src/main/scala/whisk/core/entity/DocInfo.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocInfo.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/DocInfo.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocInfo.scala index 68b89c506f8..ed067fc0110 100644 --- a/common/scala/src/main/scala/whisk/core/entity/DocInfo.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocInfo.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.Try @@ -26,7 +26,7 @@ import spray.json.JsValue import spray.json.RootJsonFormat import spray.json.deserializationError -import whisk.core.entity.ArgNormalizer.trim +import org.apache.openwhisk.core.entity.ArgNormalizer.trim /** * A DocId is the document id === primary key in the datastore. diff --git a/common/scala/src/main/scala/whisk/core/entity/DocumentReader.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocumentReader.scala similarity index 95% rename from common/scala/src/main/scala/whisk/core/entity/DocumentReader.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocumentReader.scala index ec53cf783ff..f3ab3521671 100644 --- a/common/scala/src/main/scala/whisk/core/entity/DocumentReader.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocumentReader.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json._ diff --git a/common/scala/src/main/scala/whisk/core/entity/EntityPath.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/EntityPath.scala similarity index 99% rename from common/scala/src/main/scala/whisk/core/entity/EntityPath.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/EntityPath.scala index 5bedddda94b..b52b4dff3b3 100644 --- a/common/scala/src/main/scala/whisk/core/entity/EntityPath.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/EntityPath.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.util.regex.Matcher @@ -25,7 +25,7 @@ import spray.json.JsString import spray.json.JsValue import spray.json.RootJsonFormat import spray.json.deserializationError -import whisk.http.Messages +import org.apache.openwhisk.http.Messages /** * EntityPath is a path string of allowed characters. The path consists of parts each of which diff --git a/common/scala/src/main/scala/whisk/core/entity/Exec.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/Exec.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala index 8e5d8f62136..c5b13c1afa5 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Exec.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.nio.charset.StandardCharsets @@ -24,10 +24,10 @@ import scala.util.matching.Regex import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.entity.Attachments._ -import whisk.core.entity.ExecManifest._ -import whisk.core.entity.size.SizeInt -import whisk.core.entity.size.SizeString +import org.apache.openwhisk.core.entity.Attachments._ +import org.apache.openwhisk.core.entity.ExecManifest._ +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.entity.size.SizeString /** * Exec encodes the executable details of an action. For black diff --git a/common/scala/src/main/scala/whisk/core/entity/ExecManifest.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/ExecManifest.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala index 8c7ea84ecba..33439c5b28b 100644 --- a/common/scala/src/main/scala/whisk/core/entity/ExecManifest.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala @@ -15,16 +15,16 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import pureconfig.loadConfigOrThrow import scala.util.{Failure, Success, Try} import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.{ConfigKeys, WhiskConfig} -import whisk.core.entity.Attachments._ -import whisk.core.entity.Attachments.Attached._ +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.core.entity.Attachments._ +import org.apache.openwhisk.core.entity.Attachments.Attached._ import fastparse.all._ /** @@ -342,7 +342,7 @@ protected[core] object ExecManifest { protected[entity] implicit val imageNameSerdes = jsonFormat3(ImageName.apply) protected[entity] implicit val stemCellSerdes = { - import whisk.core.entity.size.serdes + import org.apache.openwhisk.core.entity.size.serdes jsonFormat2(StemCell.apply) } diff --git a/common/scala/src/main/scala/whisk/core/entity/FullyQualifiedEntityName.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/FullyQualifiedEntityName.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/FullyQualifiedEntityName.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/FullyQualifiedEntityName.scala index 009e882ea01..061f02d0ccb 100644 --- a/common/scala/src/main/scala/whisk/core/entity/FullyQualifiedEntityName.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/FullyQualifiedEntityName.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.Failure import scala.util.Success import scala.util.Try import spray.json._ -import whisk.core.entity.size.SizeString +import org.apache.openwhisk.core.entity.size.SizeString /** * A FullyQualifiedEntityName (qualified name) is a triple consisting of diff --git a/common/scala/src/main/scala/whisk/core/entity/GenericAuthKey.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/GenericAuthKey.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entity/GenericAuthKey.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/GenericAuthKey.scala index 5db744f8330..cf6849a55ee 100644 --- a/common/scala/src/main/scala/whisk/core/entity/GenericAuthKey.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/GenericAuthKey.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import akka.http.scaladsl.model.headers.HttpCredentials import spray.json._ diff --git a/common/scala/src/main/scala/whisk/core/entity/Identity.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala similarity index 92% rename from common/scala/src/main/scala/whisk/core/entity/Identity.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala index 0f97d5ed009..7f3d0fd32ae 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Identity.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala @@ -15,19 +15,19 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.concurrent.Future import scala.util.Try import spray.json._ import types.AuthStore -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.database.MultipleReadersSingleWriterCache -import whisk.core.database.NoDocumentException -import whisk.core.database.StaleParameter -import whisk.core.database.WriteTime -import whisk.core.entitlement.Privilege +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.MultipleReadersSingleWriterCache +import org.apache.openwhisk.core.database.NoDocumentException +import org.apache.openwhisk.core.database.StaleParameter +import org.apache.openwhisk.core.database.WriteTime +import org.apache.openwhisk.core.entitlement.Privilege case class UserLimits(invocationsPerMinute: Option[Int] = None, concurrentInvocations: Option[Int] = None, diff --git a/common/scala/src/main/scala/whisk/core/entity/InstanceId.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/InstanceId.scala similarity index 90% rename from common/scala/src/main/scala/whisk/core/entity/InstanceId.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/InstanceId.scala index 0d477b44f4c..0580dc5366a 100644 --- a/common/scala/src/main/scala/whisk/core/entity/InstanceId.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/InstanceId.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json.DefaultJsonProtocol -import whisk.core.entity.ControllerInstanceId.LEGAL_CHARS -import whisk.core.entity.ControllerInstanceId.MAX_NAME_LENGTH +import org.apache.openwhisk.core.entity.ControllerInstanceId.LEGAL_CHARS +import org.apache.openwhisk.core.entity.ControllerInstanceId.MAX_NAME_LENGTH /** * An instance id representing an invoker @@ -44,7 +44,7 @@ case class ControllerInstanceId(val asString: String) { } object InvokerInstanceId extends DefaultJsonProtocol { - import whisk.core.entity.size.{serdes => xserds} + import org.apache.openwhisk.core.entity.size.{serdes => xserds} implicit val serdes = jsonFormat4(InvokerInstanceId.apply) } diff --git a/common/scala/src/main/scala/whisk/core/entity/Limits.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Limits.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/Limits.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Limits.scala index 0e775e49940..d4b451f6f85 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Limits.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Limits.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.Try import spray.json.JsValue diff --git a/common/scala/src/main/scala/whisk/core/entity/LogLimit.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/LogLimit.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/entity/LogLimit.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/LogLimit.scala index a78931e14b9..be4b54c081f 100644 --- a/common/scala/src/main/scala/whisk/core/entity/LogLimit.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/LogLimit.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import pureconfig.loadConfigOrThrow @@ -24,8 +24,8 @@ import scala.util.Failure import scala.util.Success import scala.util.Try import spray.json._ -import whisk.core.ConfigKeys -import whisk.core.entity.size._ +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.entity.size._ case class LogLimitConfig(min: ByteSize, max: ByteSize, std: ByteSize) diff --git a/common/scala/src/main/scala/whisk/core/entity/MemoryLimit.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/MemoryLimit.scala similarity index 96% rename from common/scala/src/main/scala/whisk/core/entity/MemoryLimit.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/MemoryLimit.scala index 80cc9f88b2f..928a31b57ed 100644 --- a/common/scala/src/main/scala/whisk/core/entity/MemoryLimit.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/MemoryLimit.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.language.postfixOps import scala.util.Failure @@ -23,8 +23,8 @@ import scala.util.Success import scala.util.Try import spray.json._ -import whisk.core.entity.size._ -import whisk.core.ConfigKeys +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.ConfigKeys import pureconfig._ case class MemoryLimitConfig(min: ByteSize, max: ByteSize, std: ByteSize) diff --git a/common/scala/src/main/scala/whisk/core/entity/Parameter.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Parameter.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/Parameter.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Parameter.scala index 0da679b1d6d..2fe63d2ead4 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Parameter.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Parameter.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.{Failure, Success, Try} import spray.json.DefaultJsonProtocol._ import spray.json._ import scala.language.postfixOps -import whisk.core.entity.size.SizeInt -import whisk.core.entity.size.SizeString +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.entity.size.SizeString /** * Parameters is a key-value map from parameter names to parameter values. The value of a diff --git a/common/scala/src/main/scala/whisk/core/entity/Secret.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Secret.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/Secret.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Secret.scala index aac4e7f7e80..15107d61777 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Secret.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Secret.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json._ import spray.json.DefaultJsonProtocol._ diff --git a/common/scala/src/main/scala/whisk/core/entity/SemVer.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/SemVer.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/SemVer.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/SemVer.scala index 6038bd012c6..d9c5efd3034 100644 --- a/common/scala/src/main/scala/whisk/core/entity/SemVer.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/SemVer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json.deserializationError import spray.json.JsString diff --git a/common/scala/src/main/scala/whisk/core/entity/Size.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Size.scala similarity index 99% rename from common/scala/src/main/scala/whisk/core/entity/Size.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Size.scala index 9af41283502..0ce80305d7b 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Size.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Size.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.nio.charset.StandardCharsets diff --git a/common/scala/src/main/scala/whisk/core/entity/Subject.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Subject.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/Subject.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/Subject.scala index df6bcf9fbfc..bd68574aa73 100644 --- a/common/scala/src/main/scala/whisk/core/entity/Subject.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Subject.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/entity/TimeLimit.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/TimeLimit.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entity/TimeLimit.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/TimeLimit.scala index 77b42b46b90..59a643ae96b 100644 --- a/common/scala/src/main/scala/whisk/core/entity/TimeLimit.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/TimeLimit.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import pureconfig._ @@ -27,7 +27,7 @@ import spray.json.JsNumber import spray.json.JsValue import spray.json.RootJsonFormat import spray.json.deserializationError -import whisk.core.ConfigKeys +import org.apache.openwhisk.core.ConfigKeys /** * TimeLimit encapsulates a duration for an action. The duration must be within a diff --git a/common/scala/src/main/scala/whisk/core/entity/UUID.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/UUID.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/UUID.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/UUID.scala index cce8e29ff92..9f7df66ff90 100644 --- a/common/scala/src/main/scala/whisk/core/entity/UUID.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/UUID.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.security.SecureRandom diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAction.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAction.scala index 55e02a777f0..e122e83a1d4 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAction.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import java.nio.charset.StandardCharsets.UTF_8 @@ -28,12 +28,12 @@ import scala.concurrent.Future import scala.util.{Failure, Success, Try} import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.database.ArtifactStore -import whisk.core.database.DocumentFactory -import whisk.core.database.CacheChangeNotification -import whisk.core.entity.Attachments._ -import whisk.core.entity.types.EntityStore +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.ArtifactStore +import org.apache.openwhisk.core.database.DocumentFactory +import org.apache.openwhisk.core.database.CacheChangeNotification +import org.apache.openwhisk.core.entity.Attachments._ +import org.apache.openwhisk.core.entity.types.EntityStore /** * ActionLimitsOption mirrors ActionLimits but makes both the timeout and memory diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskActivation.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala similarity index 97% rename from common/scala/src/main/scala/whisk/core/entity/WhiskActivation.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala index 899147c0594..59c892a0f8a 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskActivation.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.time.Instant @@ -23,9 +23,9 @@ import scala.concurrent.Future import scala.util.Try import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.ConfigKeys -import whisk.core.database.{ArtifactStore, CacheChangeNotification, DocumentFactory, StaleParameter} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.{ArtifactStore, CacheChangeNotification, DocumentFactory, StaleParameter} import pureconfig._ /** diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskAuth.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAuth.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/WhiskAuth.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAuth.scala index 56d6d34ba7e..fce67dd6bfb 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskAuth.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAuth.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json._ import scala.util.Try diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskEntity.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskEntity.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/WhiskEntity.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskEntity.scala index 0f1e5e1b9a1..952359d3a14 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskEntity.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskEntity.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.time.Clock import java.time.Instant @@ -24,8 +24,8 @@ import scala.Stream import scala.util.Try import spray.json._ -import whisk.core.database.DocumentUnreadable -import whisk.http.Messages +import org.apache.openwhisk.core.database.DocumentUnreadable +import org.apache.openwhisk.http.Messages /** * An abstract superclass that encapsulates properties common to all whisk entities (actions, rules, triggers). diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskPackage.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskPackage.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/WhiskPackage.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskPackage.scala index e83e8e5d1e0..984f184bb94 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskPackage.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskPackage.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.concurrent.ExecutionContext import scala.concurrent.Future @@ -25,9 +25,9 @@ import scala.util.Try import spray.json.DefaultJsonProtocol import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.TransactionId -import whisk.core.database.DocumentFactory -import whisk.core.entity.types.EntityStore +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.DocumentFactory +import org.apache.openwhisk.core.entity.types.EntityStore /** * WhiskPackagePut is a restricted WhiskPackage view that eschews properties diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskRule.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskRule.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/WhiskRule.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskRule.scala index b064e324f02..6a7e929bcf5 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskRule.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskRule.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import scala.util.Failure import scala.util.Success @@ -28,7 +28,7 @@ import spray.json.JsString import spray.json.JsValue import spray.json.RootJsonFormat import spray.json.deserializationError -import whisk.core.database.DocumentFactory +import org.apache.openwhisk.core.database.DocumentFactory /** * WhiskRulePut is a restricted WhiskRule view that eschews properties diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskStore.scala similarity index 93% rename from common/scala/src/main/scala/whisk/core/entity/WhiskStore.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskStore.scala index 90e9070931f..03231224ee7 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskStore.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import java.time.Instant @@ -28,15 +28,15 @@ import spray.json.JsNumber import spray.json.JsObject import spray.json.JsString import spray.json.RootJsonFormat -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.ConfigKeys -import whisk.core.database.ArtifactStore -import whisk.core.database.ArtifactStoreProvider -import whisk.core.database.DocumentRevisionProvider -import whisk.core.database.DocumentSerializer -import whisk.core.database.StaleParameter -import whisk.spi.SpiLoader +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.ArtifactStore +import org.apache.openwhisk.core.database.ArtifactStoreProvider +import org.apache.openwhisk.core.database.DocumentRevisionProvider +import org.apache.openwhisk.core.database.DocumentSerializer +import org.apache.openwhisk.core.database.StaleParameter +import org.apache.openwhisk.spi.SpiLoader import pureconfig._ import scala.reflect.classTag diff --git a/common/scala/src/main/scala/whisk/core/entity/WhiskTrigger.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskTrigger.scala similarity index 98% rename from common/scala/src/main/scala/whisk/core/entity/WhiskTrigger.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskTrigger.scala index 7883c701cb9..d6668a9cb92 100644 --- a/common/scala/src/main/scala/whisk/core/entity/WhiskTrigger.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskTrigger.scala @@ -15,10 +15,10 @@ * limitations under the License. */ -package whisk.core.entity +package org.apache.openwhisk.core.entity import spray.json.DefaultJsonProtocol -import whisk.core.database.DocumentFactory +import org.apache.openwhisk.core.database.DocumentFactory import spray.json._ /** diff --git a/common/scala/src/main/scala/whisk/core/mesos/MesosContainerFactory.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala similarity index 92% rename from common/scala/src/main/scala/whisk/core/mesos/MesosContainerFactory.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala index 820718b2b64..3120aa9c7aa 100644 --- a/common/scala/src/main/scala/whisk/core/mesos/MesosContainerFactory.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.mesos +package org.apache.openwhisk.core.mesos import akka.actor.ActorRef import akka.actor.ActorSystem @@ -36,19 +36,19 @@ import scala.concurrent.Future import scala.concurrent.TimeoutException import scala.concurrent.duration._ import scala.util.Try -import whisk.common.Counter -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.ConfigKeys -import whisk.core.WhiskConfig -import whisk.core.containerpool.Container -import whisk.core.containerpool.ContainerArgsConfig -import whisk.core.containerpool.ContainerFactory -import whisk.core.containerpool.ContainerFactoryProvider -import whisk.core.entity.ByteSize -import whisk.core.entity.ExecManifest -import whisk.core.entity.InvokerInstanceId -import whisk.core.entity.UUID +import org.apache.openwhisk.common.Counter +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.containerpool.ContainerArgsConfig +import org.apache.openwhisk.core.containerpool.ContainerFactory +import org.apache.openwhisk.core.containerpool.ContainerFactoryProvider +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.ExecManifest +import org.apache.openwhisk.core.entity.InvokerInstanceId +import org.apache.openwhisk.core.entity.UUID /** * Configuration for mesos timeouts diff --git a/common/scala/src/main/scala/whisk/core/mesos/MesosTask.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosTask.scala similarity index 93% rename from common/scala/src/main/scala/whisk/core/mesos/MesosTask.scala rename to common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosTask.scala index b28979c46ec..b78e33fc49b 100644 --- a/common/scala/src/main/scala/whisk/core/mesos/MesosTask.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosTask.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.mesos +package org.apache.openwhisk.core.mesos import akka.actor.ActorRef import akka.actor.ActorSystem @@ -44,16 +44,16 @@ import scala.concurrent.Future import scala.util.Failure import scala.util.Success import spray.json._ -import whisk.common.Logging -import whisk.common.LoggingMarkers -import whisk.common.MetricEmitter -import whisk.common.TransactionId -import whisk.core.containerpool.Container -import whisk.core.containerpool.ContainerAddress -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.logging.LogLine -import whisk.core.entity.ByteSize -import whisk.core.entity.size._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.LoggingMarkers +import org.apache.openwhisk.common.MetricEmitter +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.logging.LogLine +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size._ /** * MesosTask implementation of Container. @@ -217,7 +217,7 @@ class MesosTask(override protected val id: ContainerId, * Obtains logs up to a given threshold from the container. Optionally waits for a sentinel to appear. * For Mesos, this log message is static per container, just indicating that Mesos logs can be found via the Mesos UI. * To disable this message, and just store an static log message per activation, set - * whisk.mesos.mesosLinkLogMessage=false + * org.apache.openwhisk.mesos.mesosLinkLogMessage=false */ private val linkedLogMsg = s"Logs are not collected from Mesos containers currently. " + diff --git a/common/scala/src/main/scala/whisk/http/BasicHttpService.scala b/common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala similarity index 98% rename from common/scala/src/main/scala/whisk/http/BasicHttpService.scala rename to common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala index 9fa2c76e91f..d82591ab11f 100644 --- a/common/scala/src/main/scala/whisk/http/BasicHttpService.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/http/BasicHttpService.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.http +package org.apache.openwhisk.http import java.util.concurrent.ThreadLocalRandom @@ -28,8 +28,8 @@ import akka.http.scaladsl.server._ import akka.http.scaladsl.server.directives._ import akka.stream.ActorMaterializer import spray.json._ -import whisk.common.Https.HttpsConfig -import whisk.common._ +import org.apache.openwhisk.common.Https.HttpsConfig +import org.apache.openwhisk.common._ import scala.collection.immutable.Seq import scala.concurrent.duration.DurationInt diff --git a/common/scala/src/main/scala/whisk/http/BasicRasService.scala b/common/scala/src/main/scala/org/apache/openwhisk/http/BasicRasService.scala similarity index 91% rename from common/scala/src/main/scala/whisk/http/BasicRasService.scala rename to common/scala/src/main/scala/org/apache/openwhisk/http/BasicRasService.scala index cb1e017b807..2ce26d06c74 100644 --- a/common/scala/src/main/scala/whisk/http/BasicRasService.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/http/BasicRasService.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.http +package org.apache.openwhisk.http import akka.event.Logging -import whisk.common.Logging -import whisk.common.TransactionId +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId /** * This trait extends the BasicHttpService with a standard "ping" endpoint which diff --git a/common/scala/src/main/scala/whisk/http/ErrorResponse.scala b/common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala similarity index 97% rename from common/scala/src/main/scala/whisk/http/ErrorResponse.scala rename to common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala index 010979e014d..b14d338e127 100644 --- a/common/scala/src/main/scala/whisk/http/ErrorResponse.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.http +package org.apache.openwhisk.http import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration @@ -31,12 +31,12 @@ import akka.http.scaladsl.server.StandardRoute import spray.json._ -import whisk.common.TransactionId -import whisk.core.entity.SizeError -import whisk.core.entity.ByteSize -import whisk.core.entity.Exec -import whisk.core.entity.ExecMetaDataBase -import whisk.core.entity.ActivationId +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.SizeError +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.Exec +import org.apache.openwhisk.core.entity.ExecMetaDataBase +import org.apache.openwhisk.core.entity.ActivationId object Messages { diff --git a/common/scala/src/main/scala/whisk/http/LenientSprayJsonSupport.scala b/common/scala/src/main/scala/org/apache/openwhisk/http/LenientSprayJsonSupport.scala similarity index 97% rename from common/scala/src/main/scala/whisk/http/LenientSprayJsonSupport.scala rename to common/scala/src/main/scala/org/apache/openwhisk/http/LenientSprayJsonSupport.scala index 596058b5599..22b952e5df6 100644 --- a/common/scala/src/main/scala/whisk/http/LenientSprayJsonSupport.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/http/LenientSprayJsonSupport.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.http +package org.apache.openwhisk.http import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller} diff --git a/common/scala/src/main/scala/whisk/http/PoolingRestClient.scala b/common/scala/src/main/scala/org/apache/openwhisk/http/PoolingRestClient.scala similarity index 99% rename from common/scala/src/main/scala/whisk/http/PoolingRestClient.scala rename to common/scala/src/main/scala/org/apache/openwhisk/http/PoolingRestClient.scala index 146592e5be2..3c8a2d37eb7 100644 --- a/common/scala/src/main/scala/whisk/http/PoolingRestClient.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/http/PoolingRestClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.http +package org.apache.openwhisk.http import akka.actor.ActorSystem import akka.http.scaladsl.Http diff --git a/common/scala/src/main/scala/whisk/spi/SpiLoader.scala b/common/scala/src/main/scala/org/apache/openwhisk/spi/SpiLoader.scala similarity index 98% rename from common/scala/src/main/scala/whisk/spi/SpiLoader.scala rename to common/scala/src/main/scala/org/apache/openwhisk/spi/SpiLoader.scala index 6aa0f6e884f..9c4244ddeba 100644 --- a/common/scala/src/main/scala/whisk/spi/SpiLoader.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/spi/SpiLoader.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.spi +package org.apache.openwhisk.spi import com.typesafe.config.ConfigFactory diff --git a/common/scala/src/main/scala/whisk/utils/Exceptions.scala b/common/scala/src/main/scala/org/apache/openwhisk/utils/Exceptions.scala similarity index 95% rename from common/scala/src/main/scala/whisk/utils/Exceptions.scala rename to common/scala/src/main/scala/org/apache/openwhisk/utils/Exceptions.scala index f56f5fbcbdd..ab9f04c27e5 100644 --- a/common/scala/src/main/scala/whisk/utils/Exceptions.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/utils/Exceptions.scala @@ -15,9 +15,9 @@ * limitations under the License. */ -package whisk.utils +package org.apache.openwhisk.utils -import whisk.common.Logging +import org.apache.openwhisk.common.Logging import scala.util.control.NonFatal diff --git a/common/scala/src/main/scala/whisk/utils/ExecutionContextFactory.scala b/common/scala/src/main/scala/org/apache/openwhisk/utils/ExecutionContextFactory.scala similarity index 99% rename from common/scala/src/main/scala/whisk/utils/ExecutionContextFactory.scala rename to common/scala/src/main/scala/org/apache/openwhisk/utils/ExecutionContextFactory.scala index ea025cbf325..0604a46b147 100644 --- a/common/scala/src/main/scala/whisk/utils/ExecutionContextFactory.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/utils/ExecutionContextFactory.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.utils +package org.apache.openwhisk.utils import java.util.concurrent.Executors diff --git a/common/scala/src/main/scala/whisk/utils/JsHelpers.scala b/common/scala/src/main/scala/org/apache/openwhisk/utils/JsHelpers.scala similarity index 97% rename from common/scala/src/main/scala/whisk/utils/JsHelpers.scala rename to common/scala/src/main/scala/org/apache/openwhisk/utils/JsHelpers.scala index 89f8b1b9a78..e4a5401d754 100644 --- a/common/scala/src/main/scala/whisk/utils/JsHelpers.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/utils/JsHelpers.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.utils +package org.apache.openwhisk.utils import spray.json.JsObject import spray.json.JsValue diff --git a/common/scala/src/main/scala/whisk/utils/Retry.scala b/common/scala/src/main/scala/org/apache/openwhisk/utils/Retry.scala similarity index 98% rename from common/scala/src/main/scala/whisk/utils/Retry.scala rename to common/scala/src/main/scala/org/apache/openwhisk/utils/Retry.scala index 2931e719437..44ebd4cc404 100644 --- a/common/scala/src/main/scala/whisk/utils/Retry.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/utils/Retry.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.utils +package org.apache.openwhisk.utils import scala.concurrent.duration._ diff --git a/common/scala/src/main/scala/whisk/utils/TimeHelpers.scala b/common/scala/src/main/scala/org/apache/openwhisk/utils/TimeHelpers.scala similarity index 97% rename from common/scala/src/main/scala/whisk/utils/TimeHelpers.scala rename to common/scala/src/main/scala/org/apache/openwhisk/utils/TimeHelpers.scala index ff3df51202b..0c5ae03f04c 100644 --- a/common/scala/src/main/scala/whisk/utils/TimeHelpers.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/utils/TimeHelpers.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.utils +package org.apache.openwhisk.utils import java.time.{Duration => JDuration} diff --git a/core/controller/build.gradle b/core/controller/build.gradle index 4ce950f1f9f..243c77609ac 100644 --- a/core/controller/build.gradle +++ b/core/controller/build.gradle @@ -50,5 +50,5 @@ tasks.withType(ScalaCompile) { scalaCompileOptions.additionalParameters = gradle.scala.compileFlags } -mainClassName = "whisk.core.controller.Controller" +mainClassName = "org.apache.openwhisk.core.controller.Controller" applicationDefaultJvmArgs = ["-Djava.security.egd=file:/dev/./urandom"] diff --git a/core/controller/src/main/scala/whisk/core/controller/Actions.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala similarity index 97% rename from core/controller/src/main/scala/whisk/core/controller/Actions.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala index 8828241ab76..31cf5f5be41 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Actions.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import scala.concurrent.Future import scala.concurrent.duration._ @@ -32,20 +32,20 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport.sprayJsonMarsha import akka.http.scaladsl.unmarshalling._ import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.controller.RestApiCommons.{ListLimit, ListSkip} -import whisk.core.controller.actions.PostActionActivation -import whisk.core.database.{ActivationStore, CacheChangeNotification, NoDocumentException} -import whisk.core.entitlement._ -import whisk.core.entity._ -import whisk.core.entity.types.EntityStore -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages -import whisk.http.Messages._ -import whisk.core.entitlement.Resource -import whisk.core.entitlement.Collection -import whisk.core.loadBalancer.LoadBalancerException +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.controller.RestApiCommons.{ListLimit, ListSkip} +import org.apache.openwhisk.core.controller.actions.PostActionActivation +import org.apache.openwhisk.core.database.{ActivationStore, CacheChangeNotification, NoDocumentException} +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.EntityStore +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.http.Messages._ +import org.apache.openwhisk.core.entitlement.Resource +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.loadBalancer.LoadBalancerException /** * A singleton object which defines the properties that must be present in a configuration diff --git a/core/controller/src/main/scala/whisk/core/controller/Activations.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Activations.scala similarity index 93% rename from core/controller/src/main/scala/whisk/core/controller/Activations.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Activations.scala index 82ec0624e2d..5e8f0ab1a30 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Activations.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Activations.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import java.time.Instant @@ -27,16 +27,16 @@ import akka.http.scaladsl.model.StatusCodes.BadRequest import akka.http.scaladsl.server.Directives import akka.http.scaladsl.unmarshalling._ import spray.json.DefaultJsonProtocol.RootJsObjectFormat -import whisk.common.TransactionId -import whisk.core.containerpool.logging.LogStore -import whisk.core.controller.RestApiCommons.{ListLimit, ListSkip} -import whisk.core.database.ActivationStore -import whisk.core.entitlement.Privilege.READ -import whisk.core.entitlement.{Collection, Privilege, Resource} -import whisk.core.entity._ -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages -import whisk.core.database.UserContext +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.logging.LogStore +import org.apache.openwhisk.core.controller.RestApiCommons.{ListLimit, ListSkip} +import org.apache.openwhisk.core.database.ActivationStore +import org.apache.openwhisk.core.entitlement.Privilege.READ +import org.apache.openwhisk.core.entitlement.{Collection, Privilege, Resource} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.database.UserContext object WhiskActivationsApi { diff --git a/core/controller/src/main/scala/whisk/core/controller/ApiUtils.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/ApiUtils.scala similarity index 96% rename from core/controller/src/main/scala/whisk/core/controller/ApiUtils.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/ApiUtils.scala index 7bb0f2af7c8..71c64148a1a 100644 --- a/core/controller/src/main/scala/whisk/core/controller/ApiUtils.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/ApiUtils.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import scala.concurrent.ExecutionContext import scala.concurrent.Future @@ -32,15 +32,15 @@ import spray.json.DefaultJsonProtocol._ import spray.json.JsObject import spray.json.JsValue import spray.json.RootJsonFormat -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.controller.PostProcess.PostProcessEntity -import whisk.core.database._ -import whisk.core.entity.DocId -import whisk.core.entity.WhiskDocument -import whisk.http.ErrorResponse -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.PostProcess.PostProcessEntity +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entity.DocId +import org.apache.openwhisk.core.entity.WhiskDocument +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages._ /** An exception to throw inside a Predicate future. */ protected[core] case class RejectRequest(code: StatusCode, message: Option[ErrorResponse]) extends Throwable { diff --git a/core/controller/src/main/scala/whisk/core/controller/AuthenticatedRoute.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthenticatedRoute.scala similarity index 87% rename from core/controller/src/main/scala/whisk/core/controller/AuthenticatedRoute.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthenticatedRoute.scala index 295dc899525..4ff3c6cad98 100644 --- a/core/controller/src/main/scala/whisk/core/controller/AuthenticatedRoute.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthenticatedRoute.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.http.scaladsl.server.Route -import whisk.common.TransactionId -import whisk.core.entity.Identity +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Identity /** A trait for authenticated routes. */ trait AuthenticatedRouteProvider { diff --git a/core/controller/src/main/scala/whisk/core/controller/AuthorizedRouteDispatcher.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthorizedRouteDispatcher.scala similarity index 93% rename from core/controller/src/main/scala/whisk/core/controller/AuthorizedRouteDispatcher.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthorizedRouteDispatcher.scala index 2ed1a9428b4..75b003c5490 100644 --- a/core/controller/src/main/scala/whisk/core/controller/AuthorizedRouteDispatcher.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthorizedRouteDispatcher.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import scala.concurrent.ExecutionContext import scala.language.postfixOps @@ -33,15 +33,15 @@ import akka.http.scaladsl.server.RouteResult import akka.http.scaladsl.model.StatusCodes.InternalServerError import akka.http.scaladsl.server.Directive1 -import whisk.core.entitlement.Collection -import whisk.common.TransactionId -import whisk.core.entitlement._ -import whisk.core.entitlement.Resource -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.http.ErrorResponse -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entitlement.Resource +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages /** A trait for routes that require entitlement checks. */ trait BasicAuthorizedRouteProvider extends Directives { diff --git a/core/controller/src/main/scala/whisk/core/controller/Backend.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Backend.scala similarity index 82% rename from core/controller/src/main/scala/whisk/core/controller/Backend.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Backend.scala index cd74b8d550e..df1f740b1e5 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Backend.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Backend.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller -import whisk.core.WhiskConfig -import whisk.core.entitlement._ -import whisk.core.entity.ActivationId.ActivationIdGenerator -import whisk.core.loadBalancer.LoadBalancer +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity.ActivationId.ActivationIdGenerator +import org.apache.openwhisk.core.loadBalancer.LoadBalancer /** * A trait which defines a few services which a whisk microservice may rely on. diff --git a/core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/BasicAuthenticationDirective.scala similarity index 93% rename from core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/BasicAuthenticationDirective.scala index 83233ee5d30..b9a4c3c3932 100644 --- a/core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/BasicAuthenticationDirective.scala @@ -15,16 +15,16 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.actor.ActorSystem import akka.http.scaladsl.model.headers._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.directives.{AuthenticationDirective, AuthenticationResult} -import whisk.common.{Logging, TransactionId} -import whisk.core.database.NoDocumentException -import whisk.core.entity._ -import whisk.core.entity.types.AuthStore +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.database.NoDocumentException +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.AuthStore import scala.concurrent.{ExecutionContext, Future} import scala.util.Try diff --git a/core/controller/src/main/scala/whisk/core/controller/Controller.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Controller.scala similarity index 92% rename from core/controller/src/main/scala/whisk/core/controller/Controller.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Controller.scala index b5867cb6005..1cb38ee478f 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Controller.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Controller.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.Done import akka.actor.{ActorSystem, CoordinatedShutdown} @@ -28,19 +28,19 @@ import kamon.Kamon import pureconfig.loadConfigOrThrow import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.Https.HttpsConfig -import whisk.common.{AkkaLogging, Logging, LoggingMarkers, TransactionId} -import whisk.core.WhiskConfig -import whisk.core.connector.MessagingProvider -import whisk.core.containerpool.logging.LogStoreProvider -import whisk.core.database.{ActivationStoreProvider, CacheChangeNotification, RemoteCacheInvalidation} -import whisk.core.entitlement._ -import whisk.core.entity.ActivationId.ActivationIdGenerator -import whisk.core.entity.ExecManifest.Runtimes -import whisk.core.entity._ -import whisk.core.loadBalancer.{InvokerState, LoadBalancerProvider} -import whisk.http.{BasicHttpService, BasicRasService} -import whisk.spi.SpiLoader +import org.apache.openwhisk.common.Https.HttpsConfig +import org.apache.openwhisk.common.{AkkaLogging, Logging, LoggingMarkers, TransactionId} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.MessagingProvider +import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider +import org.apache.openwhisk.core.database.{ActivationStoreProvider, CacheChangeNotification, RemoteCacheInvalidation} +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity.ActivationId.ActivationIdGenerator +import org.apache.openwhisk.core.entity.ExecManifest.Runtimes +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.loadBalancer.{InvokerState, LoadBalancerProvider} +import org.apache.openwhisk.http.{BasicHttpService, BasicRasService} +import org.apache.openwhisk.spi.SpiLoader import scala.concurrent.duration.DurationInt import scala.concurrent.{Await, Future} diff --git a/core/controller/src/main/scala/whisk/core/controller/CorsSettings.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/CorsSettings.scala similarity index 97% rename from core/controller/src/main/scala/whisk/core/controller/CorsSettings.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/CorsSettings.scala index 872000cb0ac..959867486ab 100644 --- a/core/controller/src/main/scala/whisk/core/controller/CorsSettings.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/CorsSettings.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.http.scaladsl.model.headers._ import akka.http.scaladsl.model.HttpMethods.{DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT} diff --git a/core/controller/src/main/scala/whisk/core/controller/Entities.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala similarity index 92% rename from core/controller/src/main/scala/whisk/core/controller/Entities.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala index b1f34b3dc07..6370e2e1611 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Entities.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import scala.concurrent.Future import scala.language.postfixOps @@ -29,16 +29,16 @@ import akka.http.scaladsl.server.RequestContext import akka.http.scaladsl.server.Route import akka.http.scaladsl.server.RouteResult import spray.json.JsonPrinter -import whisk.common.TransactionId -import whisk.core.entitlement.Privilege._ -import whisk.core.entitlement.Privilege -import whisk.core.entitlement.Privilege.READ -import whisk.core.entitlement.Resource -import whisk.core.entity._ -import whisk.core.entity.ActivationEntityLimit -import whisk.core.entity.size._ -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entitlement.Privilege._ +import org.apache.openwhisk.core.entitlement.Privilege +import org.apache.openwhisk.core.entitlement.Privilege.READ +import org.apache.openwhisk.core.entitlement.Resource +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.ActivationEntityLimit +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages protected[controller] trait ValidateRequestSize extends Directives { diff --git a/core/controller/src/main/scala/whisk/core/controller/Namespaces.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Namespaces.scala similarity index 89% rename from core/controller/src/main/scala/whisk/core/controller/Namespaces.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Namespaces.scala index f40a9096c4e..49eb59da586 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Namespaces.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Namespaces.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.server.Directives import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.entitlement.Collection -import whisk.core.entity.Identity +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.entity.Identity trait WhiskNamespacesApi extends Directives with AuthenticatedRouteProvider { diff --git a/core/controller/src/main/scala/whisk/core/controller/Packages.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Packages.scala similarity index 96% rename from core/controller/src/main/scala/whisk/core/controller/Packages.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Packages.scala index 8cfbdcf0089..6a07e5d3445 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Packages.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Packages.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import scala.concurrent.Future import scala.util.{Failure, Success} @@ -25,14 +25,14 @@ import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.server.{RequestContext, RouteResult} import akka.http.scaladsl.unmarshalling.Unmarshaller -import whisk.common.TransactionId -import whisk.core.controller.RestApiCommons.{ListLimit, ListSkip} -import whisk.core.database.{CacheChangeNotification, DocumentTypeMismatchException, NoDocumentException} -import whisk.core.entitlement._ -import whisk.core.entity._ -import whisk.core.entity.types.EntityStore -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.RestApiCommons.{ListLimit, ListSkip} +import org.apache.openwhisk.core.database.{CacheChangeNotification, DocumentTypeMismatchException, NoDocumentException} +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.EntityStore +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages trait WhiskPackagesApi extends WhiskCollectionAPI with ReferencedEntities { services: WhiskServices => diff --git a/core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/RestAPIs.scala similarity index 95% rename from core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/RestAPIs.scala index fd842a09676..522d2ebc353 100644 --- a/core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/RestAPIs.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.actor.ActorSystem import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ @@ -27,17 +27,17 @@ import akka.stream.ActorMaterializer import pureconfig.loadConfigOrThrow import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.{Logging, TransactionId} -import whisk.core.containerpool.logging.LogStore -import whisk.core.database.{ActivationStore, CacheChangeNotification} -import whisk.core.entitlement._ -import whisk.core.entity.ActivationId.ActivationIdGenerator -import whisk.core.entity._ -import whisk.core.entity.types._ -import whisk.core.loadBalancer.LoadBalancer -import whisk.core.{ConfigKeys, WhiskConfig} -import whisk.http.Messages -import whisk.spi.{Spi, SpiLoader} +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.containerpool.logging.LogStore +import org.apache.openwhisk.core.database.{ActivationStore, CacheChangeNotification} +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity.ActivationId.ActivationIdGenerator +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types._ +import org.apache.openwhisk.core.loadBalancer.LoadBalancer +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.spi.{Spi, SpiLoader} import scala.concurrent.{ExecutionContext, Future} import scala.util.{Failure, Success, Try} diff --git a/core/controller/src/main/scala/whisk/core/controller/Rules.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Rules.scala similarity index 96% rename from core/controller/src/main/scala/whisk/core/controller/Rules.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Rules.scala index c041ef0a761..62b7cacda1a 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Rules.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Rules.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import akka.actor.ActorSystem import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ @@ -23,14 +23,14 @@ import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.server.StandardRoute import akka.http.scaladsl.unmarshalling.Unmarshaller import spray.json.DeserializationException -import whisk.common.TransactionId -import whisk.core.controller.RestApiCommons.{ListLimit, ListSkip} -import whisk.core.database.{CacheChangeNotification, DocumentConflictException, NoDocumentException} -import whisk.core.entitlement.{Collection, Privilege, ReferencedEntities} -import whisk.core.entity._ -import whisk.core.entity.types.EntityStore -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.RestApiCommons.{ListLimit, ListSkip} +import org.apache.openwhisk.core.database.{CacheChangeNotification, DocumentConflictException, NoDocumentException} +import org.apache.openwhisk.core.entitlement.{Collection, Privilege, ReferencedEntities} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.EntityStore +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages._ import scala.concurrent.Future import scala.util.{Failure, Success} diff --git a/core/controller/src/main/scala/whisk/core/controller/Triggers.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Triggers.scala similarity index 96% rename from core/controller/src/main/scala/whisk/core/controller/Triggers.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/Triggers.scala index 18892415dfc..291fb63b6f1 100644 --- a/core/controller/src/main/scala/whisk/core/controller/Triggers.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Triggers.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import java.time.{Clock, Instant} @@ -37,16 +37,16 @@ import spray.json.DefaultJsonProtocol._ import com.typesafe.sslconfig.akka.AkkaSSLConfig import pureconfig.loadConfigOrThrow import spray.json._ -import whisk.common.Https.HttpsConfig -import whisk.common.{Https, TransactionId} -import whisk.core.controller.RestApiCommons.{ListLimit, ListSkip} -import whisk.core.database.{ActivationStore, CacheChangeNotification} -import whisk.core.entitlement.Collection -import whisk.core.entity._ -import whisk.core.entity.types.EntityStore -import whisk.http.ErrorResponse -import whisk.http.Messages -import whisk.core.database.UserContext +import org.apache.openwhisk.common.Https.HttpsConfig +import org.apache.openwhisk.common.{Https, TransactionId} +import org.apache.openwhisk.core.controller.RestApiCommons.{ListLimit, ListSkip} +import org.apache.openwhisk.core.database.{ActivationStore, CacheChangeNotification} +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.EntityStore +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.database.UserContext /** A trait implementing the triggers API. */ trait WhiskTriggersApi extends WhiskCollectionAPI { diff --git a/core/controller/src/main/scala/whisk/core/controller/WebActions.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/WebActions.scala similarity index 97% rename from core/controller/src/main/scala/whisk/core/controller/WebActions.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/WebActions.scala index 45e1251549b..b7f0bcec055 100644 --- a/core/controller/src/main/scala/whisk/core/controller/WebActions.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/WebActions.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller +package org.apache.openwhisk.core.controller import java.util.Base64 @@ -47,19 +47,19 @@ import spray.json._ import spray.json.DefaultJsonProtocol._ import WhiskWebActionsApi.MediaExtension import RestApiCommons.{jsonPrettyResponsePrinter => jsonPrettyPrinter} -import whisk.common.TransactionId -import whisk.core.controller.actions.PostActionActivation -import whisk.core.database._ -import whisk.core.entitlement.{Collection, Privilege, Resource} -import whisk.core.entity._ -import whisk.core.entity.types._ -import whisk.core.loadBalancer.LoadBalancerException -import whisk.http.ErrorResponse.terminate -import whisk.http.Messages -import whisk.http.LenientSprayJsonSupport._ -import whisk.spi.SpiLoader -import whisk.utils.JsHelpers._ -import whisk.core.entity.Exec +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.actions.PostActionActivation +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entitlement.{Collection, Privilege, Resource} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types._ +import org.apache.openwhisk.core.loadBalancer.LoadBalancerException +import org.apache.openwhisk.http.ErrorResponse.terminate +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.http.LenientSprayJsonSupport._ +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.utils.JsHelpers._ +import org.apache.openwhisk.core.entity.Exec protected[controller] sealed class WebApiDirectives(prefix: String = "__ow_") { // enforce the presence of an extension (e.g., .http) in the URI path diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PostActionActivation.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PostActionActivation.scala similarity index 89% rename from core/controller/src/main/scala/whisk/core/controller/actions/PostActionActivation.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PostActionActivation.scala index 5548229ca8a..1b14fc3a5d5 100644 --- a/core/controller/src/main/scala/whisk/core/controller/actions/PostActionActivation.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PostActionActivation.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.actions +package org.apache.openwhisk.core.controller.actions import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration @@ -24,11 +24,11 @@ import akka.http.scaladsl.model.StatusCodes.BadRequest import spray.json._ -import whisk.common.TransactionId -import whisk.core.controller.RejectRequest -import whisk.core.controller.WhiskServices -import whisk.core.entity._ -import whisk.http.Messages +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.RejectRequest +import org.apache.openwhisk.core.controller.WhiskServices +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.Messages protected[core] trait PostActionActivation extends PrimitiveActions with SequenceActions { /** The core collections require backend services to be injected in this trait. */ diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PrimitiveActions.scala similarity index 97% rename from core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PrimitiveActions.scala index d16bafa8be8..1d2ca0c1b5c 100644 --- a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PrimitiveActions.scala @@ -15,26 +15,26 @@ * limitations under the License. */ -package whisk.core.controller.actions +package org.apache.openwhisk.core.controller.actions import java.time.{Clock, Instant} import akka.actor.ActorSystem import akka.event.Logging.InfoLevel import spray.json._ -import whisk.common.tracing.WhiskTracerProvider -import whisk.common.{Logging, LoggingMarkers, TransactionId, UserEvents} -import whisk.core.connector.{ActivationMessage, EventMessage, MessagingProvider} -import whisk.core.controller.WhiskServices -import whisk.core.database.{ActivationStore, NoDocumentException, UserContext} -import whisk.core.entitlement.{Resource, _} -import whisk.core.entity.ActivationResponse.ERROR_FIELD -import whisk.core.entity._ -import whisk.core.entity.size.SizeInt -import whisk.core.entity.types.EntityStore -import whisk.http.Messages._ -import whisk.spi.SpiLoader -import whisk.utils.ExecutionContextFactory.FutureExtensions +import org.apache.openwhisk.common.tracing.WhiskTracerProvider +import org.apache.openwhisk.common.{Logging, LoggingMarkers, TransactionId, UserEvents} +import org.apache.openwhisk.core.connector.{ActivationMessage, EventMessage, MessagingProvider} +import org.apache.openwhisk.core.controller.WhiskServices +import org.apache.openwhisk.core.database.{ActivationStore, NoDocumentException, UserContext} +import org.apache.openwhisk.core.entitlement.{Resource, _} +import org.apache.openwhisk.core.entity.ActivationResponse.ERROR_FIELD +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.entity.types.EntityStore +import org.apache.openwhisk.http.Messages._ +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.utils.ExecutionContextFactory.FutureExtensions import scala.collection.mutable.Buffer import scala.concurrent.duration._ diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/SequenceActions.scala similarity index 97% rename from core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/SequenceActions.scala index 6002a57e370..ea7dfa28935 100644 --- a/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/SequenceActions.scala @@ -15,23 +15,23 @@ * limitations under the License. */ -package whisk.core.controller.actions +package org.apache.openwhisk.core.controller.actions import java.time.{Clock, Instant} import java.util.concurrent.atomic.AtomicReference import akka.actor.ActorSystem import spray.json._ -import whisk.common.{Logging, TransactionId, UserEvents} -import whisk.core.connector.{EventMessage, MessagingProvider} -import whisk.core.controller.WhiskServices -import whisk.core.database.{ActivationStore, NoDocumentException, UserContext} -import whisk.core.entity._ -import whisk.core.entity.size.SizeInt -import whisk.core.entity.types._ -import whisk.http.Messages._ -import whisk.spi.SpiLoader -import whisk.utils.ExecutionContextFactory.FutureExtensions +import org.apache.openwhisk.common.{Logging, TransactionId, UserEvents} +import org.apache.openwhisk.core.connector.{EventMessage, MessagingProvider} +import org.apache.openwhisk.core.controller.WhiskServices +import org.apache.openwhisk.core.database.{ActivationStore, NoDocumentException, UserContext} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.entity.types._ +import org.apache.openwhisk.http.Messages._ +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.utils.ExecutionContextFactory.FutureExtensions import scala.collection._ import scala.concurrent.duration._ diff --git a/core/controller/src/main/scala/whisk/core/entitlement/ActionCollection.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/ActionCollection.scala similarity index 91% rename from core/controller/src/main/scala/whisk/core/entitlement/ActionCollection.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/ActionCollection.scala index 4c0430e7b71..ca3baf65a05 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/ActionCollection.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/ActionCollection.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement import scala.concurrent.ExecutionContext import scala.concurrent.Future -import whisk.common.TransactionId -import whisk.core.entity.Identity -import whisk.core.entity.types.EntityStore +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Identity +import org.apache.openwhisk.core.entity.types.EntityStore class ActionCollection(entityStore: EntityStore) extends Collection(Collection.ACTIONS) { diff --git a/core/controller/src/main/scala/whisk/core/entitlement/ActivationThrottler.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/ActivationThrottler.scala similarity index 89% rename from core/controller/src/main/scala/whisk/core/entitlement/ActivationThrottler.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/ActivationThrottler.scala index b48a4dd09b4..9d8b8829ac1 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/ActivationThrottler.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/ActivationThrottler.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.entity.Identity -import whisk.core.loadBalancer.LoadBalancer -import whisk.http.Messages +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Identity +import org.apache.openwhisk.core.loadBalancer.LoadBalancer +import org.apache.openwhisk.http.Messages import scala.concurrent.{ExecutionContext, Future} diff --git a/core/controller/src/main/scala/whisk/core/entitlement/Collection.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/Collection.scala similarity index 91% rename from core/controller/src/main/scala/whisk/core/entitlement/Collection.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/Collection.scala index 5f658768e66..0e406246019 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/Collection.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/Collection.scala @@ -15,9 +15,9 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement -import whisk.core.entitlement.Privilege._ +import org.apache.openwhisk.core.entitlement.Privilege._ import scala.concurrent.ExecutionContext import scala.concurrent.Future @@ -28,15 +28,15 @@ import akka.http.scaladsl.model.HttpMethods.GET import akka.http.scaladsl.model.HttpMethods.POST import akka.http.scaladsl.model.HttpMethods.PUT -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.entity.Identity -import whisk.core.entity.WhiskAction -import whisk.core.entity.WhiskActivation -import whisk.core.entity.WhiskPackage -import whisk.core.entity.WhiskRule -import whisk.core.entity.WhiskTrigger -import whisk.core.entity.types.EntityStore +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Identity +import org.apache.openwhisk.core.entity.WhiskAction +import org.apache.openwhisk.core.entity.WhiskActivation +import org.apache.openwhisk.core.entity.WhiskPackage +import org.apache.openwhisk.core.entity.WhiskRule +import org.apache.openwhisk.core.entity.WhiskTrigger +import org.apache.openwhisk.core.entity.types.EntityStore /** * A collection encapsulates the name of a collection and implicit rights when subject diff --git a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/Entitlement.scala similarity index 96% rename from core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/Entitlement.scala index 1f3f53ca477..c074de5279a 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/Entitlement.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement import scala.collection.concurrent.TrieMap import scala.collection.immutable.Set @@ -25,19 +25,19 @@ import scala.util.Success import akka.actor.ActorSystem import akka.http.scaladsl.model.StatusCodes.Forbidden import akka.http.scaladsl.model.StatusCodes.TooManyRequests -import whisk.core.entitlement.Privilege.ACTIVATE -import whisk.core.entitlement.Privilege.REJECT -import whisk.common.{Logging, TransactionId, UserEvents} -import whisk.core.WhiskConfig -import whisk.core.connector.{EventMessage, Metric} -import whisk.core.controller.RejectRequest -import whisk.core.entity._ -import whisk.core.loadBalancer.{LoadBalancer, ShardingContainerPoolBalancer} -import whisk.http.ErrorResponse -import whisk.http.Messages -import whisk.core.connector.MessagingProvider -import whisk.spi.SpiLoader -import whisk.spi.Spi +import org.apache.openwhisk.core.entitlement.Privilege.ACTIVATE +import org.apache.openwhisk.core.entitlement.Privilege.REJECT +import org.apache.openwhisk.common.{Logging, TransactionId, UserEvents} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.{EventMessage, Metric} +import org.apache.openwhisk.core.controller.RejectRequest +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.loadBalancer.{LoadBalancer, ShardingContainerPoolBalancer} +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.connector.MessagingProvider +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.spi.Spi package object types { type Entitlements = TrieMap[(Subject, String), Set[Privilege]] @@ -203,7 +203,7 @@ protected[core] abstract class EntitlementProvider( private val kindRestrictor = { import pureconfig.loadConfigOrThrow - import whisk.core.ConfigKeys + import org.apache.openwhisk.core.ConfigKeys case class AllowedKinds(whitelist: Option[Set[String]] = None) val allowedKinds = loadConfigOrThrow[AllowedKinds](ConfigKeys.runtimes) KindRestrictor(allowedKinds.whitelist) diff --git a/core/controller/src/main/scala/whisk/core/entitlement/KindRestrictor.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/KindRestrictor.scala similarity index 93% rename from core/controller/src/main/scala/whisk/core/entitlement/KindRestrictor.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/KindRestrictor.scala index a569d059de7..8154cd8b86b 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/KindRestrictor.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/KindRestrictor.scala @@ -15,10 +15,10 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement -import whisk.common.{Logging, TransactionId} -import whisk.core.entity.Identity +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.entity.Identity /** * The runtimes manifest specifies all runtimes enabled for the deployment. diff --git a/core/controller/src/main/scala/whisk/core/entitlement/LocalEntitlement.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/LocalEntitlement.scala similarity index 91% rename from core/controller/src/main/scala/whisk/core/entitlement/LocalEntitlement.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/LocalEntitlement.scala index 179437fdf2c..a87394612eb 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/LocalEntitlement.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/LocalEntitlement.scala @@ -15,16 +15,16 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement import scala.collection.concurrent.TrieMap import scala.concurrent.Future import akka.actor.ActorSystem -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.entity.{ControllerInstanceId, Identity, Subject} -import whisk.core.loadBalancer.LoadBalancer +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entity.{ControllerInstanceId, Identity, Subject} +import org.apache.openwhisk.core.loadBalancer.LoadBalancer protected[core] class LocalEntitlementProvider( private val config: WhiskConfig, diff --git a/core/controller/src/main/scala/whisk/core/entitlement/PackageCollection.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/PackageCollection.scala similarity index 92% rename from core/controller/src/main/scala/whisk/core/entitlement/PackageCollection.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/PackageCollection.scala index 30ff6be3cb5..7dfb0c873d3 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/PackageCollection.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/PackageCollection.scala @@ -15,21 +15,21 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement import scala.concurrent.ExecutionContext import scala.concurrent.Future import akka.http.scaladsl.model.StatusCodes._ -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.controller.RejectRequest -import whisk.core.database.DocumentTypeMismatchException -import whisk.core.database.NoDocumentException -import whisk.core.entity._ -import whisk.core.entity.types.EntityStore -import whisk.http.Messages +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.RejectRequest +import org.apache.openwhisk.core.database.DocumentTypeMismatchException +import org.apache.openwhisk.core.database.NoDocumentException +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.EntityStore +import org.apache.openwhisk.http.Messages class PackageCollection(entityStore: EntityStore)(implicit logging: Logging) extends Collection(Collection.PACKAGES) { diff --git a/core/controller/src/main/scala/whisk/core/entitlement/RateThrottler.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/RateThrottler.scala similarity index 92% rename from core/controller/src/main/scala/whisk/core/entitlement/RateThrottler.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/RateThrottler.scala index 527b6995f53..fece904fe0a 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/RateThrottler.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/entitlement/RateThrottler.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.entitlement +package org.apache.openwhisk.core.entitlement import scala.collection.concurrent.TrieMap -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.entity.Identity -import whisk.core.entity.UUID +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Identity +import org.apache.openwhisk.core.entity.UUID import java.util.concurrent.atomic.AtomicInteger /** diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/InvokerSupervision.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/InvokerSupervision.scala similarity index 97% rename from core/controller/src/main/scala/whisk/core/loadBalancer/InvokerSupervision.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/InvokerSupervision.scala index 305386b7fbd..5017ea3e799 100644 --- a/core/controller/src/main/scala/whisk/core/loadBalancer/InvokerSupervision.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/InvokerSupervision.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.loadBalancer +package org.apache.openwhisk.core.loadBalancer import java.nio.charset.StandardCharsets @@ -31,13 +31,13 @@ import akka.actor.FSM.SubscribeTransitionCallBack import akka.actor.FSM.Transition import akka.pattern.pipe import akka.util.Timeout -import whisk.common._ -import whisk.core.connector._ -import whisk.core.database.NoDocumentException -import whisk.core.entitlement.Privilege -import whisk.core.entity.ActivationId.ActivationIdGenerator -import whisk.core.entity._ -import whisk.core.entity.types.EntityStore +import org.apache.openwhisk.common._ +import org.apache.openwhisk.core.connector._ +import org.apache.openwhisk.core.database.NoDocumentException +import org.apache.openwhisk.core.entitlement.Privilege +import org.apache.openwhisk.core.entity.ActivationId.ActivationIdGenerator +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.EntityStore // Received events case object GetStatus diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancer.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/LoadBalancer.scala similarity index 92% rename from core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancer.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/LoadBalancer.scala index 3005b91f4b8..da1e1b4fd69 100644 --- a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancer.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/LoadBalancer.scala @@ -15,16 +15,16 @@ * limitations under the License. */ -package whisk.core.loadBalancer +package org.apache.openwhisk.core.loadBalancer import scala.concurrent.Future import akka.actor.ActorSystem import akka.stream.ActorMaterializer -import whisk.common.{Logging, TransactionId} -import whisk.core.WhiskConfig -import whisk.core.connector._ -import whisk.core.entity._ -import whisk.spi.Spi +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.spi.Spi /** * Describes an abstract invoker. An invoker is a local container pool manager that diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala similarity index 98% rename from core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala rename to core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala index 1769904c723..f0773c6150b 100644 --- a/core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala +++ b/core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.loadBalancer +package org.apache.openwhisk.core.loadBalancer import java.nio.charset.StandardCharsets import java.util.concurrent.ThreadLocalRandom @@ -30,14 +30,14 @@ import akka.management.cluster.bootstrap.ClusterBootstrap import akka.stream.ActorMaterializer import org.apache.kafka.clients.producer.RecordMetadata import pureconfig._ -import whisk.common.LoggingMarkers._ -import whisk.common._ -import whisk.core.WhiskConfig._ -import whisk.core.connector._ -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.{ConfigKeys, WhiskConfig} -import whisk.spi.SpiLoader +import org.apache.openwhisk.common.LoggingMarkers._ +import org.apache.openwhisk.common._ +import org.apache.openwhisk.core.WhiskConfig._ +import org.apache.openwhisk.core.connector._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.spi.SpiLoader import scala.annotation.tailrec import scala.collection.concurrent.TrieMap diff --git a/core/invoker/build.gradle b/core/invoker/build.gradle index 6ead95b6afc..e97ef2d75f7 100644 --- a/core/invoker/build.gradle +++ b/core/invoker/build.gradle @@ -55,4 +55,4 @@ tasks.withType(ScalaCompile) { scalaCompileOptions.additionalParameters = gradle.scala.compileFlags } -mainClassName = "whisk.core.invoker.Invoker" +mainClassName = "org.apache.openwhisk.core.invoker.Invoker" diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/ContainerPool.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala similarity index 98% rename from core/invoker/src/main/scala/whisk/core/containerpool/ContainerPool.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala index fe31ec41615..ca6d47d43b2 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/ContainerPool.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import akka.actor.{Actor, ActorRef, ActorRefFactory, Props} -import whisk.common.{AkkaLogging, LoggingMarkers, TransactionId} -import whisk.core.connector.MessageFeed -import whisk.core.entity._ -import whisk.core.entity.size._ +import org.apache.openwhisk.common.{AkkaLogging, LoggingMarkers, TransactionId} +import org.apache.openwhisk.core.connector.MessageFeed +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ import scala.collection.immutable import scala.concurrent.duration._ diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala similarity index 97% rename from core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala index 57e5c4fc5ea..e61b0a9180c 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool +package org.apache.openwhisk.core.containerpool import java.time.Instant @@ -26,15 +26,15 @@ import akka.pattern.pipe import pureconfig.loadConfigOrThrow import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.{AkkaLogging, Counter, LoggingMarkers, TransactionId} -import whisk.core.ConfigKeys -import whisk.core.connector.ActivationMessage -import whisk.core.containerpool.logging.LogCollectingException -import whisk.core.database.UserContext -import whisk.core.entity.ExecManifest.ImageName -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.common.{AkkaLogging, Counter, LoggingMarkers, TransactionId} +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.connector.ActivationMessage +import org.apache.openwhisk.core.containerpool.logging.LogCollectingException +import org.apache.openwhisk.core.database.UserContext +import org.apache.openwhisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClient.scala similarity index 97% rename from core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClient.scala index 371b38a40b2..4f493f2273d 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClient.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker +package org.apache.openwhisk.core.containerpool.docker import java.io.FileNotFoundException import java.nio.file.Files @@ -33,10 +33,10 @@ import scala.util.Success import scala.util.Try import akka.event.Logging.{ErrorLevel, InfoLevel} import pureconfig.loadConfigOrThrow -import whisk.common.{Logging, LoggingMarkers, MetricEmitter, TransactionId} -import whisk.core.ConfigKeys -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.common.{Logging, LoggingMarkers, MetricEmitter, TransactionId} +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.ContainerAddress import scala.concurrent.duration.Duration diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClientWithFileAccess.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClientWithFileAccess.scala similarity index 96% rename from core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClientWithFileAccess.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClientWithFileAccess.scala index 5487f5d3a91..76c03cdb1d9 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerClientWithFileAccess.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClientWithFileAccess.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker +package org.apache.openwhisk.core.containerpool.docker import java.io.File import java.nio.file.Paths @@ -30,10 +30,10 @@ import scala.concurrent.Future import scala.concurrent.blocking import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.ContainerAddress import scala.io.Source import scala.concurrent.duration.FiniteDuration diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainer.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainer.scala similarity index 96% rename from core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainer.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainer.scala index 47b6d2439f2..20f4589cc42 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainer.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker +package org.apache.openwhisk.core.containerpool.docker import java.time.Instant import java.util.concurrent.TimeoutException @@ -26,19 +26,19 @@ import akka.stream.scaladsl.Framing.FramingException import spray.json._ import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.containerpool._ -import whisk.core.entity.ActivationResponse.{ConnectionError, MemoryExhausted} -import whisk.core.entity.{ActivationEntityLimit, ByteSize} -import whisk.core.entity.size._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.entity.ActivationResponse.{ConnectionError, MemoryExhausted} +import org.apache.openwhisk.core.entity.{ActivationEntityLimit, ByteSize} +import org.apache.openwhisk.core.entity.size._ import akka.stream.scaladsl.{Framing, Source} import akka.stream.stage._ import akka.util.ByteString import spray.json._ -import whisk.core.containerpool.logging.LogLine -import whisk.core.entity.ExecManifest.ImageName -import whisk.http.Messages +import org.apache.openwhisk.core.containerpool.logging.LogLine +import org.apache.openwhisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.http.Messages object DockerContainer { diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainerFactory.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainerFactory.scala similarity index 88% rename from core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainerFactory.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainerFactory.scala index a2c556e0343..e5f11b1d82f 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainerFactory.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainerFactory.scala @@ -15,26 +15,26 @@ * limitations under the License. */ -package whisk.core.containerpool.docker +package org.apache.openwhisk.core.containerpool.docker import akka.actor.ActorSystem import scala.concurrent.Await import scala.concurrent.ExecutionContext import scala.concurrent.Future -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.containerpool.Container -import whisk.core.containerpool.ContainerFactory -import whisk.core.containerpool.ContainerFactoryProvider -import whisk.core.entity.ByteSize -import whisk.core.entity.ExecManifest -import whisk.core.entity.InvokerInstanceId +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.containerpool.ContainerFactory +import org.apache.openwhisk.core.containerpool.ContainerFactoryProvider +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.ExecManifest +import org.apache.openwhisk.core.entity.InvokerInstanceId import scala.concurrent.duration._ import java.util.concurrent.TimeoutException import pureconfig._ -import whisk.core.ConfigKeys -import whisk.core.containerpool.ContainerArgsConfig +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.containerpool.ContainerArgsConfig case class DockerContainerFactoryConfig(useRunc: Boolean) diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/ProcessRunner.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/ProcessRunner.scala similarity index 98% rename from core/invoker/src/main/scala/whisk/core/containerpool/docker/ProcessRunner.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/ProcessRunner.scala index f943b808e49..4b16d60c47c 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/ProcessRunner.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/ProcessRunner.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker +package org.apache.openwhisk.core.containerpool.docker import akka.actor.ActorSystem diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/RuncClient.scala similarity index 91% rename from core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/RuncClient.scala index a44a8aa9043..800352c172c 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/RuncClient.scala @@ -15,22 +15,22 @@ * limitations under the License. */ -package whisk.core.containerpool.docker +package org.apache.openwhisk.core.containerpool.docker import akka.actor.ActorSystem import scala.concurrent.Future import scala.concurrent.ExecutionContext import scala.util.Failure -import whisk.common.TransactionId +import org.apache.openwhisk.common.TransactionId import scala.util.Success -import whisk.common.LoggingMarkers -import whisk.common.Logging -import whisk.core.ConfigKeys +import org.apache.openwhisk.common.LoggingMarkers +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.ConfigKeys import pureconfig.loadConfigOrThrow import akka.event.Logging.{ErrorLevel, InfoLevel} -import whisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.ContainerId import scala.concurrent.duration.Duration diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesClient.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala similarity index 97% rename from core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesClient.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala index c6e5233062c..4dabc4fdffe 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesClient.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.kubernetes +package org.apache.openwhisk.core.containerpool.kubernetes import java.io.IOException import java.net.SocketTimeoutException @@ -33,14 +33,14 @@ import akka.stream.stage._ import akka.util.ByteString import io.fabric8.kubernetes.api.model._ import pureconfig.loadConfigOrThrow -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.ConfigKeys -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.ContainerAddress -import whisk.core.containerpool.docker.ProcessRunner -import whisk.core.entity.ByteSize -import whisk.core.entity.size._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.core.containerpool.docker.ProcessRunner +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesClientWithInvokerAgent.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClientWithInvokerAgent.scala similarity index 96% rename from core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesClientWithInvokerAgent.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClientWithInvokerAgent.scala index bf308ac818d..916a8c9cc1b 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesClientWithInvokerAgent.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClientWithInvokerAgent.scala @@ -15,9 +15,9 @@ * limitations under the License. */ -package whisk.core.containerpool.kubernetes +package org.apache.openwhisk.core.containerpool.kubernetes -import whisk.common.{Logging, TransactionId} +import org.apache.openwhisk.common.{Logging, TransactionId} import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.Uri.Path @@ -27,7 +27,7 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import pureconfig.loadConfigOrThrow import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.ConfigKeys +import org.apache.openwhisk.core.ConfigKeys import collection.JavaConverters._ import scala.concurrent.{blocking, ExecutionContext, Future} diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainer.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainer.scala similarity index 92% rename from core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainer.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainer.scala index 5ccec760f99..4a616473c5c 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainer.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainer.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.kubernetes +package org.apache.openwhisk.core.containerpool.kubernetes import akka.actor.ActorSystem import java.time.Instant @@ -29,13 +29,13 @@ import akka.util.ByteString import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.duration._ -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.containerpool._ -import whisk.core.containerpool.docker.{CompleteAfterOccurrences, OccurrencesNotFoundException} -import whisk.core.entity.ByteSize -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.containerpool.docker.{CompleteAfterOccurrences, OccurrencesNotFoundException} +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages object KubernetesContainer { diff --git a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala similarity index 84% rename from core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala index 5bd68eab555..f9b538aac9f 100644 --- a/core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.kubernetes +package org.apache.openwhisk.core.containerpool.kubernetes import akka.actor.ActorSystem import pureconfig.loadConfigOrThrow @@ -25,15 +25,15 @@ import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.duration._ -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.containerpool.Container -import whisk.core.containerpool.ContainerFactory -import whisk.core.containerpool.ContainerFactoryProvider -import whisk.core.entity.ByteSize -import whisk.core.entity.ExecManifest.ImageName -import whisk.core.entity.InvokerInstanceId -import whisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.core.containerpool.ContainerFactory +import org.apache.openwhisk.core.containerpool.ContainerFactoryProvider +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.core.entity.InvokerInstanceId +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} class KubernetesContainerFactory(label: String, config: WhiskConfig)(implicit actorSystem: ActorSystem, ec: ExecutionContext, diff --git a/core/invoker/src/main/scala/whisk/core/invoker/InstanceIdAssigner.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InstanceIdAssigner.scala similarity index 97% rename from core/invoker/src/main/scala/whisk/core/invoker/InstanceIdAssigner.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InstanceIdAssigner.scala index dd6babbf042..884c0e7f93a 100644 --- a/core/invoker/src/main/scala/whisk/core/invoker/InstanceIdAssigner.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InstanceIdAssigner.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.invoker +package org.apache.openwhisk.core.invoker import org.apache.curator.framework.CuratorFrameworkFactory import org.apache.curator.framework.recipes.shared.SharedCount import org.apache.curator.retry.RetryUntilElapsed -import whisk.common.Logging +import org.apache.openwhisk.common.Logging /** * Computes the instanceId for invoker diff --git a/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/Invoker.scala similarity index 90% rename from core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/Invoker.scala index 95eea6eb62c..14ca32b63b3 100644 --- a/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/Invoker.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.invoker +package org.apache.openwhisk.core.invoker import akka.Done import akka.actor.{ActorSystem, CoordinatedShutdown} @@ -23,18 +23,18 @@ import akka.stream.ActorMaterializer import com.typesafe.config.ConfigValueFactory import kamon.Kamon import pureconfig.loadConfigOrThrow -import whisk.common.Https.HttpsConfig -import whisk.common._ -import whisk.core.{ConfigKeys, WhiskConfig} -import whisk.core.WhiskConfig._ -import whisk.core.connector.{MessagingProvider, PingMessage} -import whisk.core.containerpool.ContainerPoolConfig -import whisk.core.entity.{ExecManifest, InvokerInstanceId} -import whisk.core.entity.ActivationEntityLimit -import whisk.core.entity.size._ -import whisk.http.{BasicHttpService, BasicRasService} -import whisk.spi.SpiLoader -import whisk.utils.ExecutionContextFactory +import org.apache.openwhisk.common.Https.HttpsConfig +import org.apache.openwhisk.common._ +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.core.WhiskConfig._ +import org.apache.openwhisk.core.connector.{MessagingProvider, PingMessage} +import org.apache.openwhisk.core.containerpool.ContainerPoolConfig +import org.apache.openwhisk.core.entity.{ExecManifest, InvokerInstanceId} +import org.apache.openwhisk.core.entity.ActivationEntityLimit +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.{BasicHttpService, BasicRasService} +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.utils.ExecutionContextFactory import scala.concurrent.duration._ import scala.concurrent.{Await, Future} diff --git a/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InvokerReactive.scala similarity index 94% rename from core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InvokerReactive.scala index 65d696584fb..b8caf038195 100644 --- a/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InvokerReactive.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.invoker +package org.apache.openwhisk.core.invoker import java.nio.charset.StandardCharsets import java.time.Instant @@ -26,18 +26,18 @@ import akka.stream.ActorMaterializer import org.apache.kafka.common.errors.RecordTooLargeException import pureconfig._ import spray.json._ -import whisk.common.tracing.WhiskTracerProvider -import whisk.common._ -import whisk.core.connector._ -import whisk.core.containerpool._ -import whisk.core.containerpool.logging.LogStoreProvider -import whisk.core.database._ -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.{ConfigKeys, WhiskConfig} -import whisk.http.Messages -import whisk.spi.SpiLoader -import whisk.core.database.UserContext +import org.apache.openwhisk.common.tracing.WhiskTracerProvider +import org.apache.openwhisk.common._ +import org.apache.openwhisk.core.connector._ +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig} +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.duration._ import scala.concurrent.{ExecutionContext, Future} diff --git a/core/invoker/src/main/scala/whisk/core/invoker/NamespaceBlacklist.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/NamespaceBlacklist.scala similarity index 90% rename from core/invoker/src/main/scala/whisk/core/invoker/NamespaceBlacklist.scala rename to core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/NamespaceBlacklist.scala index 5da340720e7..f52ce0f0190 100644 --- a/core/invoker/src/main/scala/whisk/core/invoker/NamespaceBlacklist.scala +++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/NamespaceBlacklist.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.invoker +package org.apache.openwhisk.core.invoker -import whisk.common.TransactionId -import whisk.core.database.StaleParameter -import whisk.core.entity.{Identity, View} -import whisk.core.entity.types.AuthStore +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.StaleParameter +import org.apache.openwhisk.core.entity.{Identity, View} +import org.apache.openwhisk.core.entity.types.AuthStore import scala.concurrent.{ExecutionContext, Future} import spray.json.DefaultJsonProtocol._ diff --git a/docs/spi.md b/docs/spi.md index 862253cb03c..1835438b6e4 100644 --- a/docs/spi.md +++ b/docs/spi.md @@ -22,7 +22,7 @@ Alternate implementations of various components follow an SPI (Service Provider Interface) pattern: * The pluggable component is defined as an Spi trait: ```scala -import whisk.spi.Spi +import org.apache.openwhisk.spi.Spi trait ThisIsPluggable extends Spi { ... } ``` * Implementations implement the Spi trait diff --git a/tests/build.gradle b/tests/build.gradle index 2c3a6f71164..648b1123183 100644 --- a/tests/build.gradle +++ b/tests/build.gradle @@ -54,30 +54,31 @@ def leanExcludes = [ ext.testSets = [ "REQUIRE_ONLY_DB" : [ "includes" : [ - "whisk/**" + "org/apache/openwhisk/**" ], "excludes" : [ - "whisk/core/admin/**", - "whisk/core/apigw/actions/test/**", - "whisk/core/cli/test/**", - "whisk/core/limits/**", + "org/apache/openwhisk/core/admin/**", + "org/apache/openwhisk/core/apigw/actions/test/**", + "org/apache/openwhisk/core/cli/test/**", + "org/apache/openwhisk/core/limits/**", "**/*CacheConcurrencyTests*", "**/*ControllerApiTests*", + "org/apache/openwhisk/testEntities/**", ] ], "REQUIRE_SYSTEM" : [ "includes" : [ + "org/apache/openwhisk/core/limits/**", + "org/apache/openwhisk/core/admin/**", + "org/apache/openwhisk/core/cli/test/**", + "org/apache/openwhisk/core/apigw/actions/test/**", + "org/apache/openwhisk/core/database/test/*CacheConcurrencyTests*", + "org/apache/openwhisk/core/controller/test/*ControllerApiTests*", "apigw/healthtests/**", "ha/**", "services/**", "system/basic/**", "system/rest/**", - "whisk/core/admin/**", - "whisk/core/cli/test/**", - "whisk/core/apigw/actions/test/**", - "whisk/core/limits/**", - "whisk/core/database/test/*CacheConcurrencyTests*", - "whisk/core/controller/test/*ControllerApiTests*", ], "excludes": [ "system/basic/WskMultiRuntimeTests*" @@ -95,7 +96,7 @@ ext.testSets = [ ], "REQUIRE_SYSTEM_BASIC" : [ "includes" : [ - "system/basic/**" + "org/apache/openwhisk/testEntities/system/basic/**" ] ] ] @@ -137,7 +138,7 @@ task testSystemBasic(type: Test) { } task testUnit(type: Test) { - systemProperty("whisk.spi.ArtifactStoreProvider", "whisk.core.database.memory.MemoryArtifactStoreProvider") + systemProperty("whisk.spi.ArtifactStoreProvider", "org.apache.openwhisk.core.database.memory.MemoryArtifactStoreProvider") exclude getPattern("REQUIRE_ONLY_DB", "excludes") include getPattern("REQUIRE_ONLY_DB", "includes") diff --git a/tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ApiV1Simulation.scala similarity index 96% rename from tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ApiV1Simulation.scala index 9fa760445ab..0418f773d48 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ApiV1Simulation.scala @@ -15,7 +15,9 @@ * limitations under the License. */ -import extension.whisk.Predef._ +package org.apache.openwhisk + +import org.apache.openwhisk.extension.whisk.Predef._ import io.gatling.core.Predef._ import scala.concurrent.duration._ diff --git a/tests/performance/gatling_tests/src/gatling/scala/BlockingInvokeOneActionSimulation.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/BlockingInvokeOneActionSimulation.scala similarity index 95% rename from tests/performance/gatling_tests/src/gatling/scala/BlockingInvokeOneActionSimulation.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/BlockingInvokeOneActionSimulation.scala index e49ce52e4dc..84065c152a3 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/BlockingInvokeOneActionSimulation.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/BlockingInvokeOneActionSimulation.scala @@ -15,10 +15,12 @@ * limitations under the License. */ +package org.apache.openwhisk + import java.nio.charset.StandardCharsets -import extension.whisk.OpenWhiskProtocolBuilder -import extension.whisk.Predef._ +import org.apache.openwhisk.extension.whisk.OpenWhiskProtocolBuilder +import org.apache.openwhisk.extension.whisk.Predef._ import io.gatling.core.Predef._ import io.gatling.core.structure.ScenarioBuilder import io.gatling.core.util.Resource diff --git a/tests/performance/gatling_tests/src/gatling/scala/ColdBlockingInvokeSimulation.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ColdBlockingInvokeSimulation.scala similarity index 96% rename from tests/performance/gatling_tests/src/gatling/scala/ColdBlockingInvokeSimulation.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ColdBlockingInvokeSimulation.scala index da68e7a5ebe..81acdb067b1 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/ColdBlockingInvokeSimulation.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ColdBlockingInvokeSimulation.scala @@ -15,10 +15,12 @@ * limitations under the License. */ +package org.apache.openwhisk + import java.nio.charset.StandardCharsets -import extension.whisk.OpenWhiskProtocolBuilder -import extension.whisk.Predef._ +import org.apache.openwhisk.extension.whisk.OpenWhiskProtocolBuilder +import org.apache.openwhisk.extension.whisk.Predef._ import io.gatling.core.Predef._ import io.gatling.core.session.Expression import io.gatling.core.structure.ScenarioBuilder diff --git a/tests/performance/gatling_tests/src/gatling/scala/LatencySimulation.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/LatencySimulation.scala similarity index 98% rename from tests/performance/gatling_tests/src/gatling/scala/LatencySimulation.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/LatencySimulation.scala index 8830c78cf93..34eeee23fc7 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/LatencySimulation.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/LatencySimulation.scala @@ -15,10 +15,12 @@ * limitations under the License. */ +package org.apache.openwhisk + import java.nio.charset.StandardCharsets import java.util.Base64 -import extension.whisk.Predef._ +import org.apache.openwhisk.extension.whisk.Predef._ import io.gatling.core.Predef._ import io.gatling.core.session.Expression import io.gatling.core.util.Resource diff --git a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskActionBuilder.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskActionBuilder.scala similarity index 99% rename from tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskActionBuilder.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskActionBuilder.scala index 56dc6ceafb7..9bb832ef09b 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskActionBuilder.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskActionBuilder.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package extension.whisk +package org.apache.openwhisk.extension.whisk import io.gatling.core.Predef._ import io.gatling.core.action.Action diff --git a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskDsl.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskDsl.scala similarity index 95% rename from tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskDsl.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskDsl.scala index ea51847433b..464ea271fef 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskDsl.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskDsl.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package extension.whisk +package org.apache.openwhisk.extension.whisk import io.gatling.core.session.Expression diff --git a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskProtocolBuilder.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskProtocolBuilder.scala similarity index 98% rename from tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskProtocolBuilder.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskProtocolBuilder.scala index 5be69750a0f..a3564e98b76 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/OpenWhiskProtocolBuilder.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/OpenWhiskProtocolBuilder.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package extension.whisk +package org.apache.openwhisk.extension.whisk import java.net.URL diff --git a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/Predef.scala b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/Predef.scala similarity index 94% rename from tests/performance/gatling_tests/src/gatling/scala/extension/whisk/Predef.scala rename to tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/Predef.scala index 5733f7d24cd..45eb5483d79 100644 --- a/tests/performance/gatling_tests/src/gatling/scala/extension/whisk/Predef.scala +++ b/tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/extension/whisk/Predef.scala @@ -15,6 +15,6 @@ * limitations under the License. */ -package extension.whisk +package org.apache.openwhisk.extension.whisk object Predef extends OpenWhiskDsl diff --git a/tests/src/test/resources/application.conf.j2 b/tests/src/test/resources/application.conf.j2 index ec40eb17e2f..517727eff1d 100644 --- a/tests/src/test/resources/application.conf.j2 +++ b/tests/src/test/resources/application.conf.j2 @@ -2,8 +2,8 @@ # license agreements; and to You under the Apache License, Version 2.0. whisk.spi { - SimpleSpi = whisk.spi.SimpleSpiImpl - MissingSpi = whisk.spi.MissingImpl + SimpleSpi = org.apache.openwhisk.spi.SimpleSpiImpl + MissingSpi = org.apache.openwhisk.spi.MissingImpl MissingModule = missing.module } diff --git a/tests/src/test/scala/actionContainers/ActionContainer.scala b/tests/src/test/scala/actionContainers/ActionContainer.scala index d5826596667..b5a6e391aad 100644 --- a/tests/src/test/scala/actionContainers/ActionContainer.scala +++ b/tests/src/test/scala/actionContainers/ActionContainer.scala @@ -39,11 +39,11 @@ import akka.actor.ActorSystem import scala.concurrent.ExecutionContext import spray.json._ import common.StreamLogging -import whisk.common.Logging -import whisk.common.TransactionId -import whisk.core.entity.Exec +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Exec import common.WhiskProperties -import whisk.core.containerpool.Container +import org.apache.openwhisk.core.containerpool.Container /** * For testing convenience, this interface abstracts away the REST calls to a @@ -236,7 +236,7 @@ object ActionContainer { implicit val transid = TransactionId.testing - whisk.core.containerpool.AkkaContainerClient.post(host, port, endPoint, content, 30.seconds) + org.apache.openwhisk.core.containerpool.AkkaContainerClient.post(host, port, endPoint, content, 30.seconds) } private def concurrentSyncPost(host: String, port: Int, endPoint: String, contents: Seq[JsValue])( implicit logging: Logging, @@ -244,7 +244,8 @@ object ActionContainer { implicit val transid = TransactionId.testing - whisk.core.containerpool.AkkaContainerClient.concurrentPost(host, port, endPoint, contents, 30.seconds) + org.apache.openwhisk.core.containerpool.AkkaContainerClient + .concurrentPost(host, port, endPoint, contents, 30.seconds) } } diff --git a/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala b/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala index 957909bad1a..a94f96db44d 100644 --- a/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala +++ b/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala @@ -178,7 +178,7 @@ abstract class ApiGwEndToEndTests val start = java.lang.System.currentTimeMillis val apiToInvoke = s"$swaggerapiurl?$urlqueryparam=$urlqueryvalue&guid=$start" println(s"Invoking: '${apiToInvoke}'") - val response = whisk.utils.retry({ + val response = org.apache.openwhisk.utils.retry({ val response = RestAssured.given().config(sslconfig).get(s"$apiToInvoke") println("URL invocation response status: " + response.statusCode) response.statusCode should be(200) diff --git a/tests/src/test/scala/common/JsHelpers.scala b/tests/src/test/scala/common/JsHelpers.scala index f4732bb1442..31f68b5014d 100644 --- a/tests/src/test/scala/common/JsHelpers.scala +++ b/tests/src/test/scala/common/JsHelpers.scala @@ -29,11 +29,11 @@ import spray.json.JsValue trait JsHelpers { implicit class JsObjectHelper(js: JsObject) { def getFieldPath(path: String*): Option[JsValue] = { - whisk.utils.JsHelpers.getFieldPath(js, path.toList) + org.apache.openwhisk.utils.JsHelpers.getFieldPath(js, path.toList) } def fieldPathExists(path: String*): Boolean = { - whisk.utils.JsHelpers.fieldPathExists(js, path.toList) + org.apache.openwhisk.utils.JsHelpers.fieldPathExists(js, path.toList) } } } diff --git a/tests/src/test/scala/common/SimpleExec.scala b/tests/src/test/scala/common/SimpleExec.scala index 34f9e9adcc8..7151953810d 100644 --- a/tests/src/test/scala/common/SimpleExec.scala +++ b/tests/src/test/scala/common/SimpleExec.scala @@ -17,7 +17,7 @@ package common -import whisk.common.{Logging, TransactionId} +import org.apache.openwhisk.common.{Logging, TransactionId} import scala.sys.process.{stringSeqToProcess, ProcessLogger} diff --git a/tests/src/test/scala/common/StreamLogging.scala b/tests/src/test/scala/common/StreamLogging.scala index e923bb3234f..4e30e46b6a0 100644 --- a/tests/src/test/scala/common/StreamLogging.scala +++ b/tests/src/test/scala/common/StreamLogging.scala @@ -20,8 +20,8 @@ package common import java.io.ByteArrayOutputStream import java.io.PrintStream -import whisk.common.Logging -import whisk.common.PrintStreamLogging +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.common.PrintStreamLogging import java.nio.charset.StandardCharsets /** diff --git a/tests/src/test/scala/common/WskCliOperations.scala b/tests/src/test/scala/common/WskCliOperations.scala index 259ca9d7b20..3996a40e323 100644 --- a/tests/src/test/scala/common/WskCliOperations.scala +++ b/tests/src/test/scala/common/WskCliOperations.scala @@ -33,8 +33,8 @@ import scala.util.Try import common.TestUtils._ import spray.json.JsObject import spray.json.JsValue -import whisk.core.entity.ByteSize -import whisk.utils.retry +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.utils.retry import FullyQualifiedNames.fqn import FullyQualifiedNames.resolve diff --git a/tests/src/test/scala/common/WskOperations.scala b/tests/src/test/scala/common/WskOperations.scala index 5fb020eab79..8e8ecaca95b 100644 --- a/tests/src/test/scala/common/WskOperations.scala +++ b/tests/src/test/scala/common/WskOperations.scala @@ -27,7 +27,7 @@ import scala.concurrent.duration.Duration import scala.language.postfixOps import TestUtils._ import spray.json._ -import whisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.ByteSize import scala.util.Try diff --git a/tests/src/test/scala/common/WskTestHelpers.scala b/tests/src/test/scala/common/WskTestHelpers.scala index 31e3d7cd8c1..12a9f4db3be 100644 --- a/tests/src/test/scala/common/WskTestHelpers.scala +++ b/tests/src/test/scala/common/WskTestHelpers.scala @@ -213,7 +213,7 @@ trait WskTestHelpers extends Matchers { val rr = cli.sanitize(n)(wskprops) rr.exitCode match { case CONFLICT | StatusCodes.Conflict.intValue => - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ println("package deletion conflict, view computation delay likely, retrying...") cli.delete(n)(wskprops) }, 5, Some(1.second)) diff --git a/tests/src/test/scala/common/WskTracingTests.scala b/tests/src/test/scala/common/WskTracingTests.scala index a48c12e5cdf..a4893c8ff3a 100644 --- a/tests/src/test/scala/common/WskTracingTests.scala +++ b/tests/src/test/scala/common/WskTracingTests.scala @@ -23,9 +23,9 @@ import com.github.benmanes.caffeine.cache.Ticker import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import pureconfig.loadConfigOrThrow -import whisk.common.{LoggingMarkers, TransactionId} -import whisk.common.tracing.{OpenTracer, TracingConfig} -import whisk.core.ConfigKeys +import org.apache.openwhisk.common.{LoggingMarkers, TransactionId} +import org.apache.openwhisk.common.tracing.{OpenTracer, TracingConfig} +import org.apache.openwhisk.core.ConfigKeys import scala.ref.WeakReference import org.scalatest.{Matchers, TestData} diff --git a/tests/src/test/scala/common/rest/WskRestOperations.scala b/tests/src/test/scala/common/rest/WskRestOperations.scala index 66f6ef200c7..2c596121efe 100644 --- a/tests/src/test/scala/common/rest/WskRestOperations.scala +++ b/tests/src/test/scala/common/rest/WskRestOperations.scala @@ -64,8 +64,8 @@ import common.TestUtils.RunResult import common.WaitFor import common.WhiskProperties import common.WskProps -import whisk.core.entity.ByteSize -import whisk.utils.retry +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.utils.retry import javax.net.ssl._ import com.typesafe.sslconfig.akka.AkkaSSLConfig import java.nio.charset.StandardCharsets @@ -74,8 +74,8 @@ import java.security.KeyStore import akka.actor.ActorSystem import akka.util.ByteString import pureconfig.loadConfigOrThrow -import whisk.common.Https.HttpsConfig -import whisk.common.AkkaLogging +import org.apache.openwhisk.common.Https.HttpsConfig +import org.apache.openwhisk.common.AkkaLogging class AcceptAllHostNameVerifier extends HostnameVerifier { override def verify(s: String, sslSession: SSLSession): Boolean = true diff --git a/tests/src/test/scala/ha/CacheInvalidationTests.scala b/tests/src/test/scala/ha/CacheInvalidationTests.scala index 9841a5e3f46..bc268364ace 100644 --- a/tests/src/test/scala/ha/CacheInvalidationTests.scala +++ b/tests/src/test/scala/ha/CacheInvalidationTests.scala @@ -37,7 +37,7 @@ import common.WskTestHelpers import common.rest.HttpConnection import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.WhiskConfig +import org.apache.openwhisk.core.WhiskConfig import pureconfig.loadConfigOrThrow @RunWith(classOf[JUnitRunner]) @@ -67,7 +67,7 @@ class CacheInvalidationTests extends FlatSpec with Matchers with WskTestHelpers val timeout = 15.seconds - def retry[T](fn: => T) = whisk.utils.retry(fn, 15, Some(1.second)) + def retry[T](fn: => T) = org.apache.openwhisk.utils.retry(fn, 15, Some(1.second)) def updateAction(name: String, code: String, controllerInstance: Int = 0) = { val body = JsObject( diff --git a/tests/src/test/scala/ha/ShootComponentsTests.scala b/tests/src/test/scala/ha/ShootComponentsTests.scala index 48070614fde..b6147eaa251 100644 --- a/tests/src/test/scala/ha/ShootComponentsTests.scala +++ b/tests/src/test/scala/ha/ShootComponentsTests.scala @@ -37,11 +37,11 @@ import common.rest.{HttpConnection, WskRestOperations} import pureconfig._ import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.WhiskConfig -import whisk.core.ConfigKeys -import whisk.core.database.CouchDbConfig -import whisk.core.database.test.ExtendedCouchDbRestClient -import whisk.utils.retry +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.CouchDbConfig +import org.apache.openwhisk.core.database.test.ExtendedCouchDbRestClient +import org.apache.openwhisk.utils.retry @RunWith(classOf[JUnitRunner]) class ShootComponentsTests diff --git a/tests/src/test/scala/limits/ThrottleTests.scala b/tests/src/test/scala/limits/ThrottleTests.scala index 4c4bb18bf01..1e020d787ed 100644 --- a/tests/src/test/scala/limits/ThrottleTests.scala +++ b/tests/src/test/scala/limits/ThrottleTests.scala @@ -37,9 +37,9 @@ import common.rest.WskRestOperations import common.WskAdmin.wskadmin import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.http.Messages._ -import whisk.utils.ExecutionContextFactory -import whisk.utils.retry +import org.apache.openwhisk.http.Messages._ +import org.apache.openwhisk.utils.ExecutionContextFactory +import org.apache.openwhisk.utils.retry import scala.util.{Success, Try} diff --git a/tests/src/test/scala/whisk/common/ConfigTests.scala b/tests/src/test/scala/org/apache/openwhisk/common/ConfigTests.scala similarity index 98% rename from tests/src/test/scala/whisk/common/ConfigTests.scala rename to tests/src/test/scala/org/apache/openwhisk/common/ConfigTests.scala index afd50e222b0..ea0485065e7 100644 --- a/tests/src/test/scala/whisk/common/ConfigTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/common/ConfigTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import org.junit.runner.RunWith import org.scalatest.FlatSpec diff --git a/tests/src/test/scala/whisk/common/ForcibleSemaphoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/common/ForcibleSemaphoreTests.scala similarity index 98% rename from tests/src/test/scala/whisk/common/ForcibleSemaphoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/common/ForcibleSemaphoreTests.scala index 87cea2e2769..cb4939dc4f1 100644 --- a/tests/src/test/scala/whisk/common/ForcibleSemaphoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/common/ForcibleSemaphoreTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import org.junit.runner.RunWith import org.scalatest.{FlatSpec, Matchers} diff --git a/tests/src/test/scala/whisk/common/RunCliCmdTests.scala b/tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala similarity index 98% rename from tests/src/test/scala/whisk/common/RunCliCmdTests.scala rename to tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala index 548aa0603e4..bbcab377ac9 100644 --- a/tests/src/test/scala/whisk/common/RunCliCmdTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.io.File diff --git a/tests/src/test/scala/whisk/common/SchedulerTests.scala b/tests/src/test/scala/org/apache/openwhisk/common/SchedulerTests.scala similarity index 99% rename from tests/src/test/scala/whisk/common/SchedulerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/common/SchedulerTests.scala index 35eaf68d70a..d620486638d 100644 --- a/tests/src/test/scala/whisk/common/SchedulerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/common/SchedulerTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.time.Instant diff --git a/tests/src/test/scala/whisk/common/UserEventTests.scala b/tests/src/test/scala/org/apache/openwhisk/common/UserEventTests.scala similarity index 93% rename from tests/src/test/scala/whisk/common/UserEventTests.scala rename to tests/src/test/scala/org/apache/openwhisk/common/UserEventTests.scala index e9bec969b1d..f32125491c0 100644 --- a/tests/src/test/scala/whisk/common/UserEventTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/common/UserEventTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.common +package org.apache.openwhisk.common import java.nio.charset.StandardCharsets @@ -25,9 +25,9 @@ import common.rest.WskRestOperations import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers} -import whisk.connector.kafka.KafkaConsumerConnector -import whisk.core.WhiskConfig -import whisk.core.connector.{Activation, EventMessage, Metric} +import org.apache.openwhisk.connector.kafka.KafkaConsumerConnector +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.{Activation, EventMessage, Metric} import scala.concurrent.duration._ diff --git a/tests/src/test/scala/whisk/core/WhiskConfigTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/WhiskConfigTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/WhiskConfigTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/WhiskConfigTests.scala index bf02990fb55..3324ced55db 100644 --- a/tests/src/test/scala/whisk/core/WhiskConfigTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/WhiskConfigTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core +package org.apache.openwhisk.core import java.io.BufferedWriter import java.io.File diff --git a/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/admin/WskAdminTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/admin/WskAdminTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/admin/WskAdminTests.scala index 353e19996be..a87542a45e4 100644 --- a/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/admin/WskAdminTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.admin +package org.apache.openwhisk.core.admin import common.WskAdmin.wskadmin import common._ @@ -23,7 +23,7 @@ import common.rest.WskRestOperations import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfterAll, Matchers} import org.scalatest.junit.JUnitRunner -import whisk.core.entity.{BasicAuthenticationAuthKey, Subject} +import org.apache.openwhisk.core.entity.{BasicAuthenticationAuthKey, Subject} import common.TestHelpers import scala.concurrent.duration.DurationInt @@ -70,7 +70,7 @@ class WskAdminTests extends TestHelpers with WskActorSystem with Matchers with B wskadmin.cli(Seq("user", "whois", authkey)).stdout.trim should be( Seq(s"subject: $subject", s"namespace: $subject").mkString("\n")) - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ // reverse lookup by namespace wskadmin.cli(Seq("user", "list", "-k", subject)).stdout.trim should be(authkey) }, 10, Some(1.second)) @@ -81,7 +81,7 @@ class WskAdminTests extends TestHelpers with WskActorSystem with Matchers with B val newspace = s"${subject}.myspace" wskadmin.cli(Seq("user", "create", subject, "-ns", newspace, "-u", auth.compact)) - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ // reverse lookup by namespace wskadmin.cli(Seq("user", "list", "-k", newspace)).stdout.trim should be(auth.compact) }, 10, Some(1.second)) @@ -129,7 +129,7 @@ class WskAdminTests extends TestHelpers with WskActorSystem with Matchers with B wskadmin.cli(Seq("user", "create", subject1, "-ns", commonNamespace, "-u", auth.compact)) wskadmin.cli(Seq("user", "create", subject2, "-ns", commonNamespace)) - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ // reverse lookup by namespace val out = wskadmin.cli(Seq("user", "list", "-p", "2", "-k", commonNamespace)).stdout.trim out should include(auth.compact) @@ -140,7 +140,7 @@ class WskAdminTests extends TestHelpers with WskActorSystem with Matchers with B wskadmin.cli(Seq("user", "block", subject1)) // wait until the user can no longer be found - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ wskadmin.cli(Seq("user", "list", "-p", "2", "-k", commonNamespace)).stdout.trim.lines should have size 1 }, 10, Some(1.second)) @@ -148,7 +148,7 @@ class WskAdminTests extends TestHelpers with WskActorSystem with Matchers with B wskadmin.cli(Seq("user", "unblock", subject1)) // wait until the user can be found again - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ val out = wskadmin.cli(Seq("user", "list", "-p", "2", "-k", commonNamespace)).stdout.trim out should include(auth.compact) out.lines should have size 2 diff --git a/tests/src/test/scala/whisk/core/apigw/actions/test/ApiGwRestRoutemgmtActionTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/apigw/actions/test/ApiGwRestRoutemgmtActionTests.scala similarity index 95% rename from tests/src/test/scala/whisk/core/apigw/actions/test/ApiGwRestRoutemgmtActionTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/apigw/actions/test/ApiGwRestRoutemgmtActionTests.scala index 32584fc3257..d43a8a18d2f 100644 --- a/tests/src/test/scala/whisk/core/apigw/actions/test/ApiGwRestRoutemgmtActionTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/apigw/actions/test/ApiGwRestRoutemgmtActionTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.apigw.actions.test +package org.apache.openwhisk.core.apigw.actions.test import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner diff --git a/tests/src/test/scala/whisk/core/apigw/actions/test/ApiGwRoutemgmtActionTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/apigw/actions/test/ApiGwRoutemgmtActionTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/apigw/actions/test/ApiGwRoutemgmtActionTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/apigw/actions/test/ApiGwRoutemgmtActionTests.scala index a2f09fed7f4..b2c053b61e0 100644 --- a/tests/src/test/scala/whisk/core/apigw/actions/test/ApiGwRoutemgmtActionTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/apigw/actions/test/ApiGwRoutemgmtActionTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.apigw.actions.test +package org.apache.openwhisk.core.apigw.actions.test import org.junit.runner.RunWith import org.scalatest.BeforeAndAfterAll diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwRestBasicTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwRestBasicTests.scala index 5b31cc6dfa0..3d5306aab04 100644 --- a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwRestBasicTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import java.io.File import java.io.BufferedWriter diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwRestTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwRestTests.scala index ec212ce8c76..fad4158b3b5 100644 --- a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwRestTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import akka.http.scaladsl.model.StatusCodes.OK import org.junit.runner.RunWith diff --git a/tests/src/test/scala/whisk/core/cli/test/BaseApiGwTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/cli/test/BaseApiGwTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala index 5ebb00ccf97..1a74f01fa4e 100644 --- a/tests/src/test/scala/whisk/core/cli/test/BaseApiGwTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import java.io.File import java.time.Instant diff --git a/tests/src/test/scala/whisk/core/cli/test/TestJsonArgs.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/TestJsonArgs.scala similarity index 99% rename from tests/src/test/scala/whisk/core/cli/test/TestJsonArgs.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/TestJsonArgs.scala index 474e8209c1f..7bf50c7cbcb 100644 --- a/tests/src/test/scala/whisk/core/cli/test/TestJsonArgs.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/TestJsonArgs.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import spray.json.JsObject import spray.json.JsArray diff --git a/tests/src/test/scala/whisk/core/cli/test/WskActionSequenceTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskActionSequenceTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/cli/test/WskActionSequenceTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskActionSequenceTests.scala index 5c9705e0a9a..01906b9a27e 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskActionSequenceTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskActionSequenceTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @@ -27,7 +27,7 @@ import common.WskProps import common.WskTestHelpers import TestUtils.RunResult import spray.json._ -import whisk.core.entity.EntityPath +import org.apache.openwhisk.core.entity.EntityPath /** * Tests creation and retrieval of a sequence action diff --git a/tests/src/test/scala/whisk/core/cli/test/WskEntitlementTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskEntitlementTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/cli/test/WskEntitlementTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskEntitlementTests.scala index 64a77937c1e..f20a044d9ad 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskEntitlementTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskEntitlementTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import org.junit.runner.RunWith import org.scalatest.BeforeAndAfterAll @@ -29,8 +29,8 @@ import common.WskProps import common.WskTestHelpers import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.entity.Subject -import whisk.core.entity.WhiskPackage +import org.apache.openwhisk.core.entity.Subject +import org.apache.openwhisk.core.entity.WhiskPackage import scala.concurrent.duration._ @RunWith(classOf[JUnitRunner]) @@ -47,7 +47,7 @@ abstract class WskEntitlementTests extends TestHelpers with WskTestHelpers with disposeAdditionalTestSubject(guestWskProps.namespace) } - def retry[A](block: => A) = whisk.utils.retry(block, 10, Some(500.milliseconds)) + def retry[A](block: => A) = org.apache.openwhisk.utils.retry(block, 10, Some(500.milliseconds)) val samplePackage = "samplePackage" val sampleAction = "sampleAction" diff --git a/tests/src/test/scala/whisk/core/cli/test/WskRestActionSequenceTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestActionSequenceTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/cli/test/WskRestActionSequenceTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestActionSequenceTests.scala index 0cc21edadf8..0634dbac844 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskRestActionSequenceTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestActionSequenceTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner diff --git a/tests/src/test/scala/whisk/core/cli/test/WskRestBasicUsageTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/cli/test/WskRestBasicUsageTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala index 097ed25a01e..bc6d8962659 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskRestBasicUsageTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import akka.http.scaladsl.model.StatusCodes.NotFound import akka.http.scaladsl.model.StatusCodes.OK @@ -40,10 +40,10 @@ import common.WskActorSystem import common.rest.WskRestOperations import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.entity._ -import whisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size.SizeInt import TestJsonArgs._ -import whisk.http.Messages +import org.apache.openwhisk.http.Messages /** * Tests for basic CLI usage. Some of these tests require a deployed backend. diff --git a/tests/src/test/scala/whisk/core/cli/test/WskRestEntitlementTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestEntitlementTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/cli/test/WskRestEntitlementTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestEntitlementTests.scala index ccbc1679e25..5a5d13ff0b3 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskRestEntitlementTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestEntitlementTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import akka.http.scaladsl.model.StatusCodes.BadGateway import akka.http.scaladsl.model.StatusCodes.Forbidden diff --git a/tests/src/test/scala/whisk/core/cli/test/WskWebActionsTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskWebActionsTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/cli/test/WskWebActionsTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskWebActionsTests.scala index 493ce0a944a..f425d40c083 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskWebActionsTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskWebActionsTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli.test +package org.apache.openwhisk.core.cli.test import java.nio.charset.StandardCharsets import java.util.Base64 @@ -31,9 +31,9 @@ import common.rest.WskRestOperations import spray.json._ import spray.json.DefaultJsonProtocol._ import system.rest.RestUtil -import whisk.common.PrintStreamLogging -import whisk.common.TransactionId -import whisk.core.entity.Subject +import org.apache.openwhisk.common.PrintStreamLogging +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.Subject /** * Tests web actions. diff --git a/tests/src/test/scala/whisk/core/connector/test/EventMessageTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/connector/test/EventMessageTests.scala similarity index 94% rename from tests/src/test/scala/whisk/core/connector/test/EventMessageTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/connector/test/EventMessageTests.scala index a9fe2a922c6..bf59c674864 100644 --- a/tests/src/test/scala/whisk/core/connector/test/EventMessageTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/connector/test/EventMessageTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.connector.test +package org.apache.openwhisk.core.connector.test import java.time.Instant @@ -24,9 +24,9 @@ import org.scalatest.{FlatSpec, Matchers} import org.scalatest.junit.JUnitRunner import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.connector.Activation -import whisk.core.entity._ -import whisk.core.entity.size._ +import org.apache.openwhisk.core.connector.Activation +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ import scala.concurrent.duration._ import scala.util.Success diff --git a/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/connector/test/MessageFeedTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/connector/test/MessageFeedTests.scala index 67e66e85923..9e7e56611a0 100644 --- a/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/connector/test/MessageFeedTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.connector.test +package org.apache.openwhisk.core.connector.test import java.util.concurrent.atomic.AtomicInteger @@ -40,9 +40,9 @@ import akka.actor.PoisonPill import akka.actor.Props import akka.testkit.TestKit import common.StreamLogging -import whisk.core.connector._ -import whisk.core.connector.MessageFeed._ -import whisk.utils.retry +import org.apache.openwhisk.core.connector._ +import org.apache.openwhisk.core.connector.MessageFeed._ +import org.apache.openwhisk.utils.retry @RunWith(classOf[JUnitRunner]) class MessageFeedTests diff --git a/tests/src/test/scala/whisk/core/connector/test/TestConnector.scala b/tests/src/test/scala/org/apache/openwhisk/core/connector/test/TestConnector.scala similarity index 92% rename from tests/src/test/scala/whisk/core/connector/test/TestConnector.scala rename to tests/src/test/scala/org/apache/openwhisk/core/connector/test/TestConnector.scala index 67faeab0b53..451faff7171 100644 --- a/tests/src/test/scala/whisk/core/connector/test/TestConnector.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/connector/test/TestConnector.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.connector.test +package org.apache.openwhisk.core.connector.test import java.util.ArrayList import java.util.concurrent.LinkedBlockingQueue @@ -28,10 +28,10 @@ import org.apache.kafka.clients.producer.RecordMetadata import org.apache.kafka.common.TopicPartition import common.StreamLogging -import whisk.common.Counter -import whisk.core.connector.Message -import whisk.core.connector.MessageConsumer -import whisk.core.connector.MessageProducer +import org.apache.openwhisk.common.Counter +import org.apache.openwhisk.core.connector.Message +import org.apache.openwhisk.core.connector.MessageConsumer +import org.apache.openwhisk.core.connector.MessageProducer class TestConnector(topic: String, override val maxPeek: Int, allowMoreThanMax: Boolean) extends MessageConsumer diff --git a/tests/src/test/scala/whisk/core/connector/tests/AcknowledgementMessageTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/connector/tests/AcknowledgementMessageTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/connector/tests/AcknowledgementMessageTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/connector/tests/AcknowledgementMessageTests.scala index c82fc664388..8e41bcdd985 100644 --- a/tests/src/test/scala/whisk/core/connector/tests/AcknowledgementMessageTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/connector/tests/AcknowledgementMessageTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.connector.tests +package org.apache.openwhisk.core.connector.tests import java.time.Instant @@ -23,10 +23,10 @@ import org.junit.runner.RunWith import org.scalatest.{FlatSpec, Matchers} import org.scalatest.junit.JUnitRunner import spray.json._ -import whisk.common.TransactionId -import whisk.core.connector.{AcknowledegmentMessage, CompletionMessage, ResultMessage} -import whisk.core.entity._ -import whisk.core.entity.size.SizeInt +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.connector.{AcknowledegmentMessage, CompletionMessage, ResultMessage} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size.SizeInt import scala.concurrent.duration.DurationInt import scala.util.Success diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/AkkaContainerClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/AkkaContainerClientTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/AkkaContainerClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/AkkaContainerClientTests.scala index 1afdeb2f74f..3c6b14e44f3 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/AkkaContainerClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/AkkaContainerClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import common.StreamLogging import common.WskActorSystem @@ -37,10 +37,10 @@ import scala.concurrent.Await import scala.concurrent.TimeoutException import scala.concurrent.duration._ import spray.json.JsObject -import whisk.common.TransactionId -import whisk.core.containerpool.AkkaContainerClient -import whisk.core.entity.ActivationResponse._ -import whisk.core.entity.size._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.AkkaContainerClient +import org.apache.openwhisk.core.entity.ActivationResponse._ +import org.apache.openwhisk.core.entity.size._ /** * Unit tests for AkkaContainerClientTests which communicate with containers. diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/ApacheBlockingContainerClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/ApacheBlockingContainerClientTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/ApacheBlockingContainerClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/ApacheBlockingContainerClientTests.scala index a38fa522af3..46759535ca0 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/ApacheBlockingContainerClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/ApacheBlockingContainerClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import java.nio.charset.StandardCharsets import java.time.Instant @@ -37,12 +37,12 @@ import common.StreamLogging import common.WskActorSystem import org.apache.http.conn.HttpHostConnectException import scala.concurrent.Await -import whisk.common.TransactionId -import whisk.core.containerpool.ApacheBlockingContainerClient -import whisk.core.containerpool.RetryableConnectionError -import whisk.core.entity.ActivationResponse.Timeout -import whisk.core.entity.size._ -import whisk.core.entity.ActivationResponse._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.ApacheBlockingContainerClient +import org.apache.openwhisk.core.containerpool.RetryableConnectionError +import org.apache.openwhisk.core.entity.ActivationResponse.Timeout +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.entity.ActivationResponse._ /** * Unit tests for ApacheBlockingContainerClient which communicate with containers. diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerClientTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerClientTests.scala index 66637f89de9..1633a027aee 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import akka.actor.ActorSystem import java.util.concurrent.Semaphore @@ -35,13 +35,13 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.Matchers import org.scalatest.time.{Seconds, Span} import common.{StreamLogging, WskActorSystem} -import whisk.common.LogMarker -import whisk.common.LoggingMarkers.INVOKER_DOCKER_CMD -import whisk.common.TransactionId -import whisk.core.containerpool.ContainerAddress -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.docker._ -import whisk.utils.retry +import org.apache.openwhisk.common.LogMarker +import org.apache.openwhisk.common.LoggingMarkers.INVOKER_DOCKER_CMD +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.docker._ +import org.apache.openwhisk.utils.retry @RunWith(classOf[JUnitRunner]) class DockerClientTests diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientWithFileAccessTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerClientWithFileAccessTests.scala similarity index 94% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientWithFileAccessTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerClientWithFileAccessTests.scala index d960c86b920..a3936ac6605 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientWithFileAccessTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerClientWithFileAccessTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import java.io.File @@ -35,10 +35,10 @@ import org.scalatest.Matchers import common.{StreamLogging, WskActorSystem} import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.ContainerAddress -import whisk.core.containerpool.docker.DockerClientWithFileAccess +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.core.containerpool.docker.DockerClientWithFileAccess @RunWith(classOf[JUnitRunner]) class DockerClientWithFileAccessTestsIp diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala similarity index 82% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala index f32d01801bd..80b400d781a 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import common.StreamLogging import common.TimingHelpers @@ -29,17 +29,17 @@ import org.scalatest.junit.JUnitRunner import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.containerpool.ContainerAddress -import whisk.core.containerpool.ContainerArgsConfig -import whisk.core.containerpool.ContainerId -import whisk.core.containerpool.docker.DockerApiWithFileAccess -import whisk.core.containerpool.docker.DockerContainerFactory -import whisk.core.containerpool.docker.DockerContainerFactoryConfig -import whisk.core.containerpool.docker.RuncApi -import whisk.core.entity.{ByteSize, ExecManifest, InvokerInstanceId} -import whisk.core.entity.size._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.containerpool.ContainerAddress +import org.apache.openwhisk.core.containerpool.ContainerArgsConfig +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.core.containerpool.docker.DockerApiWithFileAccess +import org.apache.openwhisk.core.containerpool.docker.DockerContainerFactory +import org.apache.openwhisk.core.containerpool.docker.DockerContainerFactoryConfig +import org.apache.openwhisk.core.containerpool.docker.RuncApi +import org.apache.openwhisk.core.entity.{ByteSize, ExecManifest, InvokerInstanceId} +import org.apache.openwhisk.core.entity.size._ @RunWith(classOf[JUnitRunner]) class DockerContainerFactoryTests diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerTests.scala index c0e5e376d82..1faa2539f89 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import java.io.IOException import java.time.Instant @@ -33,23 +33,23 @@ import org.junit.runner.RunWith import org.scalamock.scalatest.MockFactory import org.scalatest.BeforeAndAfterEach import org.scalatest.FlatSpec -import whisk.core.containerpool.logging.{DockerToActivationLogStore, LogLine} +import org.apache.openwhisk.core.containerpool.logging.{DockerToActivationLogStore, LogLine} import org.scalatest.junit.JUnitRunner import org.scalatest.Matchers import common.{StreamLogging, WskActorSystem} import spray.json._ -import whisk.common.LoggingMarkers._ -import whisk.common.LogMarker -import whisk.common.TransactionId -import whisk.core.containerpool._ -import whisk.core.containerpool.docker._ -import whisk.core.entity.ActivationResponse -import whisk.core.entity.ActivationResponse.ContainerResponse -import whisk.core.entity.ActivationResponse.Timeout -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.common.LoggingMarkers._ +import org.apache.openwhisk.common.LogMarker +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.containerpool.docker._ +import org.apache.openwhisk.core.entity.ActivationResponse +import org.apache.openwhisk.core.entity.ActivationResponse.ContainerResponse +import org.apache.openwhisk.core.entity.ActivationResponse.Timeout +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages import DockerContainerTests._ -import whisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.core.entity.ExecManifest.ImageName object DockerContainerTests { diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/ProcessRunnerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/ProcessRunnerTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/ProcessRunnerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/ProcessRunnerTests.scala index 519e0006c9f..359d00666b0 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/ProcessRunnerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/ProcessRunnerTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import akka.actor.ActorSystem import common.WskActorSystem @@ -25,7 +25,7 @@ import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.containerpool.docker._ +import org.apache.openwhisk.core.containerpool.docker._ import scala.concurrent.ExecutionContext import scala.concurrent.duration._ diff --git a/tests/src/test/scala/whisk/core/containerpool/docker/test/RuncClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/RuncClientTests.scala similarity index 90% rename from tests/src/test/scala/whisk/core/containerpool/docker/test/RuncClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/RuncClientTests.scala index f75207942e8..0c24a9f4f9d 100644 --- a/tests/src/test/scala/whisk/core/containerpool/docker/test/RuncClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/RuncClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.docker.test +package org.apache.openwhisk.core.containerpool.docker.test import akka.actor.ActorSystem @@ -28,14 +28,14 @@ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import org.scalatest.Matchers -import whisk.core.containerpool.docker.RuncClient +import org.apache.openwhisk.core.containerpool.docker.RuncClient import common.{StreamLogging, WskActorSystem} -import whisk.core.containerpool.ContainerId -import whisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.ContainerId +import org.apache.openwhisk.common.TransactionId import org.scalatest.BeforeAndAfterEach import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} -import whisk.common.LogMarker -import whisk.common.LoggingMarkers.INVOKER_RUNC_CMD +import org.apache.openwhisk.common.LogMarker +import org.apache.openwhisk.common.LoggingMarkers.INVOKER_RUNC_CMD @RunWith(classOf[JUnitRunner]) class RuncClientTests diff --git a/tests/src/test/scala/whisk/core/containerpool/kubernetes/test/KubernetesClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/KubernetesClientTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/containerpool/kubernetes/test/KubernetesClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/KubernetesClientTests.scala index 78f2d8a9065..74accbecb37 100644 --- a/tests/src/test/scala/whisk/core/containerpool/kubernetes/test/KubernetesClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/KubernetesClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.kubernetes.test +package org.apache.openwhisk.core.containerpool.kubernetes.test import java.time.Instant @@ -38,12 +38,12 @@ import org.scalatest.time.{Seconds, Span} import common.{StreamLogging, WskActorSystem} import okio.Buffer import spray.json.{JsObject, JsValue} -import whisk.common.TransactionId -import whisk.core.containerpool.{ContainerAddress, ContainerId} -import whisk.core.containerpool.kubernetes._ -import whisk.core.entity.ByteSize -import whisk.core.entity.size._ -import whisk.core.containerpool.Container.ACTIVATION_LOG_SENTINEL +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.{ContainerAddress, ContainerId} +import org.apache.openwhisk.core.containerpool.kubernetes._ +import org.apache.openwhisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.containerpool.Container.ACTIVATION_LOG_SENTINEL import scala.collection.mutable import scala.collection.immutable diff --git a/tests/src/test/scala/whisk/core/containerpool/kubernetes/test/KubernetesContainerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/KubernetesContainerTests.scala similarity index 95% rename from tests/src/test/scala/whisk/core/containerpool/kubernetes/test/KubernetesContainerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/KubernetesContainerTests.scala index 573b581dfe3..83041841cb9 100644 --- a/tests/src/test/scala/whisk/core/containerpool/kubernetes/test/KubernetesContainerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/KubernetesContainerTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.kubernetes.test +package org.apache.openwhisk.core.containerpool.kubernetes.test import java.io.IOException import java.time.{Instant, ZoneId} @@ -37,19 +37,19 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.Matchers import common.{StreamLogging, WskActorSystem} import spray.json._ -import whisk.common.LoggingMarkers._ -import whisk.common.LogMarker -import whisk.common.TransactionId -import whisk.core.containerpool._ -import whisk.core.containerpool.kubernetes._ -import whisk.core.containerpool.docker._ -import whisk.core.entity.{ActivationResponse, ByteSize} -import whisk.core.entity.size._ -import whisk.core.entity.ActivationResponse.ContainerResponse -import whisk.core.entity.ActivationResponse.Timeout -import whisk.core.entity.size._ -import whisk.http.Messages -import whisk.core.containerpool.docker.test.DockerContainerTests._ +import org.apache.openwhisk.common.LoggingMarkers._ +import org.apache.openwhisk.common.LogMarker +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.containerpool.kubernetes._ +import org.apache.openwhisk.core.containerpool.docker._ +import org.apache.openwhisk.core.entity.{ActivationResponse, ByteSize} +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.entity.ActivationResponse.ContainerResponse +import org.apache.openwhisk.core.entity.ActivationResponse.Timeout +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.containerpool.docker.test.DockerContainerTests._ import scala.collection.{immutable, mutable} diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala index 0d32b3263d0..07e96601df7 100644 --- a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import java.time.ZonedDateTime @@ -34,9 +34,9 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpecLike, Matchers} import pureconfig.error.ConfigReaderException import spray.json._ -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.database.UserContext +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Future, Promise} diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchRestClientTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchRestClientTests.scala index 2a43b795eb7..a813503c36c 100644 --- a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/ElasticSearchRestClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import spray.json._ @@ -35,7 +35,7 @@ import akka.http.scaladsl.model.HttpMethods.POST import common.StreamLogging -import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._ +import org.apache.openwhisk.core.containerpool.logging.ElasticSearchJsonProtocol._ import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Future, Promise} diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/LogDriverLogStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStoreTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/containerpool/logging/LogDriverLogStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStoreTests.scala index 1bd784b0c1c..7e689c73fd5 100644 --- a/tests/src/test/scala/whisk/core/containerpool/logging/LogDriverLogStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStoreTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import akka.actor.ActorSystem import akka.testkit.TestKit @@ -23,7 +23,7 @@ import org.junit.runner.RunWith import org.scalatest.FlatSpecLike import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner -import whisk.core.containerpool.ContainerArgsConfig +import org.apache.openwhisk.core.containerpool.ContainerArgsConfig @RunWith(classOf[JUnitRunner]) class LogDriverLogStoreTests extends TestKit(ActorSystem("LogDriverLogStore")) with FlatSpecLike with Matchers { diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/SplunkLogStoreTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/SplunkLogStoreTests.scala index c7d29351947..75826066ae0 100644 --- a/tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/SplunkLogStoreTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging +package org.apache.openwhisk.core.containerpool.logging import java.time.ZonedDateTime @@ -36,9 +36,9 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpecLike, Matchers} import pureconfig.error.ConfigReaderException import spray.json._ -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.database.UserContext +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Future, Promise} diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationFileLogStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/test/DockerToActivationFileLogStoreTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationFileLogStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/test/DockerToActivationFileLogStoreTests.scala index 8548cfc0174..db9c4e24375 100644 --- a/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationFileLogStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/test/DockerToActivationFileLogStoreTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.logging.test +package org.apache.openwhisk.core.containerpool.logging.test import java.time.Instant @@ -28,9 +28,9 @@ import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.TransactionId -import whisk.core.containerpool.logging.{DockerToActivationFileLogStore, LogLine} -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.containerpool.logging.{DockerToActivationFileLogStore, LogLine} +import org.apache.openwhisk.core.entity._ /** * Includes the tests for the DockerToActivationLogStore since the behavior towards the activation storage should diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala similarity index 89% rename from tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala index 287c20b61a2..349fc3131a3 100644 --- a/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala @@ -15,23 +15,27 @@ * limitations under the License. */ -package whisk.core.containerpool.logging.test +package org.apache.openwhisk.core.containerpool.logging.test import akka.actor.ActorSystem import common.{StreamLogging, WskActorSystem} import org.junit.runner.RunWith import org.scalatest.{FlatSpec, Matchers} import org.scalatest.junit.JUnitRunner -import whisk.core.containerpool.logging.{DockerToActivationLogStoreProvider, LogCollectingException, LogLine} -import whisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} -import whisk.core.entity._ +import org.apache.openwhisk.core.containerpool.logging.{ + DockerToActivationLogStoreProvider, + LogCollectingException, + LogLine +} +import org.apache.openwhisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} +import org.apache.openwhisk.core.entity._ import java.time.Instant import akka.stream.scaladsl.Source import akka.util.ByteString import spray.json._ -import whisk.common.{Logging, TransactionId} -import whisk.core.containerpool.{Container, ContainerAddress, ContainerId} -import whisk.http.Messages +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.containerpool.{Container, ContainerAddress, ContainerId} +import org.apache.openwhisk.http.Messages import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration._ diff --git a/tests/src/test/scala/whisk/core/containerpool/mesos/test/MesosContainerFactoryTest.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/mesos/test/MesosContainerFactoryTest.scala similarity index 92% rename from tests/src/test/scala/whisk/core/containerpool/mesos/test/MesosContainerFactoryTest.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/mesos/test/MesosContainerFactoryTest.scala index 695a84ccf58..3554c98e1f4 100644 --- a/tests/src/test/scala/whisk/core/containerpool/mesos/test/MesosContainerFactoryTest.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/mesos/test/MesosContainerFactoryTest.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.mesos.test +package org.apache.openwhisk.core.containerpool.mesos.test import akka.actor.ActorSystem import akka.stream.ActorMaterializer @@ -47,17 +47,18 @@ import scala.collection.immutable.Map import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.WhiskConfig._ -import whisk.core.containerpool.ContainerArgsConfig -import whisk.core.containerpool.ContainerPoolConfig -import whisk.core.containerpool.logging.DockerToActivationLogStore -import whisk.core.entity.ExecManifest.ImageName -import whisk.core.entity.size._ -import whisk.core.mesos.MesosConfig -import whisk.core.mesos.MesosContainerFactory -import whisk.core.mesos.MesosTimeoutConfig +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.WhiskConfig._ +import org.apache.openwhisk.core.containerpool.ContainerArgsConfig +import org.apache.openwhisk.core.containerpool.ContainerPoolConfig +import org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStore +import org.apache.openwhisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.mesos.MesosConfig +import org.apache.openwhisk.core.mesos.MesosContainerFactory +import org.apache.openwhisk.core.mesos.MesosTimeoutConfig + @RunWith(classOf[JUnitRunner]) class MesosContainerFactoryTest extends TestKit(ActorSystem("MesosActorSystem")) diff --git a/tests/src/test/scala/whisk/core/containerpool/test/ContainerArgsConfigTest.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerArgsConfigTest.scala similarity index 93% rename from tests/src/test/scala/whisk/core/containerpool/test/ContainerArgsConfigTest.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerArgsConfigTest.scala index 82ad2317e81..7edd3e81744 100644 --- a/tests/src/test/scala/whisk/core/containerpool/test/ContainerArgsConfigTest.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerArgsConfigTest.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.containerpool.test +package org.apache.openwhisk.core.containerpool.test import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import pureconfig._ -import whisk.core.ConfigKeys -import whisk.core.containerpool.ContainerArgsConfig +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.containerpool.ContainerArgsConfig @RunWith(classOf[JUnitRunner]) class ContainerArgsConfigTest extends FlatSpec with Matchers { diff --git a/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerPoolTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerPoolTests.scala index 78317ad196d..82e87703e64 100644 --- a/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerPoolTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.test +package org.apache.openwhisk.core.containerpool.test import java.time.Instant @@ -35,14 +35,14 @@ import akka.actor.ActorSystem import akka.testkit.ImplicitSender import akka.testkit.TestKit import akka.testkit.TestProbe -import whisk.common.TransactionId -import whisk.core.connector.ActivationMessage -import whisk.core.containerpool._ -import whisk.core.entity._ -import whisk.core.entity.ExecManifest.RuntimeManifest -import whisk.core.entity.ExecManifest.ImageName -import whisk.core.entity.size._ -import whisk.core.connector.MessageFeed +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.connector.ActivationMessage +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.ExecManifest.RuntimeManifest +import org.apache.openwhisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.connector.MessageFeed /** * Behavior tests for the ContainerPool diff --git a/tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala index 24ef264ca69..ff06bbec8a6 100644 --- a/tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.containerpool.test +package org.apache.openwhisk.core.containerpool.test import java.time.Instant @@ -30,15 +30,15 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Matchers} import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.{Logging, TransactionId} -import whisk.core.connector.ActivationMessage -import whisk.core.containerpool._ -import whisk.core.containerpool.logging.LogCollectingException -import whisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.http.Messages -import whisk.core.database.UserContext +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.connector.ActivationMessage +import org.apache.openwhisk.core.containerpool._ +import org.apache.openwhisk.core.containerpool.logging.LogCollectingException +import org.apache.openwhisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.database.UserContext import scala.concurrent.duration._ import scala.concurrent.{ExecutionContext, Future, Promise} diff --git a/tests/src/test/scala/whisk/core/controller/actions/test/SequenceAccountingTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/actions/test/SequenceAccountingTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/controller/actions/test/SequenceAccountingTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/actions/test/SequenceAccountingTests.scala index c7cf1c6fb63..b49fe09461d 100644 --- a/tests/src/test/scala/whisk/core/controller/actions/test/SequenceAccountingTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/actions/test/SequenceAccountingTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.actions.test +package org.apache.openwhisk.core.controller.actions.test import java.time.Instant @@ -28,11 +28,11 @@ import org.scalatest.junit.JUnitRunner import common.WskActorSystem import spray.json._ -import whisk.core.controller.actions.SequenceAccounting -import whisk.core.entity._ -import whisk.core.entity.ActivationResponse -import whisk.core.entity.size.SizeInt -import whisk.http.Messages +import org.apache.openwhisk.core.controller.actions.SequenceAccounting +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.ActivationResponse +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.http.Messages @RunWith(classOf[JUnitRunner]) class SequenceAccountingTests extends FlatSpec with Matchers with WskActorSystem { diff --git a/tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala index 31a996a2ed0..030381de04c 100644 --- a/tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import java.time.Instant @@ -29,16 +29,16 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport.sprayJsonUnmars import akka.http.scaladsl.server.Route import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.controller.WhiskActionsApi -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.entitlement.Collection -import whisk.http.ErrorResponse -import whisk.http.Messages -import whisk.core.database.UserContext +import org.apache.openwhisk.core.controller.WhiskActionsApi +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.database.UserContext import akka.http.scaladsl.model.headers.RawHeader -import whisk.core.entity.Attachments.Inline +import org.apache.openwhisk.core.entity.Attachments.Inline /** * Tests Actions API. diff --git a/tests/src/test/scala/whisk/core/controller/test/ActivationsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActivationsApiTests.scala similarity index 94% rename from tests/src/test/scala/whisk/core/controller/test/ActivationsApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActivationsApiTests.scala index 7d5bf8555ab..f540c6e352a 100644 --- a/tests/src/test/scala/whisk/core/controller/test/ActivationsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActivationsApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import java.time.{Clock, Instant} @@ -26,12 +26,12 @@ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.controller.WhiskActivationsApi -import whisk.core.entitlement.Collection -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.http.{ErrorResponse, Messages} -import whisk.core.database.UserContext +import org.apache.openwhisk.core.controller.WhiskActivationsApi +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.{ErrorResponse, Messages} +import org.apache.openwhisk.core.database.UserContext /** * Tests Activations API. @@ -61,7 +61,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi def checkCount(filter: String, expected: Int, user: Identity = creds) = { implicit val tid = transid() withClue(s"count did not match for filter: $filter") { - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath?count=true&$filter") ~> Route.seal(routes(user)) ~> check { status should be(OK) responseAs[JsObject] shouldBe JsObject(collection.path -> JsNumber(expected)) @@ -98,7 +98,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi (notExpectedActivations ++ activations).foreach(storeActivation(_, context)) waitOnListActivationsInNamespace(namespace, 2, context) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -114,7 +114,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi } // it should "list activations with explicit namespace owned by subject" in { - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"/$namespace/${collection.path}") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -144,12 +144,13 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi //// GET /activations?docs=true it should "return empty list when no activations exist" in { implicit val tid = transid() - whisk.utils.retry { // retry because view will be stale from previous test and result in null doc fields - Get(s"$collectionPath?docs=true") ~> Route.seal(routes(creds)) ~> check { - status should be(OK) - responseAs[List[JsObject]] shouldBe 'empty + org.apache.openwhisk.utils + .retry { // retry because view will be stale from previous test and result in null doc fields + Get(s"$collectionPath?docs=true") ~> Route.seal(routes(creds)) ~> check { + status should be(OK) + responseAs[List[JsObject]] shouldBe 'empty + } } - } } it should "get full activation by namespace" in { @@ -182,7 +183,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi waitOnListActivationsInNamespace(namespace, 2, context) checkCount("", 2) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath?docs=true") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -264,7 +265,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi checkCount(filter, expected.length) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath?docs=true&$filter") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -280,7 +281,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi checkCount(filter, expected.length) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath?docs=true&$filter") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -291,7 +292,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi } { // get 'since' with no defined upto value should return all activation 'since' - whisk.utils.retry { + org.apache.openwhisk.utils.retry { val expected = activations.filter(e => e.start.equals(since) || e.start.isAfter(since)) val filter = s"since=${since.toEpochMilli}" @@ -371,7 +372,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi context) checkCount("name=xyz", activations.length) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath?name=xyz") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -382,7 +383,7 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi checkCount("name=pkg/xyz", activations.length) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath?name=pkg/xyz") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -399,12 +400,13 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi it should "reject invalid query parameter combinations" in { implicit val tid = transid() - whisk.utils.retry { // retry because view will be stale from previous test and result in null doc fields - Get(s"$collectionPath?docs=true&count=true") ~> Route.seal(routes(creds)) ~> check { - status should be(BadRequest) - responseAs[ErrorResponse].error shouldBe Messages.docsNotAllowedWithCount + org.apache.openwhisk.utils + .retry { // retry because view will be stale from previous test and result in null doc fields + Get(s"$collectionPath?docs=true&count=true") ~> Route.seal(routes(creds)) ~> check { + status should be(BadRequest) + responseAs[ErrorResponse].error shouldBe Messages.docsNotAllowedWithCount + } } - } } it should "reject list when limit is greater than maximum allowed value" in { diff --git a/tests/src/test/scala/whisk/core/controller/test/BasicAuthenticateTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/BasicAuthenticateTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/controller/test/BasicAuthenticateTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/BasicAuthenticateTests.scala index 28a8e288970..81fb32645d5 100644 --- a/tests/src/test/scala/whisk/core/controller/test/BasicAuthenticateTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/BasicAuthenticateTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.concurrent.Await @@ -24,9 +24,9 @@ import org.scalatest.junit.JUnitRunner import akka.http.scaladsl.model.headers.BasicHttpCredentials -import whisk.core.controller.BasicAuthenticationDirective -import whisk.core.entity._ -import whisk.core.entitlement.Privilege +import org.apache.openwhisk.core.controller.BasicAuthenticationDirective +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entitlement.Privilege /** * Tests authentication handler which guards API. diff --git a/tests/src/test/scala/whisk/core/controller/test/ConductorsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ConductorsApiTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/controller/test/ConductorsApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/ConductorsApiTests.scala index 0f715b879d1..115a8e23657 100644 --- a/tests/src/test/scala/whisk/core/controller/test/ConductorsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ConductorsApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import java.time.Instant @@ -30,12 +30,12 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport.sprayJsonUnmars import akka.http.scaladsl.server.Route import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.connector.ActivationMessage -import whisk.core.controller.WhiskActionsApi -import whisk.core.entity._ -import whisk.http.Messages._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.ActivationMessage +import org.apache.openwhisk.core.controller.WhiskActionsApi +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.Messages._ import scala.util.Success diff --git a/tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerApiTests.scala similarity index 94% rename from tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerApiTests.scala index 00b5c4dbcb3..3ad4e492d11 100644 --- a/tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import org.junit.runner.RunWith import org.scalatest.FlatSpec @@ -25,8 +25,8 @@ import com.jayway.restassured.RestAssured import common.StreamLogging import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.WhiskConfig -import whisk.core.entity.{ExecManifest, LogLimit, MemoryLimit, TimeLimit} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entity.{ExecManifest, LogLimit, MemoryLimit, TimeLimit} import system.rest.RestUtil /** diff --git a/tests/src/test/scala/whisk/core/controller/test/ControllerTestCommon.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerTestCommon.scala similarity index 91% rename from tests/src/test/scala/whisk/core/controller/test/ControllerTestCommon.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerTestCommon.scala index 7455f48b8c3..0fb21aab542 100644 --- a/tests/src/test/scala/whisk/core/controller/test/ControllerTestCommon.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerTestCommon.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.concurrent.{Await, Future} import scala.concurrent.ExecutionContext @@ -29,19 +29,19 @@ import common.StreamLogging import akka.http.scaladsl.testkit.ScalatestRouteTest import akka.http.scaladsl.testkit.RouteTestTimeout import spray.json._ -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.connector.ActivationMessage -import whisk.core.containerpool.logging.LogStoreProvider -import whisk.core.controller.{CustomHeaders, RestApiCommons, WhiskServices} -import whisk.core.database.{ActivationStoreProvider, CacheChangeNotification, DocumentFactory} -import whisk.core.database.test.DbUtils -import whisk.core.entitlement._ -import whisk.core.entity._ -import whisk.core.entity.test.ExecHelpers -import whisk.core.loadBalancer.LoadBalancer -import whisk.spi.SpiLoader -import whisk.core.database.UserContext +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.ActivationMessage +import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider +import org.apache.openwhisk.core.controller.{CustomHeaders, RestApiCommons, WhiskServices} +import org.apache.openwhisk.core.database.{ActivationStoreProvider, CacheChangeNotification, DocumentFactory} +import org.apache.openwhisk.core.database.test.DbUtils +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.test.ExecHelpers +import org.apache.openwhisk.core.loadBalancer.LoadBalancer +import org.apache.openwhisk.spi.SpiLoader +import org.apache.openwhisk.core.database.UserContext protected trait ControllerTestCommon extends FlatSpec diff --git a/tests/src/test/scala/whisk/core/controller/test/EntitlementProviderTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/EntitlementProviderTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/controller/test/EntitlementProviderTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/EntitlementProviderTests.scala index 2a3042de56b..ab93d520e47 100644 --- a/tests/src/test/scala/whisk/core/controller/test/EntitlementProviderTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/EntitlementProviderTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.collection.mutable.ListBuffer import scala.concurrent.Await @@ -24,12 +24,12 @@ import org.junit.runner.RunWith import org.scalatest.concurrent.ScalaFutures import org.scalatest.junit.JUnitRunner import akka.http.scaladsl.model.StatusCodes._ -import whisk.core.controller.RejectRequest -import whisk.core.entitlement._ -import whisk.core.entitlement.Privilege._ -import whisk.core.entity._ -import whisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} -import whisk.http.Messages +import org.apache.openwhisk.core.controller.RejectRequest +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entitlement.Privilege._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} +import org.apache.openwhisk.http.Messages /** * Tests authorization handler which guards resources. diff --git a/tests/src/test/scala/whisk/core/controller/test/KindRestrictorTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/KindRestrictorTests.scala similarity index 95% rename from tests/src/test/scala/whisk/core/controller/test/KindRestrictorTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/KindRestrictorTests.scala index b5ffc344e4c..40084b35640 100644 --- a/tests/src/test/scala/whisk/core/controller/test/KindRestrictorTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/KindRestrictorTests.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import common.StreamLogging import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers} -import whisk.core.entitlement.KindRestrictor -import whisk.core.entity._ +import org.apache.openwhisk.core.entitlement.KindRestrictor +import org.apache.openwhisk.core.entity._ /** * Tests authorization handler which guards resources. diff --git a/tests/src/test/scala/whisk/core/controller/test/NamespacesApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/NamespacesApiTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/controller/test/NamespacesApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/NamespacesApiTests.scala index 4cb20275f54..99b17920c21 100644 --- a/tests/src/test/scala/whisk/core/controller/test/NamespacesApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/NamespacesApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @@ -27,8 +27,8 @@ import akka.http.scaladsl.server.Route import spray.json.DefaultJsonProtocol._ -import whisk.core.controller.WhiskNamespacesApi -import whisk.core.entity.EntityPath +import org.apache.openwhisk.core.controller.WhiskNamespacesApi +import org.apache.openwhisk.core.entity.EntityPath /** * Tests Namespaces API. diff --git a/tests/src/test/scala/whisk/core/controller/test/PackageActionsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/controller/test/PackageActionsApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala index 18ff0a83211..582e9950658 100644 --- a/tests/src/test/scala/whisk/core/controller/test/PackageActionsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.concurrent.duration.DurationInt import org.junit.runner.RunWith @@ -28,14 +28,14 @@ import akka.http.scaladsl.server.Route import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.controller.WhiskActionsApi -import whisk.core.entity._ -import whisk.core.entitlement.Resource -import whisk.core.entitlement.Privilege._ +import org.apache.openwhisk.core.controller.WhiskActionsApi +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entitlement.Resource +import org.apache.openwhisk.core.entitlement.Privilege._ import scala.concurrent.Await import scala.language.postfixOps -import whisk.http.ErrorResponse -import whisk.http.Messages +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.Messages /** * Tests Packages API. @@ -69,7 +69,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { } put(entityStore, provider) actions foreach { put(entityStore, _) } - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${provider.name}/") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -91,7 +91,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { put(entityStore, provider) put(entityStore, reference) actions foreach { put(entityStore, _) } - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${reference.name}/") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -111,7 +111,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { put(entityStore, provider) put(entityStore, action1) put(entityStore, action2) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -126,7 +126,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { implicit val tid = transid() val provider = WhiskPackage(namespace, aname(), None) put(entityStore, provider) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${provider.name}") ~> Route.seal(routes(creds)) ~> check { status should be(Conflict) } @@ -291,7 +291,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { val action = WhiskAction(provider.fullPath, aname(), jsDefault("??"), Parameters("a", "A")) put(entityStore, provider) put(entityStore, action) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${provider.name}/${action.name}") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[WhiskAction] @@ -309,7 +309,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { put(entityStore, provider) put(entityStore, binding) put(entityStore, action) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${binding.name}/${action.name}") ~> Route.seal(routes(auser)) ~> check { status should be(OK) val response = responseAs[WhiskAction] @@ -327,7 +327,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { put(entityStore, provider) put(entityStore, binding) put(entityStore, action) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${binding.name}/${action.name}") ~> Route.seal(routes(auser)) ~> check { status should be(OK) val response = responseAs[WhiskAction] diff --git a/tests/src/test/scala/whisk/core/controller/test/PackagesApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/controller/test/PackagesApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala index 1be2065f8e6..dd1439713d7 100644 --- a/tests/src/test/scala/whisk/core/controller/test/PackagesApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.model.StatusCodes._ @@ -24,10 +24,10 @@ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.controller.WhiskPackagesApi -import whisk.core.entitlement.Collection -import whisk.core.entity._ -import whisk.http.{ErrorResponse, Messages} +import org.apache.openwhisk.core.controller.WhiskPackagesApi +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.{ErrorResponse, Messages} import scala.language.postfixOps @@ -61,7 +61,7 @@ class PackagesApiTests extends ControllerTestCommon with WhiskPackagesApi { def checkCount(path: String = collectionPath, expected: Long, user: Identity = creds) = { implicit val tid = transid() withClue(s"count did not match") { - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$path?count=true") ~> Route.seal(routes(user)) ~> check { status should be(OK) responseAs[JsObject].fields(collection.path).convertTo[Long] shouldBe (expected) @@ -86,7 +86,7 @@ class PackagesApiTests extends ControllerTestCommon with WhiskPackagesApi { waitOnView(entityStore, WhiskPackage, namespace, providers.length) checkCount(expected = providers.length) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[List[JsObject]] @@ -771,7 +771,7 @@ class PackagesApiTests extends ControllerTestCommon with WhiskPackagesApi { val action = WhiskAction(provider.namespace.addPath(provider.name), aname(), jsDefault("??")) put(entityStore, provider) put(entityStore, action) - whisk.utils.retry { + org.apache.openwhisk.utils.retry { Get(s"$collectionPath/${provider.name}") ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[JsObject] diff --git a/tests/src/test/scala/whisk/core/controller/test/RateThrottleTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RateThrottleTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/controller/test/RateThrottleTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/RateThrottleTests.scala index 3e2ea2af833..088f0120e5d 100644 --- a/tests/src/test/scala/whisk/core/controller/test/RateThrottleTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RateThrottleTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.concurrent.duration.DurationInt @@ -25,9 +25,9 @@ import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import common.StreamLogging -import whisk.common.TransactionId -import whisk.core.entitlement._ -import whisk.core.entity.UserLimits +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entitlement._ +import org.apache.openwhisk.core.entity.UserLimits /** * Tests rate throttle. diff --git a/tests/src/test/scala/whisk/core/controller/test/RespondWithHeadersTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RespondWithHeadersTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/controller/test/RespondWithHeadersTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/RespondWithHeadersTests.scala index 2f3de42b726..50ad7cdfa55 100644 --- a/tests/src/test/scala/whisk/core/controller/test/RespondWithHeadersTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RespondWithHeadersTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @@ -24,7 +24,7 @@ import akka.http.scaladsl.model.StatusCodes.NotFound import akka.http.scaladsl.model.StatusCodes.OK import akka.http.scaladsl.server.Route -import whisk.core.controller.RespondWithHeaders +import org.apache.openwhisk.core.controller.RespondWithHeaders /** * Tests the API in general diff --git a/tests/src/test/scala/whisk/core/controller/test/RulesApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/controller/test/RulesApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala index f5e7449b899..d497593d29f 100644 --- a/tests/src/test/scala/whisk/core/controller/test/RulesApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.language.postfixOps import org.junit.runner.RunWith @@ -25,15 +25,15 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.server.Route import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.controller.WhiskRulesApi -import whisk.core.entitlement.Collection -import whisk.core.entity._ -import whisk.core.entity.test.OldWhiskTrigger -import whisk.http.ErrorResponse +import org.apache.openwhisk.core.controller.WhiskRulesApi +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.test.OldWhiskTrigger +import org.apache.openwhisk.http.ErrorResponse import scala.language.postfixOps -import whisk.core.entity.test.OldWhiskRule -import whisk.http.Messages +import org.apache.openwhisk.core.entity.test.OldWhiskRule +import org.apache.openwhisk.http.Messages /** * Tests Rules API. diff --git a/tests/src/test/scala/whisk/core/controller/test/SequenceApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/SequenceApiTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/controller/test/SequenceApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/SequenceApiTests.scala index 0e42d45e6ef..abb4604821b 100644 --- a/tests/src/test/scala/whisk/core/controller/test/SequenceApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/SequenceApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import scala.concurrent.duration.DurationInt import scala.language.postfixOps @@ -27,11 +27,11 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.server.Route import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.controller.WhiskActionsApi -import whisk.core.entity._ -import whisk.http.{ErrorResponse, Messages} -import whisk.http.Messages.sequenceComponentNotFound +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.WhiskActionsApi +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.{ErrorResponse, Messages} +import org.apache.openwhisk.http.Messages.sequenceComponentNotFound /** * Tests Sequence API - stand-alone tests that require only the controller to be up @@ -478,7 +478,7 @@ class SequenceApiTests extends ControllerTestCommon with WhiskActionsApi { } private def logContains(w: String)(implicit stream: java.io.ByteArrayOutputStream): Boolean = { - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ val log = stream.toString() val result = log.contains(w) assert(result) // throws exception required to retry diff --git a/tests/src/test/scala/whisk/core/controller/test/SwaggerRoutesTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/SwaggerRoutesTests.scala similarity index 95% rename from tests/src/test/scala/whisk/core/controller/test/SwaggerRoutesTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/SwaggerRoutesTests.scala index acfda89ac6f..aaeab3cb06a 100644 --- a/tests/src/test/scala/whisk/core/controller/test/SwaggerRoutesTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/SwaggerRoutesTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import org.junit.runner.RunWith import org.scalatest.BeforeAndAfterEach @@ -29,7 +29,7 @@ import akka.http.scaladsl.model.Uri import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.controller.SwaggerDocs +import org.apache.openwhisk.core.controller.SwaggerDocs /** * Tests swagger routes. diff --git a/tests/src/test/scala/whisk/core/controller/test/TriggersApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/controller/test/TriggersApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala index 4165b2e4e43..91b22a279c8 100644 --- a/tests/src/test/scala/whisk/core/controller/test/TriggersApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import java.time.Instant @@ -32,15 +32,15 @@ import akka.http.scaladsl.model.headers.RawHeader import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.controller.WhiskTriggersApi -import whisk.core.entitlement.Collection -import whisk.core.entity._ -import whisk.core.entity.WhiskRule -import whisk.core.entity.size._ -import whisk.core.entity.test.OldWhiskTrigger -import whisk.http.ErrorResponse -import whisk.http.Messages -import whisk.core.database.UserContext +import org.apache.openwhisk.core.controller.WhiskTriggersApi +import org.apache.openwhisk.core.entitlement.Collection +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.WhiskRule +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.entity.test.OldWhiskTrigger +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.database.UserContext /** * Tests Trigger API. @@ -372,7 +372,7 @@ class TriggersApiTests extends ControllerTestCommon with WhiskTriggersApi { headers should contain(RawHeader(ActivationIdHeader, response.fields("activationId").convertTo[String])) val activationDoc = DocId(WhiskEntity.qualifiedName(namespace, activationId)) - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ println(s"trying to obtain async activation doc: '${activationDoc}'") val activation = getActivation(ActivationId(activationDoc.asString), context) @@ -396,7 +396,7 @@ class TriggersApiTests extends ControllerTestCommon with WhiskTriggersApi { val JsString(id) = response.fields("activationId") val activationId = ActivationId.parse(id).get val activationDoc = DocId(WhiskEntity.qualifiedName(namespace, activationId)) - whisk.utils.retry({ + org.apache.openwhisk.utils.retry({ println(s"trying to delete async activation doc: '${activationDoc}'") deleteActivation(ActivationId(activationDoc.asString), context) response.fields("activationId") should not be None diff --git a/tests/src/test/scala/whisk/core/controller/test/WebActionsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/controller/test/WebActionsApiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala index 508b687b193..81e91db8b86 100644 --- a/tests/src/test/scala/whisk/core/controller/test/WebActionsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test import java.time.Instant import java.util.Base64 @@ -42,17 +42,17 @@ import akka.http.scaladsl.model.ContentType import akka.http.scaladsl.model.MediaType import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.controller._ -import whisk.core.entitlement.EntitlementProvider -import whisk.core.entitlement.Privilege -import whisk.core.entitlement.Resource -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.loadBalancer.LoadBalancer -import whisk.http.ErrorResponse -import whisk.http.Messages +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.controller._ +import org.apache.openwhisk.core.entitlement.EntitlementProvider +import org.apache.openwhisk.core.entitlement.Privilege +import org.apache.openwhisk.core.entitlement.Resource +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.loadBalancer.LoadBalancer +import org.apache.openwhisk.http.ErrorResponse +import org.apache.openwhisk.http.Messages import scala.collection.immutable.Set diff --git a/tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WhiskAuthHelpers.scala similarity index 89% rename from tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/WhiskAuthHelpers.scala index e5b28c53b74..0e21c9e3c66 100644 --- a/tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WhiskAuthHelpers.scala @@ -15,10 +15,10 @@ * limitations under the License. */ -package whisk.core.controller.test +package org.apache.openwhisk.core.controller.test -import whisk.core.entity._ -import whisk.core.entitlement.Privilege +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entitlement.Privilege object WhiskAuthHelpers { def newAuth(s: Subject = Subject(), k: BasicAuthenticationAuthKey = BasicAuthenticationAuthKey()) = { diff --git a/tests/src/test/scala/whisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala index dbeb29e6e9e..2fab59e2f5a 100644 --- a/tests/src/test/scala/whisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.controller.test.migration +package org.apache.openwhisk.core.controller.test.migration import scala.Vector @@ -32,10 +32,10 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.core.controller.WhiskActionsApi -import whisk.core.controller.test.ControllerTestCommon -import whisk.core.controller.test.WhiskAuthHelpers -import whisk.core.entity._ +import org.apache.openwhisk.core.controller.WhiskActionsApi +import org.apache.openwhisk.core.controller.test.ControllerTestCommon +import org.apache.openwhisk.core.controller.test.WhiskAuthHelpers +import org.apache.openwhisk.core.entity._ /** * Tests migration of a new implementation of sequences: old style sequences can be updated and retrieved - standalone tests diff --git a/tests/src/test/scala/whisk/core/database/CouchDBArtifactStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBArtifactStoreTests.scala similarity index 89% rename from tests/src/test/scala/whisk/core/database/CouchDBArtifactStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBArtifactStoreTests.scala index 159ac5b5803..4d150573232 100644 --- a/tests/src/test/scala/whisk/core/database/CouchDBArtifactStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBArtifactStoreTests.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.database.test.behavior.ArtifactStoreBehavior +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreBehavior @RunWith(classOf[JUnitRunner]) class CouchDBArtifactStoreTests extends FlatSpec with CouchDBStoreBehaviorBase with ArtifactStoreBehavior {} diff --git a/tests/src/test/scala/whisk/core/database/CouchDBAttachmentStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBAttachmentStoreTests.scala similarity index 85% rename from tests/src/test/scala/whisk/core/database/CouchDBAttachmentStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBAttachmentStoreTests.scala index e0d79867b14..def5673fbbd 100644 --- a/tests/src/test/scala/whisk/core/database/CouchDBAttachmentStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBAttachmentStoreTests.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.database.memory.MemoryAttachmentStoreProvider -import whisk.core.database.test.behavior.ArtifactStoreAttachmentBehaviors +import org.apache.openwhisk.core.database.memory.MemoryAttachmentStoreProvider +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreAttachmentBehaviors import scala.reflect.ClassTag diff --git a/tests/src/test/scala/whisk/core/database/CouchDBStoreBehaviorBase.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBStoreBehaviorBase.scala similarity index 92% rename from tests/src/test/scala/whisk/core/database/CouchDBStoreBehaviorBase.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBStoreBehaviorBase.scala index 0a130756145..765232ff4ad 100644 --- a/tests/src/test/scala/whisk/core/database/CouchDBStoreBehaviorBase.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/CouchDBStoreBehaviorBase.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import org.scalatest.FlatSpec -import whisk.core.database.test.behavior.ArtifactStoreBehaviorBase -import whisk.core.entity.{ +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreBehaviorBase +import org.apache.openwhisk.core.entity.{ DocumentReader, WhiskActivation, WhiskAuth, diff --git a/tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/LimitsCommandTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/LimitsCommandTests.scala index f1de23f3982..1b0bcab51a4 100644 --- a/tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/LimitsCommandTests.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.common.TransactionId -import whisk.core.cli.CommandMessages -import whisk.core.database.LimitsCommand.LimitEntity -import whisk.core.entity.{DocInfo, EntityName, UserLimits} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.cli.CommandMessages +import org.apache.openwhisk.core.database.LimitsCommand.LimitEntity +import org.apache.openwhisk.core.entity.{DocInfo, EntityName, UserLimits} import scala.collection.mutable.ListBuffer import scala.concurrent.duration.Duration diff --git a/tests/src/test/scala/whisk/core/database/UserCommandTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/UserCommandTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/database/UserCommandTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/UserCommandTests.scala index ee9c7e80787..62dc0606f5b 100644 --- a/tests/src/test/scala/whisk/core/database/UserCommandTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/UserCommandTests.scala @@ -15,19 +15,19 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.common.TransactionId -import whisk.core.cli.{CommandMessages, Conf, WhiskAdmin} -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.cli.{CommandMessages, Conf, WhiskAdmin} +import org.apache.openwhisk.core.entity._ import scala.collection.mutable.ListBuffer import scala.concurrent.duration.Duration import scala.util.Try -import whisk.core.database.UserCommand.ExtendedAuth +import org.apache.openwhisk.core.database.UserCommand.ExtendedAuth @RunWith(classOf[JUnitRunner]) class UserCommandTests extends FlatSpec with WhiskAdminCliTestBase { diff --git a/tests/src/test/scala/whisk/core/database/WhiskAdminCliTestBase.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/WhiskAdminCliTestBase.scala similarity index 91% rename from tests/src/test/scala/whisk/core/database/WhiskAdminCliTestBase.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/WhiskAdminCliTestBase.scala index 0bbba02b78b..2a18d4c78fc 100644 --- a/tests/src/test/scala/whisk/core/database/WhiskAdminCliTestBase.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/WhiskAdminCliTestBase.scala @@ -15,16 +15,16 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import akka.stream.ActorMaterializer import common.{StreamLogging, WskActorSystem} import org.rogach.scallop.throwError import org.scalatest.concurrent.ScalaFutures import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, FlatSpec, Matchers} -import whisk.core.cli.{Conf, WhiskAdmin} -import whisk.core.database.test.DbUtils -import whisk.core.entity.WhiskAuthStore +import org.apache.openwhisk.core.cli.{Conf, WhiskAdmin} +import org.apache.openwhisk.core.database.test.DbUtils +import org.apache.openwhisk.core.entity.WhiskAuthStore import scala.util.Random diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala similarity index 90% rename from tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala index 5558b6d1f08..ced5df3a0ac 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.entity.size._ -import whisk.core.database.test.behavior.ArtifactStoreBehavior +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreBehavior @RunWith(classOf[JUnitRunner]) class CosmosDBArtifactStoreTests extends FlatSpec with CosmosDBStoreBehaviorBase with ArtifactStoreBehavior { diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBAttachmentStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBAttachmentStoreTests.scala similarity index 81% rename from tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBAttachmentStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBAttachmentStoreTests.scala index 5e5da0f9775..5b2c9a156a2 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBAttachmentStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBAttachmentStoreTests.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.database.DocumentSerializer -import whisk.core.database.memory.MemoryAttachmentStoreProvider -import whisk.core.database.test.behavior.ArtifactStoreAttachmentBehaviors +import org.apache.openwhisk.core.database.DocumentSerializer +import org.apache.openwhisk.core.database.memory.MemoryAttachmentStoreProvider +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreAttachmentBehaviors import scala.reflect.ClassTag diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBStoreBehaviorBase.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBStoreBehaviorBase.scala similarity index 89% rename from tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBStoreBehaviorBase.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBStoreBehaviorBase.scala index 2c12a9bd537..1dc4ed2c918 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBStoreBehaviorBase.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBStoreBehaviorBase.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import org.scalatest.FlatSpec -import whisk.core.database.test.behavior.ArtifactStoreBehaviorBase -import whisk.core.database.{ArtifactStore, AttachmentStore, DocumentSerializer} -import whisk.core.entity.{ +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreBehaviorBase +import org.apache.openwhisk.core.database.{ArtifactStore, AttachmentStore, DocumentSerializer} +import org.apache.openwhisk.core.entity.{ DocumentReader, WhiskActivation, WhiskAuth, diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBSupportTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBSupportTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBSupportTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBSupportTests.scala index 8ffc807e7b7..57f57aa1b3f 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBSupportTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBSupportTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb.IndexKind.Hash import com.microsoft.azure.cosmosdb.DataType.String diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBTestSupport.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBTestSupport.scala similarity index 94% rename from tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBTestSupport.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBTestSupport.scala index f783c79fb14..87af8937829 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBTestSupport.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBTestSupport.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb.{Database, SqlParameter, SqlParameterCollection, SqlQuerySpec} import org.scalatest.{BeforeAndAfterAll, FlatSpec} import pureconfig.loadConfigOrThrow -import whisk.core.ConfigKeys -import whisk.core.database.test.behavior.ArtifactStoreTestUtil.storeAvailable +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreTestUtil.storeAvailable import scala.collection.mutable.ListBuffer import scala.util.{Random, Try} diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBUtilTest.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBUtilTest.scala similarity index 96% rename from tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBUtilTest.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBUtilTest.scala index 50ec7f2c1a5..a4e9e8b0ec4 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/CosmosDBUtilTest.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBUtilTest.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers, OptionValues} import spray.json._ -import whisk.utils.JsHelpers +import org.apache.openwhisk.utils.JsHelpers @RunWith(classOf[JUnitRunner]) class CosmosDBUtilTest extends FlatSpec with Matchers with OptionValues { diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/IndexingPolicyTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/IndexingPolicyTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/database/cosmosdb/IndexingPolicyTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/IndexingPolicyTests.scala index 9f11ce93c9d..2a0fb8bdc2b 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/IndexingPolicyTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/IndexingPolicyTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import com.microsoft.azure.cosmosdb.DataType.String import com.microsoft.azure.cosmosdb.IndexKind.{Hash, Range} diff --git a/tests/src/test/scala/whisk/core/database/cosmosdb/ReferenceCountedTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/ReferenceCountedTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/database/cosmosdb/ReferenceCountedTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/ReferenceCountedTests.scala index e9b0d85981b..78d8ad856b0 100644 --- a/tests/src/test/scala/whisk/core/database/cosmosdb/ReferenceCountedTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/ReferenceCountedTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.cosmosdb +package org.apache.openwhisk.core.database.cosmosdb import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner diff --git a/tests/src/test/scala/whisk/core/database/memory/MemoryArtifactStoreBehaviorBase.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreBehaviorBase.scala similarity index 88% rename from tests/src/test/scala/whisk/core/database/memory/MemoryArtifactStoreBehaviorBase.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreBehaviorBase.scala index 72b2f8e64a8..2d8a1be8a79 100644 --- a/tests/src/test/scala/whisk/core/database/memory/MemoryArtifactStoreBehaviorBase.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreBehaviorBase.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database.memory +package org.apache.openwhisk.core.database.memory import org.scalatest.FlatSpec -import whisk.core.database.{ArtifactStore, AttachmentStore, DocumentSerializer} -import whisk.core.database.test.behavior.ArtifactStoreBehaviorBase -import whisk.core.entity.{ +import org.apache.openwhisk.core.database.{ArtifactStore, AttachmentStore, DocumentSerializer} +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreBehaviorBase +import org.apache.openwhisk.core.entity.{ DocumentReader, WhiskActivation, WhiskAuth, diff --git a/tests/src/test/scala/whisk/core/database/memory/MemoryArtifactStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreTests.scala similarity index 89% rename from tests/src/test/scala/whisk/core/database/memory/MemoryArtifactStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreTests.scala index e9860a02ec2..9bc79809a2d 100644 --- a/tests/src/test/scala/whisk/core/database/memory/MemoryArtifactStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreTests.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database.memory +package org.apache.openwhisk.core.database.memory import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.database.test.behavior.ArtifactStoreBehavior +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreBehavior @RunWith(classOf[JUnitRunner]) class MemoryArtifactStoreTests extends FlatSpec with MemoryArtifactStoreBehaviorBase with ArtifactStoreBehavior diff --git a/tests/src/test/scala/whisk/core/database/memory/MemoryAttachmentStoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryAttachmentStoreTests.scala similarity index 85% rename from tests/src/test/scala/whisk/core/database/memory/MemoryAttachmentStoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryAttachmentStoreTests.scala index 9d845bcd63a..32c157d8f89 100644 --- a/tests/src/test/scala/whisk/core/database/memory/MemoryAttachmentStoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryAttachmentStoreTests.scala @@ -15,15 +15,15 @@ * limitations under the License. */ -package whisk.core.database.memory +package org.apache.openwhisk.core.database.memory import common.WskActorSystem import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner -import whisk.core.database.AttachmentStore -import whisk.core.database.test.AttachmentStoreBehaviors -import whisk.core.entity.WhiskEntity +import org.apache.openwhisk.core.database.AttachmentStore +import org.apache.openwhisk.core.database.test.AttachmentStoreBehaviors +import org.apache.openwhisk.core.entity.WhiskEntity @RunWith(classOf[JUnitRunner]) class MemoryAttachmentStoreTests extends FlatSpec with AttachmentStoreBehaviors with WskActorSystem { diff --git a/tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreAwsTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreAwsTests.scala similarity index 91% rename from tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreAwsTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreAwsTests.scala index 2e99f58fe6b..7c595c1398f 100644 --- a/tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreAwsTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreAwsTests.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner -import whisk.core.entity.WhiskEntity +import org.apache.openwhisk.core.entity.WhiskEntity @RunWith(classOf[JUnitRunner]) class S3AttachmentStoreAwsTests extends S3AttachmentStoreBehaviorBase with S3Aws { diff --git a/tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreBehaviorBase.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreBehaviorBase.scala similarity index 78% rename from tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreBehaviorBase.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreBehaviorBase.scala index 48def3960f4..ee9f1fb6af6 100644 --- a/tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreBehaviorBase.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreBehaviorBase.scala @@ -15,17 +15,17 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import akka.actor.ActorSystem import akka.stream.ActorMaterializer import org.scalatest.FlatSpec -import whisk.common.Logging -import whisk.core.database.{AttachmentStore, DocumentSerializer} -import whisk.core.database.memory.MemoryArtifactStoreBehaviorBase -import whisk.core.database.test.AttachmentStoreBehaviors -import whisk.core.database.test.behavior.ArtifactStoreAttachmentBehaviors -import whisk.core.entity.WhiskEntity +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.database.{AttachmentStore, DocumentSerializer} +import org.apache.openwhisk.core.database.memory.MemoryArtifactStoreBehaviorBase +import org.apache.openwhisk.core.database.test.AttachmentStoreBehaviors +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreAttachmentBehaviors +import org.apache.openwhisk.core.entity.WhiskEntity import scala.reflect.ClassTag import scala.util.Random diff --git a/tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreMinioTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreMinioTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreMinioTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreMinioTests.scala index 07cf4b497f3..0403fd88b73 100644 --- a/tests/src/test/scala/whisk/core/database/s3/S3AttachmentStoreMinioTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3AttachmentStoreMinioTests.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner -import whisk.core.entity.WhiskEntity +import org.apache.openwhisk.core.entity.WhiskEntity @RunWith(classOf[JUnitRunner]) class S3AttachmentStoreMinioTests extends S3AttachmentStoreBehaviorBase with S3Minio { diff --git a/tests/src/test/scala/whisk/core/database/s3/S3Aws.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3Aws.scala similarity index 93% rename from tests/src/test/scala/whisk/core/database/s3/S3Aws.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3Aws.scala index 59c1cbe3e6c..8e529662188 100644 --- a/tests/src/test/scala/whisk/core/database/s3/S3Aws.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3Aws.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import akka.actor.ActorSystem import akka.stream.ActorMaterializer import com.typesafe.config.ConfigFactory import org.scalatest.FlatSpec -import whisk.common.Logging -import whisk.core.database.{AttachmentStore, DocumentSerializer} +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.database.{AttachmentStore, DocumentSerializer} import scala.reflect.ClassTag diff --git a/tests/src/test/scala/whisk/core/database/s3/S3Minio.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3Minio.scala similarity index 93% rename from tests/src/test/scala/whisk/core/database/s3/S3Minio.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3Minio.scala index 34c6a4783da..0431f70c3d0 100644 --- a/tests/src/test/scala/whisk/core/database/s3/S3Minio.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3Minio.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import java.net.ServerSocket @@ -28,8 +28,8 @@ import com.amazonaws.services.s3.AmazonS3ClientBuilder import com.typesafe.config.ConfigFactory import common.{SimpleExec, StreamLogging} import org.scalatest.{BeforeAndAfterAll, FlatSpec} -import whisk.common.{Logging, TransactionId} -import whisk.core.database.{AttachmentStore, DocumentSerializer} +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.database.{AttachmentStore, DocumentSerializer} import scala.concurrent.duration._ import scala.reflect.ClassTag @@ -97,7 +97,7 @@ trait S3Minio extends FlatSpec with BeforeAndAfterAll with StreamLogging { .withCredentials(new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretAccessKey))) .build - whisk.utils.retry(client.createBucket(bucket), 6, Some(1.minute)) + org.apache.openwhisk.utils.retry(client.createBucket(bucket), 6, Some(1.minute)) println(s"Created bucket $bucket") } diff --git a/tests/src/test/scala/whisk/core/database/s3/S3WithPrefixTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3WithPrefixTests.scala similarity index 88% rename from tests/src/test/scala/whisk/core/database/s3/S3WithPrefixTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3WithPrefixTests.scala index eb4add7adb4..ee512c12a8d 100644 --- a/tests/src/test/scala/whisk/core/database/s3/S3WithPrefixTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3WithPrefixTests.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.database.s3 +package org.apache.openwhisk.core.database.s3 import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner -import whisk.core.database.s3.S3AttachmentStoreProvider.S3Config -import whisk.core.entity.WhiskEntity +import org.apache.openwhisk.core.database.s3.S3AttachmentStoreProvider.S3Config +import org.apache.openwhisk.core.entity.WhiskEntity @RunWith(classOf[JUnitRunner]) class S3WithPrefixTests extends S3AttachmentStoreMinioTests { diff --git a/tests/src/test/scala/whisk/core/database/test/AttachmentCompatibilityTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentCompatibilityTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/database/test/AttachmentCompatibilityTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentCompatibilityTests.scala index 685f27d1455..5549d26d95a 100644 --- a/tests/src/test/scala/whisk/core/database/test/AttachmentCompatibilityTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentCompatibilityTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.io.ByteArrayInputStream import java.util.Base64 @@ -31,14 +31,14 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, FlatSpec, Matchers} import pureconfig.loadConfigOrThrow import spray.json._ -import whisk.common.TransactionId -import whisk.core.ConfigKeys -import whisk.core.controller.test.WhiskAuthHelpers -import whisk.core.database.memory.MemoryAttachmentStoreProvider -import whisk.core.database.{CouchDbConfig, CouchDbRestClient, CouchDbStoreProvider, NoDocumentException} -import whisk.core.entity.Attachments.Inline -import whisk.core.entity.test.ExecHelpers -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.controller.test.WhiskAuthHelpers +import org.apache.openwhisk.core.database.memory.MemoryAttachmentStoreProvider +import org.apache.openwhisk.core.database.{CouchDbConfig, CouchDbRestClient, CouchDbStoreProvider, NoDocumentException} +import org.apache.openwhisk.core.entity.Attachments.Inline +import org.apache.openwhisk.core.entity.test.ExecHelpers +import org.apache.openwhisk.core.entity._ import scala.concurrent.Future import scala.reflect.classTag diff --git a/tests/src/test/scala/whisk/core/database/test/AttachmentStoreBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentStoreBehaviors.scala similarity index 96% rename from tests/src/test/scala/whisk/core/database/test/AttachmentStoreBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentStoreBehaviors.scala index 0b5a8796503..0ef1ded4159 100644 --- a/tests/src/test/scala/whisk/core/database/test/AttachmentStoreBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentStoreBehaviors.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.io.ByteArrayInputStream @@ -26,9 +26,9 @@ import akka.util.{ByteString, ByteStringBuilder} import common.{StreamLogging, WskActorSystem} import org.scalatest.concurrent.ScalaFutures import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers} -import whisk.common.TransactionId -import whisk.core.database.{AttachmentStore, NoDocumentException} -import whisk.core.entity.DocId +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.{AttachmentStore, NoDocumentException} +import org.apache.openwhisk.core.entity.DocId import scala.collection.mutable.ListBuffer import scala.concurrent.Await diff --git a/tests/src/test/scala/whisk/core/database/test/AttachmentSupportTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentSupportTests.scala similarity index 88% rename from tests/src/test/scala/whisk/core/database/test/AttachmentSupportTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentSupportTests.scala index e93475d19fc..a3b9a276dd9 100644 --- a/tests/src/test/scala/whisk/core/database/test/AttachmentSupportTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentSupportTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import akka.http.scaladsl.model.Uri import akka.stream.scaladsl.Source @@ -26,10 +26,10 @@ import org.junit.runner.RunWith import org.scalatest.concurrent.ScalaFutures import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers} -import whisk.common.TransactionId -import whisk.core.database.{AttachmentSupport, InliningConfig} -import whisk.core.entity.WhiskEntity -import whisk.core.entity.size._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.{AttachmentSupport, InliningConfig} +import org.apache.openwhisk.core.entity.WhiskEntity +import org.apache.openwhisk.core.entity.size._ @RunWith(classOf[JUnitRunner]) class AttachmentSupportTests extends FlatSpec with Matchers with ScalaFutures with WskActorSystem { diff --git a/tests/src/test/scala/whisk/core/database/test/BatcherTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/BatcherTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/database/test/BatcherTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/BatcherTests.scala index a2eac6f4788..dc2a02ac121 100644 --- a/tests/src/test/scala/whisk/core/database/test/BatcherTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/BatcherTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.time.Instant import java.util.concurrent.atomic.AtomicInteger @@ -25,8 +25,8 @@ import common.{LoggedFunction, WskActorSystem} import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers} -import whisk.core.database.Batcher -import whisk.utils.retry +import org.apache.openwhisk.core.database.Batcher +import org.apache.openwhisk.utils.retry import scala.collection.mutable import scala.concurrent.duration._ diff --git a/tests/src/test/scala/whisk/core/database/test/CacheConcurrencyTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/CacheConcurrencyTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/database/test/CacheConcurrencyTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/CacheConcurrencyTests.scala index 54811ecd831..90c8bb74b63 100644 --- a/tests/src/test/scala/whisk/core/database/test/CacheConcurrencyTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/CacheConcurrencyTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import scala.collection.parallel._ import scala.concurrent.duration.DurationInt @@ -29,8 +29,8 @@ import common.TestUtils._ import common._ import common.rest.WskRestOperations import spray.json.JsString -import whisk.common.TransactionId -import whisk.utils.retry +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.utils.retry @RunWith(classOf[JUnitRunner]) class CacheConcurrencyTests extends FlatSpec with WskTestHelpers with WskActorSystem with BeforeAndAfterEach { diff --git a/tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/CleanUpActivationsTest.scala similarity index 99% rename from tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/CleanUpActivationsTest.scala index 6a838e6e9a4..ac07f76087a 100644 --- a/tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/CleanUpActivationsTest.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.io.File import java.time.Instant diff --git a/tests/src/test/scala/whisk/core/database/test/CouchDbRestClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/CouchDbRestClientTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/database/test/CouchDbRestClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/CouchDbRestClientTests.scala index 50b80fc261c..68601bc865c 100644 --- a/tests/src/test/scala/whisk/core/database/test/CouchDbRestClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/CouchDbRestClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import scala.concurrent.Await import scala.concurrent.Future @@ -39,9 +39,9 @@ import common.WskActorSystem import pureconfig._ import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.ConfigKeys -import whisk.core.database.CouchDbConfig -import whisk.test.http.RESTProxy +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.database.CouchDbConfig +import org.apache.openwhisk.test.http.RESTProxy @RunWith(classOf[JUnitRunner]) class CouchDbRestClientTests diff --git a/tests/src/test/scala/whisk/core/database/test/DatabaseScriptTestUtils.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/DatabaseScriptTestUtils.scala similarity index 91% rename from tests/src/test/scala/whisk/core/database/test/DatabaseScriptTestUtils.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/DatabaseScriptTestUtils.scala index b8c341ddf45..85e882868b8 100644 --- a/tests/src/test/scala/whisk/core/database/test/DatabaseScriptTestUtils.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/DatabaseScriptTestUtils.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import scala.concurrent.duration.DurationInt import scala.io.Source @@ -28,11 +28,11 @@ import common.WhiskProperties import pureconfig._ import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.Logging -import whisk.core.ConfigKeys -import whisk.core.WhiskConfig -import whisk.core.database.CouchDbRestClient -import whisk.core.database.CouchDbConfig +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.ConfigKeys +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.database.CouchDbRestClient +import org.apache.openwhisk.core.database.CouchDbConfig trait DatabaseScriptTestUtils extends ScalaFutures with Matchers with WaitFor with IntegrationPatience { @@ -52,7 +52,7 @@ trait DatabaseScriptTestUtils extends ScalaFutures with Matchers with WaitFor wi val dbPrefix = WhiskProperties.getProperty(WhiskConfig.dbPrefix) val dbUrl = DatabaseUrl(dbProtocol, dbUsername, dbPassword, dbHost, dbPort.toString) - def retry[T](task: => T) = whisk.utils.retry(task, 10, Some(500.milliseconds)) + def retry[T](task: => T) = org.apache.openwhisk.utils.retry(task, 10, Some(500.milliseconds)) /** Creates a new database with the given name */ def createDatabase(name: String, designDocPath: Option[String])(implicit as: ActorSystem, logging: Logging) = { diff --git a/tests/src/test/scala/whisk/core/database/test/DbUtils.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/DbUtils.scala similarity index 97% rename from tests/src/test/scala/whisk/core/database/test/DbUtils.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/DbUtils.scala index 28a360dc2bf..b5989da0ba4 100644 --- a/tests/src/test/scala/whisk/core/database/test/DbUtils.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/DbUtils.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.util.Base64 import java.util.concurrent.TimeoutException @@ -27,12 +27,12 @@ import akka.util.ByteString import org.scalatest.Assertions import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.TransactionId -import whisk.core.database._ -import whisk.core.database.memory.MemoryArtifactStore -import whisk.core.entity.Attachments.Attached -import whisk.core.entity._ -import whisk.core.entity.types.{AuthStore, EntityStore} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.database.memory.MemoryArtifactStore +import org.apache.openwhisk.core.entity.Attachments.Attached +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.types.{AuthStore, EntityStore} import scala.collection.mutable.ListBuffer import scala.concurrent.{Await, ExecutionContext, Future} diff --git a/tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/DocumentHandlerTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/DocumentHandlerTests.scala index e5765f7e7b4..725162b4a29 100644 --- a/tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/DocumentHandlerTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.util.concurrent.atomic.AtomicInteger @@ -26,11 +26,11 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers, OptionValues} import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.common.TransactionId -import whisk.core.database.SubjectHandler.SubjectView -import whisk.core.database.WhisksHandler.ROOT_NS -import whisk.core.database._ -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.SubjectHandler.SubjectView +import org.apache.openwhisk.core.database.WhisksHandler.ROOT_NS +import org.apache.openwhisk.core.database._ +import org.apache.openwhisk.core.entity._ import scala.concurrent.Future diff --git a/tests/src/test/scala/whisk/core/database/test/ExtendedCouchDbRestClient.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/ExtendedCouchDbRestClient.scala similarity index 94% rename from tests/src/test/scala/whisk/core/database/test/ExtendedCouchDbRestClient.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/ExtendedCouchDbRestClient.scala index a4019c9bf07..bdbd78ffd93 100644 --- a/tests/src/test/scala/whisk/core/database/test/ExtendedCouchDbRestClient.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/ExtendedCouchDbRestClient.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import scala.concurrent.Future @@ -25,9 +25,9 @@ import akka.http.scaladsl.model._ import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.Logging -import whisk.core.database.CouchDbRestClient -import whisk.http.PoolingRestClient._ +import org.apache.openwhisk.common.Logging +import org.apache.openwhisk.core.database.CouchDbRestClient +import org.apache.openwhisk.http.PoolingRestClient._ /** * Implementation of additional endpoints that should only be used in testing. diff --git a/tests/src/test/scala/whisk/core/database/test/MultipleReadersSingleWriterCacheTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/MultipleReadersSingleWriterCacheTests.scala similarity index 89% rename from tests/src/test/scala/whisk/core/database/test/MultipleReadersSingleWriterCacheTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/MultipleReadersSingleWriterCacheTests.scala index 719672217d5..e0d5933b9bc 100644 --- a/tests/src/test/scala/whisk/core/database/test/MultipleReadersSingleWriterCacheTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/MultipleReadersSingleWriterCacheTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.util.concurrent.atomic.AtomicInteger @@ -30,10 +30,10 @@ import org.scalatest.junit.JUnitRunner import common.StreamLogging import common.WskActorSystem -import whisk.common.TransactionId -import whisk.core.database.CacheChangeNotification -import whisk.core.database.MultipleReadersSingleWriterCache -import whisk.core.entity.CacheKey +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.CacheChangeNotification +import org.apache.openwhisk.core.database.MultipleReadersSingleWriterCache +import org.apache.openwhisk.core.entity.CacheKey @RunWith(classOf[JUnitRunner]) class MultipleReadersSingleWriterCacheTests diff --git a/tests/src/test/scala/whisk/core/database/test/RemoveLogsTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/RemoveLogsTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/database/test/RemoveLogsTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/RemoveLogsTests.scala index bebb9dd3535..c2c89170b0b 100644 --- a/tests/src/test/scala/whisk/core/database/test/RemoveLogsTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/RemoveLogsTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.io.File import java.time.Instant @@ -29,12 +29,12 @@ import common.StreamLogging import common.TestUtils import common.WhiskProperties import common.WskActorSystem -import whisk.core.entity.ActivationId -import whisk.core.entity.EntityName -import whisk.core.entity.EntityPath -import whisk.core.entity.Subject -import whisk.core.entity.WhiskActivation -import whisk.core.entity.ActivationLogs +import org.apache.openwhisk.core.entity.ActivationId +import org.apache.openwhisk.core.entity.EntityName +import org.apache.openwhisk.core.entity.EntityPath +import org.apache.openwhisk.core.entity.Subject +import org.apache.openwhisk.core.entity.WhiskActivation +import org.apache.openwhisk.core.entity.ActivationLogs @RunWith(classOf[JUnitRunner]) class RemoveLogsTests extends FlatSpec with DatabaseScriptTestUtils with StreamLogging with WskActorSystem { diff --git a/tests/src/test/scala/whisk/core/database/test/ReplicatorTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/ReplicatorTests.scala similarity index 99% rename from tests/src/test/scala/whisk/core/database/test/ReplicatorTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/ReplicatorTests.scala index 8d8e1f3d980..681ee99786f 100644 --- a/tests/src/test/scala/whisk/core/database/test/ReplicatorTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/ReplicatorTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test +package org.apache.openwhisk.core.database.test import java.io.File import java.time.Instant diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreActivationsQueryBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreActivationsQueryBehaviors.scala similarity index 89% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreActivationsQueryBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreActivationsQueryBehaviors.scala index 7f4ffbf4b7c..30129fbadde 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreActivationsQueryBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreActivationsQueryBehaviors.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior -import whisk.common.TransactionId -import whisk.core.entity.WhiskEntityQueries.TOP -import whisk.core.entity.{EntityPath, WhiskActivation} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.WhiskEntityQueries.TOP +import org.apache.openwhisk.core.entity.{EntityPath, WhiskActivation} trait ArtifactStoreActivationsQueryBehaviors extends ArtifactStoreBehaviorBase { diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreAttachmentBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreAttachmentBehaviors.scala similarity index 95% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreAttachmentBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreAttachmentBehaviors.scala index ec7fbe67361..ef571ba826d 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreAttachmentBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreAttachmentBehaviors.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import java.io.ByteArrayOutputStream import java.util.Base64 @@ -24,11 +24,11 @@ import akka.http.scaladsl.model.{ContentTypes, Uri} import akka.stream.IOResult import akka.stream.scaladsl.{Sink, StreamConverters} import akka.util.{ByteString, ByteStringBuilder} -import whisk.common.TransactionId -import whisk.core.database.{AttachmentSupport, CacheChangeNotification, NoDocumentException} -import whisk.core.entity.Attachments.{Attached, Attachment, Inline} -import whisk.core.entity.test.ExecHelpers -import whisk.core.entity.{CodeExec, DocInfo, EntityName, WhiskAction} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.{AttachmentSupport, CacheChangeNotification, NoDocumentException} +import org.apache.openwhisk.core.entity.Attachments.{Attached, Attachment, Inline} +import org.apache.openwhisk.core.entity.test.ExecHelpers +import org.apache.openwhisk.core.entity.{CodeExec, DocInfo, EntityName, WhiskAction} import scala.concurrent.duration.DurationInt diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreBehavior.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreBehavior.scala similarity index 95% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreBehavior.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreBehavior.scala index add479e202c..a2a574c58e4 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreBehavior.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreBehavior.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior trait ArtifactStoreBehavior extends ArtifactStoreBehaviorBase diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreBehaviorBase.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreBehaviorBase.scala similarity index 91% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreBehaviorBase.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreBehaviorBase.scala index 8b6e86ee55c..0ec578db907 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreBehaviorBase.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreBehaviorBase.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import java.time.Instant @@ -24,14 +24,14 @@ import common.{StreamLogging, WskActorSystem} import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, FlatSpec, Matchers} import spray.json.{JsObject, JsValue} -import whisk.common.TransactionId -import whisk.core.database.memory.MemoryAttachmentStore -import whisk.core.database.test.DbUtils -import whisk.core.database.test.behavior.ArtifactStoreTestUtil.storeAvailable -import whisk.core.database.{ArtifactStore, AttachmentStore, StaleParameter} -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.utils.JsHelpers +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.memory.MemoryAttachmentStore +import org.apache.openwhisk.core.database.test.DbUtils +import org.apache.openwhisk.core.database.test.behavior.ArtifactStoreTestUtil.storeAvailable +import org.apache.openwhisk.core.database.{ArtifactStore, AttachmentStore, StaleParameter} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.utils.JsHelpers import scala.util.{Random, Try} diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala similarity index 95% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala index fb3fa62bf29..9e8fc1fd730 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import java.time.Instant -import whisk.common.TransactionId -import whisk.core.database.{DocumentConflictException, NoDocumentException} -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.{DocumentConflictException, NoDocumentException} +import org.apache.openwhisk.core.entity._ trait ArtifactStoreCRUDBehaviors extends ArtifactStoreBehaviorBase { diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreQueryBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreQueryBehaviors.scala similarity index 97% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreQueryBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreQueryBehaviors.scala index 5b63602d480..d7c9f0302ec 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreQueryBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreQueryBehaviors.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import spray.json.{JsArray, JsNumber, JsObject, JsString} -import whisk.common.TransactionId -import whisk.core.entity.WhiskEntityQueries.TOP -import whisk.core.entity.{EntityPath, WhiskAction, WhiskActivation, WhiskEntity} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.WhiskEntityQueries.TOP +import org.apache.openwhisk.core.entity.{EntityPath, WhiskAction, WhiskActivation, WhiskEntity} trait ArtifactStoreQueryBehaviors extends ArtifactStoreBehaviorBase { diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreSubjectQueryBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreSubjectQueryBehaviors.scala similarity index 95% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreSubjectQueryBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreSubjectQueryBehaviors.scala index 5b34ec0b9b8..d3b1763993a 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreSubjectQueryBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreSubjectQueryBehaviors.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import spray.json.{JsBoolean, JsObject, JsString} -import whisk.common.TransactionId -import whisk.core.database.NoDocumentException -import whisk.core.entity._ -import whisk.core.invoker.NamespaceBlacklist -import whisk.utils.JsHelpers +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.NoDocumentException +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.invoker.NamespaceBlacklist +import org.apache.openwhisk.utils.JsHelpers trait ArtifactStoreSubjectQueryBehaviors extends ArtifactStoreBehaviorBase { diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreTestUtil.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreTestUtil.scala similarity index 95% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreTestUtil.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreTestUtil.scala index 417a0d0f351..0680e66d1a9 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreTestUtil.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreTestUtil.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import common.TestUtils diff --git a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala similarity index 93% rename from tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala rename to tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala index 77334066987..3d3de555289 100644 --- a/tests/src/test/scala/whisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.database.test.behavior +package org.apache.openwhisk.core.database.test.behavior import java.time.Instant -import whisk.common.TransactionId -import whisk.core.entity.WhiskEntityQueries.TOP -import whisk.core.entity._ +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.entity.WhiskEntityQueries.TOP +import org.apache.openwhisk.core.entity._ trait ArtifactStoreWhisksQueryBehaviors extends ArtifactStoreBehaviorBase { diff --git a/tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ActivationResponseTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/ActivationResponseTests.scala index bbc525772df..73f3d35f074 100644 --- a/tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ActivationResponseTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import scala.Vector import org.junit.runner.RunWith @@ -23,10 +23,10 @@ import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import spray.json._ -import whisk.common.PrintStreamLogging -import whisk.core.entity.ActivationResponse._ -import whisk.core.entity.size.SizeInt -import whisk.http.Messages._ +import org.apache.openwhisk.common.PrintStreamLogging +import org.apache.openwhisk.core.entity.ActivationResponse._ +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.http.Messages._ import scala.Left import scala.Right diff --git a/tests/src/test/scala/whisk/core/entity/test/ControllerInstanceIdTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ControllerInstanceIdTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/entity/test/ControllerInstanceIdTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/ControllerInstanceIdTests.scala index 0845033d3a3..bf5e60d0994 100644 --- a/tests/src/test/scala/whisk/core/entity/test/ControllerInstanceIdTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ControllerInstanceIdTests.scala @@ -15,13 +15,13 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner -import whisk.core.entity.ControllerInstanceId +import org.apache.openwhisk.core.entity.ControllerInstanceId @RunWith(classOf[JUnitRunner]) class ControllerInstanceIdTests extends FlatSpec with Matchers { diff --git a/tests/src/test/scala/whisk/core/entity/test/DatastoreTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/DatastoreTests.scala similarity index 97% rename from tests/src/test/scala/whisk/core/entity/test/DatastoreTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/DatastoreTests.scala index 680b9e62edd..43c7f268b39 100644 --- a/tests/src/test/scala/whisk/core/entity/test/DatastoreTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/DatastoreTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import java.time.Instant @@ -30,11 +30,11 @@ import common.StreamLogging import common.WskActorSystem import org.scalatest.mockito.MockitoSugar import org.mockito.Mockito._ -import whisk.core.database.DocumentConflictException -import whisk.core.database.CacheChangeNotification -import whisk.core.database.NoDocumentException -import whisk.core.database.test.DbUtils -import whisk.core.entity._ +import org.apache.openwhisk.core.database.DocumentConflictException +import org.apache.openwhisk.core.database.CacheChangeNotification +import org.apache.openwhisk.core.database.NoDocumentException +import org.apache.openwhisk.core.database.test.DbUtils +import org.apache.openwhisk.core.entity._ @RunWith(classOf[JUnitRunner]) class DatastoreTests diff --git a/tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala similarity index 95% rename from tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala index 7bf608ca5e1..60be5f9e417 100644 --- a/tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala @@ -15,17 +15,17 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import org.scalatest.Matchers import org.scalatest.Suite import common.StreamLogging import common.WskActorSystem -import whisk.core.WhiskConfig -import whisk.core.entity._ -import whisk.core.entity.ArgNormalizer.trim -import whisk.core.entity.ExecManifest._ -import whisk.core.entity.size._ +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.ArgNormalizer.trim +import org.apache.openwhisk.core.entity.ExecManifest._ +import org.apache.openwhisk.core.entity.size._ import spray.json._ import spray.json.DefaultJsonProtocol._ diff --git a/tests/src/test/scala/whisk/core/entity/test/ExecManifestTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecManifestTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/entity/test/ExecManifestTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecManifestTests.scala index bd1674c748c..6c5c2adbd03 100644 --- a/tests/src/test/scala/whisk/core/entity/test/ExecManifestTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecManifestTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import common.{StreamLogging, WskActorSystem} import org.junit.runner.RunWith @@ -23,10 +23,10 @@ import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers} import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.entity.ExecManifest -import whisk.core.entity.ExecManifest._ -import whisk.core.entity.size._ -import whisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.ExecManifest +import org.apache.openwhisk.core.entity.ExecManifest._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.entity.ByteSize import scala.util.Success diff --git a/tests/src/test/scala/whisk/core/entity/test/ExecTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/entity/test/ExecTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecTests.scala index 0a6397b1939..4c692b37cdd 100644 --- a/tests/src/test/scala/whisk/core/entity/test/ExecTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import akka.http.scaladsl.model.ContentTypes import common.StreamLogging @@ -23,10 +23,17 @@ import spray.json._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers} -import whisk.core.WhiskConfig -import whisk.core.entity.Attachments.{Attached, Inline} -import whisk.core.entity.ExecManifest.ImageName -import whisk.core.entity.{BlackBoxExec, CodeExecAsAttachment, CodeExecAsString, Exec, ExecManifest, WhiskAction} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.entity.Attachments.{Attached, Inline} +import org.apache.openwhisk.core.entity.ExecManifest.ImageName +import org.apache.openwhisk.core.entity.{ + BlackBoxExec, + CodeExecAsAttachment, + CodeExecAsString, + Exec, + ExecManifest, + WhiskAction +} import scala.collection.mutable diff --git a/tests/src/test/scala/whisk/core/entity/test/MigrationEntities.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/MigrationEntities.scala similarity index 95% rename from tests/src/test/scala/whisk/core/entity/test/MigrationEntities.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/MigrationEntities.scala index 4c65f79e129..101bcbdf0a4 100644 --- a/tests/src/test/scala/whisk/core/entity/test/MigrationEntities.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/MigrationEntities.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test -import whisk.core.database.DocumentFactory +import org.apache.openwhisk.core.database.DocumentFactory import spray.json._ -import whisk.core.entity._ +import org.apache.openwhisk.core.entity._ /** * Contains types which represent former versions of database schemas diff --git a/tests/src/test/scala/whisk/core/entity/test/SchemaTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/entity/test/SchemaTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala index 72458504c01..05e7a6a8e11 100644 --- a/tests/src/test/scala/whisk/core/entity/test/SchemaTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import java.util.Base64 @@ -30,14 +30,14 @@ import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.common.TransactionId -import whisk.core.controller.test.WhiskAuthHelpers -import whisk.core.entitlement.Privilege -import whisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} -import whisk.core.entity._ -import whisk.core.entity.size.SizeInt -import whisk.http.Messages -import whisk.utils.JsHelpers +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.controller.test.WhiskAuthHelpers +import org.apache.openwhisk.core.entitlement.Privilege +import org.apache.openwhisk.core.entity.ExecManifest.{ImageName, RuntimeManifest} +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.utils.JsHelpers @RunWith(classOf[JUnitRunner]) class SchemaTests extends FlatSpec with BeforeAndAfter with ExecHelpers with Matchers { diff --git a/tests/src/test/scala/whisk/core/entity/test/SizeTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SizeTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/entity/test/SizeTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/SizeTests.scala index d800f141a7f..3a98c591381 100644 --- a/tests/src/test/scala/whisk/core/entity/test/SizeTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SizeTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import scala.language.postfixOps @@ -24,8 +24,8 @@ import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import spray.json._ -import whisk.core.entity.size.SizeInt -import whisk.core.entity.ByteSize +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.entity.ByteSize @RunWith(classOf[JUnitRunner]) class SizeTests extends FlatSpec with Matchers { @@ -195,7 +195,7 @@ class SizeTests extends FlatSpec with Matchers { } it should "read and write size as JSON" in { - import whisk.core.entity.size.serdes + import org.apache.openwhisk.core.entity.size.serdes serdes.read(JsString("3b")) should be(3 B) serdes.write(3 B) should be(JsString("3 B")) a[DeserializationException] should be thrownBy (serdes.read(JsNumber(3))) diff --git a/tests/src/test/scala/whisk/core/entity/test/ViewTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ViewTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/entity/test/ViewTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/ViewTests.scala index 8af3dd71401..be4bb3e5588 100644 --- a/tests/src/test/scala/whisk/core/entity/test/ViewTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ViewTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import java.time.Clock import java.time.Instant @@ -28,11 +28,11 @@ import org.scalatest.junit.JUnitRunner import akka.stream.ActorMaterializer import common.StreamLogging import common.WskActorSystem -import whisk.core.controller.test.WhiskAuthHelpers -import whisk.core.database.ArtifactStore -import whisk.core.database.StaleParameter -import whisk.core.database.test.DbUtils -import whisk.core.entity._ +import org.apache.openwhisk.core.controller.test.WhiskAuthHelpers +import org.apache.openwhisk.core.database.ArtifactStore +import org.apache.openwhisk.core.database.StaleParameter +import org.apache.openwhisk.core.database.test.DbUtils +import org.apache.openwhisk.core.entity._ @RunWith(classOf[JUnitRunner]) class ViewTests diff --git a/tests/src/test/scala/whisk/core/entity/test/WhiskEntityTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala similarity index 86% rename from tests/src/test/scala/whisk/core/entity/test/WhiskEntityTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala index 6918ea297df..4ce12b3fa5c 100644 --- a/tests/src/test/scala/whisk/core/entity/test/WhiskEntityTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala @@ -15,32 +15,32 @@ * limitations under the License. */ -package whisk.core.entity.test +package org.apache.openwhisk.core.entity.test import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner -import whisk.core.entity.EntityPath -import whisk.core.entity.EntityName -import whisk.core.entity.WhiskAction -import whisk.core.entity.DocRevision -import whisk.core.entity.Parameters -import whisk.core.entity.FullyQualifiedEntityName -import whisk.core.entity.SequenceExec -import whisk.core.entity.WhiskPackage -import whisk.core.entity.WhiskActivation -import whisk.core.entity.Subject -import whisk.core.entity.ActivationId +import org.apache.openwhisk.core.entity.EntityPath +import org.apache.openwhisk.core.entity.EntityName +import org.apache.openwhisk.core.entity.WhiskAction +import org.apache.openwhisk.core.entity.DocRevision +import org.apache.openwhisk.core.entity.Parameters +import org.apache.openwhisk.core.entity.FullyQualifiedEntityName +import org.apache.openwhisk.core.entity.SequenceExec +import org.apache.openwhisk.core.entity.WhiskPackage +import org.apache.openwhisk.core.entity.WhiskActivation +import org.apache.openwhisk.core.entity.Subject +import org.apache.openwhisk.core.entity.ActivationId import java.time.Instant import spray.json.JsString -import whisk.core.entity.ActivationLogs -import whisk.core.entity.WhiskTrigger -import whisk.core.entity.ReducedRule -import whisk.core.entity.Status -import whisk.core.entity.WhiskEntity -import whisk.core.entity.WhiskRule +import org.apache.openwhisk.core.entity.ActivationLogs +import org.apache.openwhisk.core.entity.WhiskTrigger +import org.apache.openwhisk.core.entity.ReducedRule +import org.apache.openwhisk.core.entity.Status +import org.apache.openwhisk.core.entity.WhiskEntity +import org.apache.openwhisk.core.entity.WhiskRule @RunWith(classOf[JUnitRunner]) class WhiskEntityTests extends FlatSpec with ExecHelpers with Matchers { diff --git a/tests/src/test/scala/whisk/core/invoker/test/InstanceIdAssignerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/InstanceIdAssignerTests.scala similarity index 94% rename from tests/src/test/scala/whisk/core/invoker/test/InstanceIdAssignerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/invoker/test/InstanceIdAssignerTests.scala index ef9b03896b2..038f373a1de 100644 --- a/tests/src/test/scala/whisk/core/invoker/test/InstanceIdAssignerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/InstanceIdAssignerTests.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package whisk.core.invoker.test +package org.apache.openwhisk.core.invoker.test import common.StreamLogging import org.apache.curator.test.TestingServer import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfterEach, FlatSpec, Matchers} -import whisk.core.invoker.InstanceIdAssigner +import org.apache.openwhisk.core.invoker.InstanceIdAssigner @RunWith(classOf[JUnitRunner]) class InstanceIdAssignerTests extends FlatSpec with Matchers with StreamLogging with BeforeAndAfterEach { diff --git a/tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/NamespaceBlacklistTests.scala similarity index 93% rename from tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/invoker/test/NamespaceBlacklistTests.scala index c9f5a7f44ce..3c831496cff 100644 --- a/tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/NamespaceBlacklistTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.invoker.test +package org.apache.openwhisk.core.invoker.test import akka.stream.ActorMaterializer import common.{StreamLogging, WskActorSystem} @@ -24,11 +24,11 @@ import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers} import spray.json._ -import whisk.common.TransactionId -import whisk.core.database.test.DbUtils -import whisk.core.entity._ -import whisk.core.invoker.NamespaceBlacklist -import whisk.utils.{retry => testRetry} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.database.test.DbUtils +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.invoker.NamespaceBlacklist +import org.apache.openwhisk.utils.{retry => testRetry} import scala.concurrent.duration._ diff --git a/tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala similarity index 98% rename from tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala index e32cd9d747a..3acafcc739d 100644 --- a/tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.limits +package org.apache.openwhisk.core.limits import akka.http.scaladsl.model.StatusCodes.RequestEntityTooLarge import akka.http.scaladsl.model.StatusCodes.BadGateway @@ -39,9 +39,17 @@ import common.WskActorSystem import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.entity.{ActivationEntityLimit, ActivationResponse, ByteSize, Exec, LogLimit, MemoryLimit, TimeLimit} -import whisk.core.entity.size._ -import whisk.http.Messages +import org.apache.openwhisk.core.entity.{ + ActivationEntityLimit, + ActivationResponse, + ByteSize, + Exec, + LogLimit, + MemoryLimit, + TimeLimit +} +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.http.Messages @RunWith(classOf[JUnitRunner]) class ActionLimitsTests extends TestHelpers with WskTestHelpers with WskActorSystem { diff --git a/tests/src/test/scala/whisk/core/limits/MaxActionDurationTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/limits/MaxActionDurationTests.scala similarity index 95% rename from tests/src/test/scala/whisk/core/limits/MaxActionDurationTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/limits/MaxActionDurationTests.scala index 591c8a955e7..14ad88294de 100644 --- a/tests/src/test/scala/whisk/core/limits/MaxActionDurationTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/limits/MaxActionDurationTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.limits +package org.apache.openwhisk.core.limits import scala.concurrent.duration.DurationInt @@ -29,11 +29,11 @@ import common.WskProps import common.WskTestHelpers import common.WskActorSystem -import whisk.core.entity._ +import org.apache.openwhisk.core.entity._ import spray.json.DefaultJsonProtocol._ import spray.json._ -import whisk.http.Messages -import whisk.core.entity.TimeLimit +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.core.entity.TimeLimit import org.scalatest.tagobjects.Slow /** diff --git a/tests/src/test/scala/whisk/core/loadBalancer/test/InvokerSupervisionTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/InvokerSupervisionTests.scala similarity index 92% rename from tests/src/test/scala/whisk/core/loadBalancer/test/InvokerSupervisionTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/InvokerSupervisionTests.scala index 587e3d44313..180e3a2d4a5 100644 --- a/tests/src/test/scala/whisk/core/loadBalancer/test/InvokerSupervisionTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/InvokerSupervisionTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.loadBalancer.test +package org.apache.openwhisk.core.loadBalancer.test import scala.collection.mutable import scala.concurrent.Await @@ -43,26 +43,26 @@ import akka.testkit.TestKit import akka.testkit.TestProbe import akka.util.Timeout import common.{LoggedFunction, StreamLogging} -import whisk.common.TransactionId -import whisk.core.WhiskConfig -import whisk.core.connector.ActivationMessage -import whisk.core.connector.PingMessage -import whisk.core.entity.ActivationId.ActivationIdGenerator -import whisk.core.entity._ -import whisk.core.entity.size._ -import whisk.core.loadBalancer.ActivationRequest -import whisk.core.loadBalancer.GetStatus -import whisk.core.loadBalancer.InvokerState._ -import whisk.core.loadBalancer.InvocationFinishedResult -import whisk.core.loadBalancer.InvocationFinishedMessage -import whisk.core.loadBalancer.InvokerActor -import whisk.core.loadBalancer.InvokerPool -import whisk.core.loadBalancer.InvokerState -import whisk.core.loadBalancer.InvokerHealth -import whisk.utils.retry -import whisk.core.connector.test.TestConnector -import whisk.core.entitlement.Privilege -import whisk.core.entity.ControllerInstanceId +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.ActivationMessage +import org.apache.openwhisk.core.connector.PingMessage +import org.apache.openwhisk.core.entity.ActivationId.ActivationIdGenerator +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.loadBalancer.ActivationRequest +import org.apache.openwhisk.core.loadBalancer.GetStatus +import org.apache.openwhisk.core.loadBalancer.InvokerState._ +import org.apache.openwhisk.core.loadBalancer.InvocationFinishedResult +import org.apache.openwhisk.core.loadBalancer.InvocationFinishedMessage +import org.apache.openwhisk.core.loadBalancer.InvokerActor +import org.apache.openwhisk.core.loadBalancer.InvokerPool +import org.apache.openwhisk.core.loadBalancer.InvokerState +import org.apache.openwhisk.core.loadBalancer.InvokerHealth +import org.apache.openwhisk.utils.retry +import org.apache.openwhisk.core.connector.test.TestConnector +import org.apache.openwhisk.core.entitlement.Privilege +import org.apache.openwhisk.core.entity.ControllerInstanceId @RunWith(classOf[JUnitRunner]) class InvokerSupervisionTests diff --git a/tests/src/test/scala/whisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala similarity index 96% rename from tests/src/test/scala/whisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala rename to tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala index be0dc007fb3..72250bfed8d 100644 --- a/tests/src/test/scala/whisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala @@ -15,17 +15,17 @@ * limitations under the License. */ -package whisk.core.loadBalancer.test +package org.apache.openwhisk.core.loadBalancer.test import common.StreamLogging import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpec, Matchers} -import whisk.common.{ForcibleSemaphore, TransactionId} -import whisk.core.entity.{ByteSize, InvokerInstanceId, MemoryLimit} -import whisk.core.entity.size._ -import whisk.core.loadBalancer.InvokerState._ -import whisk.core.loadBalancer._ +import org.apache.openwhisk.common.{ForcibleSemaphore, TransactionId} +import org.apache.openwhisk.core.entity.{ByteSize, InvokerInstanceId, MemoryLimit} +import org.apache.openwhisk.core.entity.size._ +import org.apache.openwhisk.core.loadBalancer.InvokerState._ +import org.apache.openwhisk.core.loadBalancer._ /** * Unit tests for the ContainerPool object. diff --git a/tests/src/test/scala/whisk/http/PoolingRestClientTests.scala b/tests/src/test/scala/org/apache/openwhisk/http/PoolingRestClientTests.scala similarity index 98% rename from tests/src/test/scala/whisk/http/PoolingRestClientTests.scala rename to tests/src/test/scala/org/apache/openwhisk/http/PoolingRestClientTests.scala index d8be97ae394..ccb53d7e347 100644 --- a/tests/src/test/scala/whisk/http/PoolingRestClientTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/http/PoolingRestClientTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.http +package org.apache.openwhisk.http import org.junit.runner.RunWith import org.scalatest.{FlatSpecLike, Matchers} @@ -42,7 +42,7 @@ import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Future, Promise, TimeoutException} import scala.util.{Success, Try} -import whisk.http.PoolingRestClient._ +import org.apache.openwhisk.http.PoolingRestClient._ @RunWith(classOf[JUnitRunner]) class PoolingRestClientTests diff --git a/tests/src/test/scala/whisk/spi/SpiTests.scala b/tests/src/test/scala/org/apache/openwhisk/spi/SpiTests.scala similarity index 98% rename from tests/src/test/scala/whisk/spi/SpiTests.scala rename to tests/src/test/scala/org/apache/openwhisk/spi/SpiTests.scala index f865a8aa0c4..40425261200 100644 --- a/tests/src/test/scala/whisk/spi/SpiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/spi/SpiTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.spi +package org.apache.openwhisk.spi import com.typesafe.config.ConfigException import common.StreamLogging diff --git a/tests/src/test/scala/whisk/test/http/RESTProxy.scala b/tests/src/test/scala/org/apache/openwhisk/test/http/RESTProxy.scala similarity index 99% rename from tests/src/test/scala/whisk/test/http/RESTProxy.scala rename to tests/src/test/scala/org/apache/openwhisk/test/http/RESTProxy.scala index 8823aa1a6ec..c4a868ee545 100644 --- a/tests/src/test/scala/whisk/test/http/RESTProxy.scala +++ b/tests/src/test/scala/org/apache/openwhisk/test/http/RESTProxy.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.test.http +package org.apache.openwhisk.test.http import scala.concurrent.Await import scala.concurrent.duration.DurationInt diff --git a/tests/src/test/scala/whisk/utils/test/ExecutionContextFactoryTests.scala b/tests/src/test/scala/org/apache/openwhisk/utils/test/ExecutionContextFactoryTests.scala similarity index 93% rename from tests/src/test/scala/whisk/utils/test/ExecutionContextFactoryTests.scala rename to tests/src/test/scala/org/apache/openwhisk/utils/test/ExecutionContextFactoryTests.scala index 178b2b9a1af..545000fdcac 100644 --- a/tests/src/test/scala/whisk/utils/test/ExecutionContextFactoryTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/utils/test/ExecutionContextFactoryTests.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.utils.test +package org.apache.openwhisk.utils.test import scala.concurrent.Await import scala.concurrent.Future @@ -27,7 +27,7 @@ import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import common.WskActorSystem -import whisk.utils.ExecutionContextFactory.FutureExtensions +import org.apache.openwhisk.utils.ExecutionContextFactory.FutureExtensions @RunWith(classOf[JUnitRunner]) class ExecutionContextFactoryTests extends FlatSpec with Matchers with WskActorSystem { diff --git a/tests/src/test/scala/services/KafkaConnectorTests.scala b/tests/src/test/scala/services/KafkaConnectorTests.scala index 297b1d4ade7..c0a492922cf 100644 --- a/tests/src/test/scala/services/KafkaConnectorTests.scala +++ b/tests/src/test/scala/services/KafkaConnectorTests.scala @@ -27,11 +27,11 @@ import org.apache.kafka.clients.consumer.CommitFailedException import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers} -import whisk.common.TransactionId -import whisk.connector.kafka.{KafkaConsumerConnector, KafkaMessagingProvider, KafkaProducerConnector} -import whisk.core.WhiskConfig -import whisk.core.connector.Message -import whisk.utils.{retry, ExecutionContextFactory} +import org.apache.openwhisk.common.TransactionId +import org.apache.openwhisk.connector.kafka.{KafkaConsumerConnector, KafkaMessagingProvider, KafkaProducerConnector} +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.core.connector.Message +import org.apache.openwhisk.utils.{retry, ExecutionContextFactory} import scala.concurrent.duration.{DurationInt, FiniteDuration} import scala.concurrent.{Await, ExecutionContext} diff --git a/tests/src/test/scala/system/basic/WskActivationTests.scala b/tests/src/test/scala/system/basic/WskActivationTests.scala index 2df8bddf3ba..dafb0a6bcd7 100644 --- a/tests/src/test/scala/system/basic/WskActivationTests.scala +++ b/tests/src/test/scala/system/basic/WskActivationTests.scala @@ -21,7 +21,7 @@ import common.rest.WskRestOperations import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import common._ -import whisk.utils.retry +import org.apache.openwhisk.utils.retry import scala.concurrent.duration._ import spray.json._ diff --git a/tests/src/test/scala/system/basic/WskConductorTests.scala b/tests/src/test/scala/system/basic/WskConductorTests.scala index 0c8d3180ac6..164f0f5ce78 100644 --- a/tests/src/test/scala/system/basic/WskConductorTests.scala +++ b/tests/src/test/scala/system/basic/WskConductorTests.scala @@ -25,9 +25,9 @@ import common._ import common.rest.WskRestOperations import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.entity.size.SizeInt -import whisk.core.WhiskConfig -import whisk.http.Messages._ +import org.apache.openwhisk.core.entity.size.SizeInt +import org.apache.openwhisk.core.WhiskConfig +import org.apache.openwhisk.http.Messages._ @RunWith(classOf[JUnitRunner]) class WskConductorTests extends TestHelpers with WskTestHelpers with JsHelpers with StreamLogging with WskActorSystem { diff --git a/tests/src/test/scala/system/basic/WskRestBasicTests.scala b/tests/src/test/scala/system/basic/WskRestBasicTests.scala index 33cbdbdc202..e2082f405b1 100644 --- a/tests/src/test/scala/system/basic/WskRestBasicTests.scala +++ b/tests/src/test/scala/system/basic/WskRestBasicTests.scala @@ -32,8 +32,8 @@ import common.rest.WskRestOperations import common.rest.RestResult import spray.json._ import spray.json.DefaultJsonProtocol._ -import whisk.core.containerpool.Container -import whisk.http.Messages +import org.apache.openwhisk.core.containerpool.Container +import org.apache.openwhisk.http.Messages @RunWith(classOf[JUnitRunner]) class WskRestBasicTests extends TestHelpers with WskTestHelpers with WskActorSystem { @@ -46,7 +46,7 @@ class WskRestBasicTests extends TestHelpers with WskTestHelpers with WskActorSys /** * Retry operations that need to settle the controller cache */ - def cacheRetry[T](fn: => T) = whisk.utils.retry(fn, 5, Some(1.second)) + def cacheRetry[T](fn: => T) = org.apache.openwhisk.utils.retry(fn, 5, Some(1.second)) behavior of "Wsk REST" @@ -482,7 +482,6 @@ class WskRestBasicTests extends TestHelpers with WskTestHelpers with WskActorSys // Sleep time must be larger than 60 seconds to see the expected exit code // Set sleep time to a value smaller than allowedActionDuration to not raise a timeout val sleepTime = allowedActionDuration - 20.seconds - sleepTime should be >= 60.seconds val params = Map("sleepTimeInMs" -> sleepTime.toMillis.toJson) val res = assetHelper.withCleaner(wsk.action, name) { (action, _) => action.create(name, Some(TestUtils.getTestActionFilename("sleep.js")), timeout = Some(allowedActionDuration)) diff --git a/tests/src/test/scala/system/basic/WskRestRuleTests.scala b/tests/src/test/scala/system/basic/WskRestRuleTests.scala index ac00ab4e2e7..7b2e6f9eb48 100644 --- a/tests/src/test/scala/system/basic/WskRestRuleTests.scala +++ b/tests/src/test/scala/system/basic/WskRestRuleTests.scala @@ -25,7 +25,7 @@ import common.rest.WskRestOperations import common.rest.RestResult import common.WskActorSystem -import whisk.utils.retry +import org.apache.openwhisk.utils.retry import scala.concurrent.duration._ diff --git a/tests/src/test/scala/system/basic/WskSequenceTests.scala b/tests/src/test/scala/system/basic/WskSequenceTests.scala index 0e2b28e9196..dd2a6dd52f2 100644 --- a/tests/src/test/scala/system/basic/WskSequenceTests.scala +++ b/tests/src/test/scala/system/basic/WskSequenceTests.scala @@ -33,7 +33,7 @@ import common.rest.WskRestOperations import spray.json._ import spray.json.DefaultJsonProtocol._ import system.rest.RestUtil -import whisk.http.Messages.sequenceIsTooLong +import org.apache.openwhisk.http.Messages.sequenceIsTooLong /** * Tests sequence execution diff --git a/tools/admin/src/main/scala/whisk/core/cli/CommandMessages.scala b/tools/admin/src/main/scala/org/apache/openwhisk/core/cli/CommandMessages.scala similarity index 98% rename from tools/admin/src/main/scala/whisk/core/cli/CommandMessages.scala rename to tools/admin/src/main/scala/org/apache/openwhisk/core/cli/CommandMessages.scala index 57289506c53..aea3c680e57 100644 --- a/tools/admin/src/main/scala/whisk/core/cli/CommandMessages.scala +++ b/tools/admin/src/main/scala/org/apache/openwhisk/core/cli/CommandMessages.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli +package org.apache.openwhisk.core.cli object CommandMessages { val subjectBlocked = "The subject you want to edit is blocked" diff --git a/tools/admin/src/main/scala/whisk/core/cli/Main.scala b/tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala similarity index 97% rename from tools/admin/src/main/scala/whisk/core/cli/Main.scala rename to tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala index dbce510fdd6..5f3aeb28b00 100644 --- a/tools/admin/src/main/scala/whisk/core/cli/Main.scala +++ b/tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.cli +package org.apache.openwhisk.core.cli import java.io.File @@ -26,8 +26,8 @@ import ch.qos.logback.classic.{Level, LoggerContext} import org.rogach.scallop._ import org.slf4j.LoggerFactory import pureconfig.error.ConfigReaderException -import whisk.common.{AkkaLogging, Logging, TransactionId} -import whisk.core.database.{LimitsCommand, UserCommand} +import org.apache.openwhisk.common.{AkkaLogging, Logging, TransactionId} +import org.apache.openwhisk.core.database.{LimitsCommand, UserCommand} import scala.concurrent.duration.{Duration, DurationInt} import scala.concurrent.{Await, Future} diff --git a/tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala b/tools/admin/src/main/scala/org/apache/openwhisk/core/database/LimitsCommand.scala similarity index 92% rename from tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala rename to tools/admin/src/main/scala/org/apache/openwhisk/core/database/LimitsCommand.scala index 168fc4cb373..0b154301271 100644 --- a/tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala +++ b/tools/admin/src/main/scala/org/apache/openwhisk/core/database/LimitsCommand.scala @@ -15,19 +15,28 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import akka.actor.ActorSystem import akka.stream.ActorMaterializer import org.rogach.scallop.{ScallopConfBase, Subcommand} import spray.json.{JsObject, JsString, JsValue, RootJsonFormat} -import whisk.common.{Logging, TransactionId} -import whisk.core.cli.{CommandError, CommandMessages, IllegalState, WhiskCommand} -import whisk.core.database.LimitsCommand.LimitEntity -import whisk.core.entity.types.AuthStore -import whisk.core.entity.{DocId, DocInfo, DocRevision, EntityName, Subject, UserLimits, WhiskAuth, WhiskDocumentReader} -import whisk.http.Messages -import whisk.spi.SpiLoader +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.cli.{CommandError, CommandMessages, IllegalState, WhiskCommand} +import org.apache.openwhisk.core.database.LimitsCommand.LimitEntity +import org.apache.openwhisk.core.entity.types.AuthStore +import org.apache.openwhisk.core.entity.{ + DocId, + DocInfo, + DocRevision, + EntityName, + Subject, + UserLimits, + WhiskAuth, + WhiskDocumentReader +} +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.spi.SpiLoader import scala.concurrent.{ExecutionContext, Future} import scala.reflect.classTag diff --git a/tools/admin/src/main/scala/whisk/core/database/UserCommand.scala b/tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala similarity index 96% rename from tools/admin/src/main/scala/whisk/core/database/UserCommand.scala rename to tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala index 991b023a03b..91d2e9de069 100644 --- a/tools/admin/src/main/scala/whisk/core/database/UserCommand.scala +++ b/tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala @@ -15,7 +15,7 @@ * limitations under the License. */ -package whisk.core.database +package org.apache.openwhisk.core.database import java.util.UUID @@ -24,13 +24,13 @@ import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Sink, Source} import org.rogach.scallop.{ScallopConfBase, Subcommand} import spray.json.{JsBoolean, JsObject, JsString, JsValue, RootJsonFormat} -import whisk.common.{Logging, TransactionId} -import whisk.core.cli.{CommandError, CommandMessages, IllegalState, WhiskCommand} -import whisk.core.database.UserCommand.ExtendedAuth -import whisk.core.entity.types._ -import whisk.core.entity._ -import whisk.http.Messages -import whisk.spi.SpiLoader +import org.apache.openwhisk.common.{Logging, TransactionId} +import org.apache.openwhisk.core.cli.{CommandError, CommandMessages, IllegalState, WhiskCommand} +import org.apache.openwhisk.core.database.UserCommand.ExtendedAuth +import org.apache.openwhisk.core.entity.types._ +import org.apache.openwhisk.core.entity._ +import org.apache.openwhisk.http.Messages +import org.apache.openwhisk.spi.SpiLoader import scala.concurrent.{ExecutionContext, Future} import scala.reflect.classTag diff --git a/tools/dev/src/main/groovy/intellijRunConfig.groovy b/tools/dev/src/main/groovy/intellijRunConfig.groovy index f497b5e898d..ad2858b22f7 100644 --- a/tools/dev/src/main/groovy/intellijRunConfig.groovy +++ b/tools/dev/src/main/groovy/intellijRunConfig.groovy @@ -44,8 +44,8 @@ def configTemplate = ''' ''' def meta = [ - controller : [main:"whisk.core.controller.Controller"], - invoker : [main:"whisk.core.invoker.Invoker"] + controller : [main:"org.apache.openwhisk.core.controller.Controller"], + invoker : [main:"org.apache.openwhisk.core.invoker.Invoker"] ] //Get names of all running containers