aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dmaap-buscontroller/init-mock-mrc.sh
blob: 75c1a419aa40f2221b746c03ffb4af220a8325d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# $1 is the IP address of the MRC (MR Central) mock server

curl -v -X PUT -d @- http://$1:1080/expectation << EOF
{
	"httpRequest": {
		"method": "GET",
		"path": "/hello"
	},
	"httpResponse": {
		"body": "Hello world!",
		"statusCode": 200
	}
}
EOF
e governing permissions and # limitations under the License. from typing import Dict from onapsdk.exceptions import ResourceNotFound from .sdc_resource import SdcResource class Vfc(SdcResource): """ONAP VFC Object used for SDC operations.""" def __init__(self, name: str, version: str = None, sdc_values: Dict[str, str] = None): """Initialize VFC object. Vfc has to exist in SDC. Args: name (str): Vfc name version (str): Vfc version sdc_values (Dict[str, str], optional): Sdc values of existing Vfc. Defaults to None. Raises: ResourceNotFound: Vfc doesn't exist in SDC """ super().__init__(name=name, version=version, sdc_values=sdc_values) if not sdc_values and not self.exists(): raise ResourceNotFound( "This Vfc has to exist prior to object initialization.") def _really_submit(self) -> None: """Really submit the SDC in order to enable it.""" raise NotImplementedError("Vfc doesn't need _really_submit")