From 1b820c61bb288baab8b1b2847670980e4a3937ba Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Tue, 12 Dec 2017 17:54:12 +0100
Subject: [PATCH] FIXUP: remove c&p'd parser
Change-Id: I15c75ba09714f23891c82c18e2b41f808f8f163a
---
parser_interface.go | 148 ----------------------------------------------------
1 file changed, 148 deletions(-)
delete mode 100644 parser_interface.go
diff --git a/parser_interface.go b/parser_interface.go
deleted file mode 100644
index bea7104..0000000
--- a/parser_interface.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package weles
-
-import (
- "time"
-)
-
-// ValidityPeriod denotes timeouts.
-type ValidityPeriod time.Duration
-
-// Priority denotes priority level.
-type Priority string
-
-const (
- LOW Priority = "low"
- MEDIUM Priority = "medium"
- HIGH Priority = "high"
-)
-
-// TestAction is a container for Boot/Push/Run/Pull.
-type TestAction interface{}
-
-// Boot describes the boot part of the test.
-type Boot struct {
- Login string
- Password string
- Prompts []string
- FailureRetry int
- Timeout ValidityPeriod
- InputSequence string
- WaitPattern string
- WaitTime ValidityPeriod
-}
-
-// Push describes the push part of the test.
-type Push struct {
- Uri string
- Dest string
- Alias string
- Timeout ValidityPeriod
-
- // Path defines ArtifactDB path. It's added for Controller purposes.
- Path string
-}
-
-// Run describes the run part of the test.
-type Run struct {
- Name string
- Timeout ValidityPeriod
-}
-
-// Pull describes the pull part of the test,
-// e.g. geting the test results.
-type Pull struct {
- Src string
- Alias string
- Timeout ValidityPeriod
-
- // Path defines ArtifactDB path. It's added for Controller purposes.
- Path string
-}
-
-// ImageDefinition describes images required for the tests.
-type ImageDefinition struct {
- Uri string `yaml:"uri"`
- Md5Uri string `yaml:"md5_uri"`
- Compression string `yaml:"compression"`
-
- // Path defines ArtifactDB path. It's added for Controller purposes.
- Path string
- MD5Path string
-}
-
-// PartitionDefinition describes mapping between images and flash partitions.
-type PartitionDefinition struct {
- Id int `yaml:"id"`
- ImageName string `yaml:"image_name"`
- Size string `yaml:"size"`
- Type string `yaml:"type"`
-}
-
-// Deploy describes preparation for the test.
-type Deploy struct {
- Timeout ValidityPeriod `yaml:"timeout"`
- Images []ImageDefinition `yaml:"images"`
- PartitionLayout []PartitionDefinition `yaml:"partition_layout"`
-}
-
-// TestActions is a container for all actions.
-type TestActions []TestAction
-
-// TestCase describes single test case.
-type TestCase struct {
- CaseName string `yaml:"case_name"`
- TestActions TestActions `yaml:"test_actions"`
-}
-
-// Test describes whole test part.
-type Test struct {
- FailureRetry int `yaml:"failure_retry"`
- Name string `yaml:"name"`
- Timeout ValidityPeriod `yaml:"timeout"`
- TestCases []TestCase `yaml:"test_cases"`
-}
-
-// Action descibes actions executed on the testing board.
-type Action struct {
- Deploy Deploy
- Test Test
-}
-
-// Timeouts describes default timeouts for different actions.
-type Timeouts struct {
- // JobTimeout describes default timeouts for deploy/test.
- JobTimeout ValidityPeriod `yaml:"job"`
- // ActionTimeout describes default timeouts for boot/push/run/pull.
- ActionTimeout ValidityPeriod `yaml:"action"`
-}
-
-// Config contains all informtions needed for the weles to make test.
-type Config struct {
- DeviceType string `yaml:"device_type"`
- JobName string `yaml:"job_name"`
- Timeouts Timeouts `yaml:"timeouts"`
- Priority Priority `yaml:"priority"`
- Action Action `yaml:"actions"`
-}
-
-// YamlParser defines functions operating on the yaml file.
-type YamlParser interface {
- // ParseYaml supplies given Config according to input yaml.
- ParseYaml(in []byte) (Config, error)
-}
--
2.7.4