Exemple #1
0
	def __init__(self):
		MetaProcessor.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__),
			ref_schema_directory = "%s/../../artefacts/schemas" % getScriptDir(__file__)
		)
		self.apidiff = None
Exemple #2
0
	def __init__(self):
		MetaAct.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		self.packages = {}
Exemple #3
0
    def __init__(self):
        MetaAct.__init__(self, "%s/input_schema.json" % getScriptDir(__file__))

        self.reference = {}
        self.compared_with = {}

        self.api_diff = {}
Exemple #4
0
	def _detectPlugins(self):
		# TODO(jchaloup): check if the registration directory exists
		plugins_dir = "%s/../../plugins" % getScriptDir(__file__)
		# TODO(jchaloup): check if the directory exists
		for dirName, subdirList, fileList in os.walk(self._registration_directory):
			register_file = "%s/register.json" % (dirName)
			if not os.path.exists(register_file):
				continue

			reg_obj = {}
			with open(register_file, "r") as f:
				reg_obj = json.load(f)

				if type(reg_obj) != type([]):
					reg_obj = [reg_obj]

				for reg in reg_obj:
					if not self._checkRegistration(reg):
						logging.warning("Unable to register %s, invalid register.json: %s" % (reg["id"], reg))
						continue

					self.recipes[reg["id"]] = {
						"class": reg["class"],
						"import": "%s.%s" % (os.path.basename(dirName), reg["file"].split(".")[-2])
					}
Exemple #5
0
	def __init__(self):
		# TODO(jchaloup): put plugins_dir into config file
		Factory.__init__(
			self,
			"%s/../../plugins" % getScriptDir(__file__),
			"infra.system.plugins"
		)
Exemple #6
0
	def __init__(self):
		MetaAct.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		# TODO(jchaloup): extend the input schema to support query for multiple artefacts
		self.artefact = {}
Exemple #7
0
	def __init__(self):
		MetaAct.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		self.itemset_info = {}
		self.items = {}
Exemple #8
0
	def __init__(self):
		MetaAct.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		self.exported_api = {}
		self.packages = {}
		self.mappings = {}
Exemple #9
0
	def __init__(self):
		MetaAct.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		# extracted data
		self.golang_project_packages = {}
		self.golang_project_content_metadata = {}
Exemple #10
0
	def __init__(self, input_schema = "%s/input_schema.json" % getScriptDir(__file__)):
		MetaProcessor.__init__(
			self,
			input_schema
		)

		self.contentmetadataextractor = None
		self.resource = ""
		self.project = ""
		self.commit = ""
Exemple #11
0
	def __init__(self):
		GoSymbolsExtractor.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		self.product = ""
		self.distribution = ""
		self.rpm = ""
		self.build = ""
Exemple #12
0
	def setData(self, data):
		self.project = "github.com/golang/example"
		self.commit = "729b530c489a73532843e664ae9c6db5c686d314"
		self.ipprefix = "github.com/golang/example"
		self.directory = "%s/example" % getScriptDir(__file__)
		self.noGodeps = []

		self.input_validated = True
		self.godeps_on = False

		return True
Exemple #13
0
	def __init__(self):
		MetaAct.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		self.itemset_info = {}
		self.items = {}

		self.product = ""
		self.distribution = ""
		self.package = ""
		self.start_timestamp = 0
		self.end_timestamp = 0
Exemple #14
0
	def __init__(self):
		MetaProcessor.__init__(
			self,
			"%s/input_schema.json" % getScriptDir(__file__)
		)

		# received data
		self.specfile = ""
		self.distribution = ""
		self.product = ""
		self.package = ""

		# extracted data
		self.commit = ""
		self.project = ""
		self.ipprefix = ""
		self.lastupdated = ""
Exemple #15
0
	def __init__(self, input_schema = "%s/input_schema.json" % getScriptDir(__file__)):
		MetaProcessor.__init__(
			self,
			input_schema
		)

		"""Setting implicit flags"""
		self.verbose = False
		self.skip_errors = True

		"""set implicit output"""
		# project
		self.project = ""
		# commit
		self.commit = ""
		# ipprefix
		self.ipprefix = ""

		"""set implicit states"""
		self.directory = ""

		self.gosymbolsextractor = None
Exemple #16
0
	def _validateInput(self, data):
		validator = SchemaValidator()
		schema = "%s/input_schema.json" % getScriptDir(__file__)
		self.input_validated = validator.validateFromFile(schema, data)
		return self.input_validated