content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class InvalidInput(Exception):
def __init__(self):
Exception.__init__(self, "Sorry, your input doesn't look good. "
"Or, Maybe you've tried too many times and "
"google thinks you aren't receiving the phone code?")
| class Invalidinput(Exception):
def __init__(self):
Exception.__init__(self, "Sorry, your input doesn't look good. Or, Maybe you've tried too many times and google thinks you aren't receiving the phone code?") |
_formats = {
'cic': [100, "CIrculant Columns"],
'cir': [101, "CIrculant Rows"],
'chb': [102, "Circulant Horizontal Blocks"],
'cvb': [103, "Circulant Vertical Blocks"],
'hsb': [104, "Horizontally Stacked Blocks"],
'vsb': [104, "Vertically Stacked Blocks"]
}
| _formats = {'cic': [100, 'CIrculant Columns'], 'cir': [101, 'CIrculant Rows'], 'chb': [102, 'Circulant Horizontal Blocks'], 'cvb': [103, 'Circulant Vertical Blocks'], 'hsb': [104, 'Horizontally Stacked Blocks'], 'vsb': [104, 'Vertically Stacked Blocks']} |
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
class DependencyElement(object):
def __init__(self, plugin):
self._plugin = plugin
self._dependencies = plugin.get_dependencies()
@property
def slug(self):
return self._plugin.slug
@property
def plugin(self):
return self._plugin
@property
def dependencies(self):
return self._dependencies
def remove_dependency(self, slug):
if slug in self._dependencies:
self._dependencies.remove(slug)
def has_dependencies(self):
return len(self._dependencies) > 0
def has_dependency(self, slug):
return slug in self._dependencies
| class Dependencyelement(object):
def __init__(self, plugin):
self._plugin = plugin
self._dependencies = plugin.get_dependencies()
@property
def slug(self):
return self._plugin.slug
@property
def plugin(self):
return self._plugin
@property
def dependencies(self):
return self._dependencies
def remove_dependency(self, slug):
if slug in self._dependencies:
self._dependencies.remove(slug)
def has_dependencies(self):
return len(self._dependencies) > 0
def has_dependency(self, slug):
return slug in self._dependencies |
# Copyright 2016 The Bazel Authors. 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.
# Implementations of Maven rules in Skylark:
# 1) maven_jar(name, artifact, repository, sha1, settings)
# The API of this is largely the same as the native maven_jar rule,
# except for the server attribute, which is not implemented. The optional
# settings supports passing a custom Maven settings.xml to download the JAR.
# 2) maven_aar(name, artifact, sha1, settings)
# The API of this rule is the same as maven_jar except that the artifact must
# be the Maven coordinate of an AAR and it does not support the historical
# repository and server attributes.
# 3) maven_dependency_plugin()
# This rule downloads the maven-dependency-plugin used internally
# for testing and the implementation for the fetching of artifacts.
#
# Maven coordinates are expected to be in this form:
# groupId:artifactId:version[:packaging][:classifier]
#
# Installation requirements prior to using this rule:
# 1) Maven binary: `mvn`
# 2) Maven plugin: `maven-dependency-plugin:2.10`
# Get it: $ mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get \
# -Dartifact=org.apache.maven.plugins:maven-dependency-plugin:2.10 \
# -Dmaven.repo.local=$HOME/.m2/repository # or specify your own local repository
"""Rules for retrieving Maven dependencies (experimental)"""
MAVEN_CENTRAL_URL = "https://repo1.maven.org/maven2"
# Binary dependencies needed for running the bash commands
DEPS = ["mvn", "openssl", "awk"]
MVN_PLUGIN = "org.apache.maven.plugins:maven-dependency-plugin:2.10"
def _execute(ctx, command):
return ctx.execute(["bash", "-c", """
set -ex
%s""" % command])
# Fail fast
def _check_dependencies(ctx):
for dep in DEPS:
if ctx.which(dep) == None:
fail("%s requires %s as a dependency. Please check your PATH." % (ctx.name, dep))
def _validate_attr(ctx):
if hasattr(ctx.attr, "server") and (ctx.attr.server != None):
fail("%s specifies a 'server' attribute which is currently not supported." % ctx.name)
def _artifact_dir(coordinates):
return "/".join(coordinates.group_id.split(".") +
[coordinates.artifact_id, coordinates.version])
# Creates a struct containing the different parts of an artifact's FQN.
# If the fully_qualified_name does not specify a packaging and the rule does
# not set a default packaging then JAR is assumed.
def _create_coordinates(fully_qualified_name, packaging = "jar"):
parts = fully_qualified_name.split(":")
classifier = None
if len(parts) == 3:
group_id, artifact_id, version = parts
# Updates the FQN with the default packaging so that the Maven plugin
# downloads the correct artifact.
fully_qualified_name = "%s:%s" % (fully_qualified_name, packaging)
elif len(parts) == 4:
group_id, artifact_id, version, packaging = parts
elif len(parts) == 5:
group_id, artifact_id, version, packaging, classifier = parts
else:
fail("Invalid fully qualified name for artifact: %s" % fully_qualified_name)
return struct(
fully_qualified_name = fully_qualified_name,
group_id = group_id,
artifact_id = artifact_id,
packaging = packaging,
classifier = classifier,
version = version,
)
# NOTE: Please use this method to define ALL paths that the maven_*
# rules use. Doing otherwise will lead to inconsistencies and/or errors.
#
# CONVENTION: *_path refers to files, *_dir refers to directories.
def _create_paths(ctx, coordinates):
"""Creates a struct that contains the paths to create the cache WORKSPACE"""
# e.g. guava-18.0.jar
artifact_filename = "%s-%s" % (
coordinates.artifact_id,
coordinates.version,
)
if coordinates.classifier:
artifact_filename += "-" + coordinates.classifier
artifact_filename += "." + coordinates.packaging
sha1_filename = "%s.sha1" % artifact_filename
# e.g. com/google/guava/guava/18.0
relative_artifact_dir = _artifact_dir(coordinates)
# The symlink to the actual artifact is stored in this dir, along with the
# BUILD file. The dir has the same name as the packaging to support syntax
# like @guava//jar and @google_play_services//aar.
symlink_dir = coordinates.packaging
m2 = ".m2"
m2_repo = "/".join([m2, "repository"]) # .m2/repository
return struct(
artifact_filename = artifact_filename,
sha1_filename = sha1_filename,
symlink_dir = ctx.path(symlink_dir),
# e.g. external/com_google_guava_guava/ \
# .m2/repository/com/google/guava/guava/18.0/guava-18.0.jar
artifact_path = ctx.path("/".join([m2_repo, relative_artifact_dir, artifact_filename])),
artifact_dir = ctx.path("/".join([m2_repo, relative_artifact_dir])),
sha1_path = ctx.path("/".join([m2_repo, relative_artifact_dir, sha1_filename])),
# e.g. external/com_google_guava_guava/jar/guava-18.0.jar
symlink_artifact_path = ctx.path("/".join([symlink_dir, artifact_filename])),
)
_maven_jar_build_file_template = """
# DO NOT EDIT: automatically generated BUILD file for maven_jar rule {rule_name}
java_import(
name = 'jar',
jars = ['{artifact_filename}'],
deps = [
{deps_string}
],
visibility = ['//visibility:public']
)
filegroup(
name = 'file',
srcs = ['{artifact_filename}'],
visibility = ['//visibility:public']
)\n"""
_maven_aar_build_file_template = """
# DO NOT EDIT: automatically generated BUILD file for maven_aar rule {rule_name}
aar_import(
name = 'aar',
aar = '{artifact_filename}',
deps = [
{deps_string}
],
visibility = ['//visibility:public'],
)
filegroup(
name = 'file',
srcs = ['{artifact_filename}'],
visibility = ['//visibility:public']
)\n"""
# Provides the syntax "@jar_name//jar" for dependencies
def _generate_build_file(ctx, template, paths):
deps_string = "\n".join(["'%s'," % dep for dep in ctx.attr.deps])
contents = template.format(
rule_name = ctx.name,
artifact_filename = paths.artifact_filename,
deps_string = deps_string,
)
ctx.file("%s/BUILD" % paths.symlink_dir, contents, False)
# Constructs the maven command to retrieve the dependencies from remote
# repositories using the dependency plugin, and executes it.
def _mvn_download(ctx, paths, fully_qualified_name):
# If a custom settings file exists, we'll use that. If not, Maven will use the default settings.
mvn_flags = ""
if hasattr(ctx.attr, "settings") and ctx.attr.settings != None:
ctx.symlink(ctx.attr.settings, "settings.xml")
mvn_flags += "-s %s " % "settings.xml"
# dependency:get step. Downloads the artifact into the local repository.
mvn_get = MVN_PLUGIN + ":get"
mvn_artifact = "-Dartifact=%s" % fully_qualified_name
mvn_transitive = "-Dtransitive=false"
if hasattr(ctx.attr, "repository") and ctx.attr.repository != "":
mvn_flags += "-Dmaven.repo.remote=%s " % ctx.attr.repository
command = " ".join(["mvn", mvn_flags, mvn_get, mvn_transitive, mvn_artifact])
exec_result = _execute(ctx, command)
if exec_result.return_code != 0:
fail("%s\n%s\nFailed to fetch Maven dependency" % (exec_result.stdout, exec_result.stderr))
# dependency:copy step. Moves the artifact from the local repository into //external.
mvn_copy = MVN_PLUGIN + ":copy"
mvn_output_dir = "-DoutputDirectory=%s" % paths.artifact_dir
command = " ".join(["mvn", mvn_flags, mvn_copy, mvn_artifact, mvn_output_dir])
exec_result = _execute(ctx, command)
if exec_result.return_code != 0:
fail("%s\n%s\nFailed to fetch Maven dependency" % (exec_result.stdout, exec_result.stderr))
def _check_sha1(ctx, paths, sha1):
actual_sha1 = _execute(ctx, "openssl sha1 %s | awk '{printf $2}'" % paths.artifact_path).stdout
if sha1.lower() != actual_sha1.lower():
fail(("{rule_name} has SHA-1 of {actual_sha1}, " +
"does not match expected SHA-1 ({expected_sha1})").format(
rule_name = ctx.name,
expected_sha1 = sha1,
actual_sha1 = actual_sha1,
))
else:
_execute(ctx, "echo %s %s > %s" % (sha1, paths.artifact_path, paths.sha1_path))
def _maven_artifact_impl(ctx, default_rule_packaging, build_file_template):
# Ensure that we have all of the dependencies installed
_check_dependencies(ctx)
# Provide warnings and errors about attributes
_validate_attr(ctx)
# Create a struct to contain the different parts of the artifact FQN
coordinates = _create_coordinates(ctx.attr.artifact, default_rule_packaging)
# Create a struct to store the relative and absolute paths needed for this rule
paths = _create_paths(ctx, coordinates)
_generate_build_file(
ctx = ctx,
template = build_file_template,
paths = paths,
)
if _execute(ctx, "mkdir -p %s" % paths.symlink_dir).return_code != 0:
fail("%s: Failed to create dirs in execution root.\n" % ctx.name)
# Download the artifact
_mvn_download(
ctx = ctx,
paths = paths,
fully_qualified_name = coordinates.fully_qualified_name,
)
if (ctx.attr.sha1 != ""):
_check_sha1(
ctx = ctx,
paths = paths,
sha1 = ctx.attr.sha1,
)
ctx.symlink(paths.artifact_path, paths.symlink_artifact_path)
_common_maven_rule_attrs = {
"artifact": attr.string(
default = "",
mandatory = True,
),
"sha1": attr.string(default = ""),
"settings": attr.label(default = None),
# Allow the user to specify deps for the generated java_import or aar_import
# since maven_jar and maven_aar do not automatically pull in transitive
# dependencies.
"deps": attr.label_list(),
}
def _maven_jar_impl(ctx):
_maven_artifact_impl(ctx, "jar", _maven_jar_build_file_template)
def _maven_aar_impl(ctx):
_maven_artifact_impl(ctx, "aar", _maven_aar_build_file_template)
maven_jar = repository_rule(
implementation = _maven_jar_impl,
attrs = dict(_common_maven_rule_attrs.items() + {
# Needed for compatibility reasons with the native maven_jar rule.
"repository": attr.string(default = ""),
"server": attr.label(default = None),
}.items()),
local = False,
)
maven_aar = repository_rule(
implementation = _maven_aar_impl,
attrs = _common_maven_rule_attrs,
local = False,
)
def _maven_dependency_plugin_impl(ctx):
_BUILD_FILE = """
# DO NOT EDIT: automatically generated BUILD file for maven_dependency_plugin
filegroup(
name = 'files',
srcs = glob(['**']),
visibility = ['//visibility:public']
)
"""
ctx.file("BUILD", _BUILD_FILE, False)
_SETTINGS_XML = """
<!-- # DO NOT EDIT: automatically generated settings.xml for maven_dependency_plugin -->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>{localRepository}</localRepository>
<mirrors>
<mirror>
<id>central</id>
<url>{mirror}</url>
<mirrorOf>*,default</mirrorOf>
</mirror>
</mirrors>
</settings>
""".format(
localRepository = ctx.path("repository"),
mirror = MAVEN_CENTRAL_URL,
)
settings_path = ctx.path("settings.xml")
ctx.file("%s" % settings_path, _SETTINGS_XML, False)
# Download the plugin with transitive dependencies
mvn_flags = "-s %s" % settings_path
mvn_get = MVN_PLUGIN + ":get"
mvn_artifact = "-Dartifact=%s" % MVN_PLUGIN
command = " ".join(["mvn", mvn_flags, mvn_get, mvn_artifact])
exec_result = _execute(ctx, command)
if exec_result.return_code != 0:
fail("%s\nFailed to fetch Maven dependency" % exec_result.stderr)
_maven_dependency_plugin = repository_rule(
implementation = _maven_dependency_plugin_impl,
)
def maven_dependency_plugin():
_maven_dependency_plugin(name = "m2")
| """Rules for retrieving Maven dependencies (experimental)"""
maven_central_url = 'https://repo1.maven.org/maven2'
deps = ['mvn', 'openssl', 'awk']
mvn_plugin = 'org.apache.maven.plugins:maven-dependency-plugin:2.10'
def _execute(ctx, command):
return ctx.execute(['bash', '-c', '\nset -ex\n%s' % command])
def _check_dependencies(ctx):
for dep in DEPS:
if ctx.which(dep) == None:
fail('%s requires %s as a dependency. Please check your PATH.' % (ctx.name, dep))
def _validate_attr(ctx):
if hasattr(ctx.attr, 'server') and ctx.attr.server != None:
fail("%s specifies a 'server' attribute which is currently not supported." % ctx.name)
def _artifact_dir(coordinates):
return '/'.join(coordinates.group_id.split('.') + [coordinates.artifact_id, coordinates.version])
def _create_coordinates(fully_qualified_name, packaging='jar'):
parts = fully_qualified_name.split(':')
classifier = None
if len(parts) == 3:
(group_id, artifact_id, version) = parts
fully_qualified_name = '%s:%s' % (fully_qualified_name, packaging)
elif len(parts) == 4:
(group_id, artifact_id, version, packaging) = parts
elif len(parts) == 5:
(group_id, artifact_id, version, packaging, classifier) = parts
else:
fail('Invalid fully qualified name for artifact: %s' % fully_qualified_name)
return struct(fully_qualified_name=fully_qualified_name, group_id=group_id, artifact_id=artifact_id, packaging=packaging, classifier=classifier, version=version)
def _create_paths(ctx, coordinates):
"""Creates a struct that contains the paths to create the cache WORKSPACE"""
artifact_filename = '%s-%s' % (coordinates.artifact_id, coordinates.version)
if coordinates.classifier:
artifact_filename += '-' + coordinates.classifier
artifact_filename += '.' + coordinates.packaging
sha1_filename = '%s.sha1' % artifact_filename
relative_artifact_dir = _artifact_dir(coordinates)
symlink_dir = coordinates.packaging
m2 = '.m2'
m2_repo = '/'.join([m2, 'repository'])
return struct(artifact_filename=artifact_filename, sha1_filename=sha1_filename, symlink_dir=ctx.path(symlink_dir), artifact_path=ctx.path('/'.join([m2_repo, relative_artifact_dir, artifact_filename])), artifact_dir=ctx.path('/'.join([m2_repo, relative_artifact_dir])), sha1_path=ctx.path('/'.join([m2_repo, relative_artifact_dir, sha1_filename])), symlink_artifact_path=ctx.path('/'.join([symlink_dir, artifact_filename])))
_maven_jar_build_file_template = "\n# DO NOT EDIT: automatically generated BUILD file for maven_jar rule {rule_name}\n\njava_import(\n name = 'jar',\n jars = ['{artifact_filename}'],\n deps = [\n{deps_string}\n ],\n visibility = ['//visibility:public']\n)\n\nfilegroup(\n name = 'file',\n srcs = ['{artifact_filename}'],\n visibility = ['//visibility:public']\n)\n"
_maven_aar_build_file_template = "\n# DO NOT EDIT: automatically generated BUILD file for maven_aar rule {rule_name}\n\naar_import(\n name = 'aar',\n aar = '{artifact_filename}',\n deps = [\n{deps_string}\n ],\n visibility = ['//visibility:public'],\n)\n\nfilegroup(\n name = 'file',\n srcs = ['{artifact_filename}'],\n visibility = ['//visibility:public']\n)\n"
def _generate_build_file(ctx, template, paths):
deps_string = '\n'.join(["'%s'," % dep for dep in ctx.attr.deps])
contents = template.format(rule_name=ctx.name, artifact_filename=paths.artifact_filename, deps_string=deps_string)
ctx.file('%s/BUILD' % paths.symlink_dir, contents, False)
def _mvn_download(ctx, paths, fully_qualified_name):
mvn_flags = ''
if hasattr(ctx.attr, 'settings') and ctx.attr.settings != None:
ctx.symlink(ctx.attr.settings, 'settings.xml')
mvn_flags += '-s %s ' % 'settings.xml'
mvn_get = MVN_PLUGIN + ':get'
mvn_artifact = '-Dartifact=%s' % fully_qualified_name
mvn_transitive = '-Dtransitive=false'
if hasattr(ctx.attr, 'repository') and ctx.attr.repository != '':
mvn_flags += '-Dmaven.repo.remote=%s ' % ctx.attr.repository
command = ' '.join(['mvn', mvn_flags, mvn_get, mvn_transitive, mvn_artifact])
exec_result = _execute(ctx, command)
if exec_result.return_code != 0:
fail('%s\n%s\nFailed to fetch Maven dependency' % (exec_result.stdout, exec_result.stderr))
mvn_copy = MVN_PLUGIN + ':copy'
mvn_output_dir = '-DoutputDirectory=%s' % paths.artifact_dir
command = ' '.join(['mvn', mvn_flags, mvn_copy, mvn_artifact, mvn_output_dir])
exec_result = _execute(ctx, command)
if exec_result.return_code != 0:
fail('%s\n%s\nFailed to fetch Maven dependency' % (exec_result.stdout, exec_result.stderr))
def _check_sha1(ctx, paths, sha1):
actual_sha1 = _execute(ctx, "openssl sha1 %s | awk '{printf $2}'" % paths.artifact_path).stdout
if sha1.lower() != actual_sha1.lower():
fail(('{rule_name} has SHA-1 of {actual_sha1}, ' + 'does not match expected SHA-1 ({expected_sha1})').format(rule_name=ctx.name, expected_sha1=sha1, actual_sha1=actual_sha1))
else:
_execute(ctx, 'echo %s %s > %s' % (sha1, paths.artifact_path, paths.sha1_path))
def _maven_artifact_impl(ctx, default_rule_packaging, build_file_template):
_check_dependencies(ctx)
_validate_attr(ctx)
coordinates = _create_coordinates(ctx.attr.artifact, default_rule_packaging)
paths = _create_paths(ctx, coordinates)
_generate_build_file(ctx=ctx, template=build_file_template, paths=paths)
if _execute(ctx, 'mkdir -p %s' % paths.symlink_dir).return_code != 0:
fail('%s: Failed to create dirs in execution root.\n' % ctx.name)
_mvn_download(ctx=ctx, paths=paths, fully_qualified_name=coordinates.fully_qualified_name)
if ctx.attr.sha1 != '':
_check_sha1(ctx=ctx, paths=paths, sha1=ctx.attr.sha1)
ctx.symlink(paths.artifact_path, paths.symlink_artifact_path)
_common_maven_rule_attrs = {'artifact': attr.string(default='', mandatory=True), 'sha1': attr.string(default=''), 'settings': attr.label(default=None), 'deps': attr.label_list()}
def _maven_jar_impl(ctx):
_maven_artifact_impl(ctx, 'jar', _maven_jar_build_file_template)
def _maven_aar_impl(ctx):
_maven_artifact_impl(ctx, 'aar', _maven_aar_build_file_template)
maven_jar = repository_rule(implementation=_maven_jar_impl, attrs=dict(_common_maven_rule_attrs.items() + {'repository': attr.string(default=''), 'server': attr.label(default=None)}.items()), local=False)
maven_aar = repository_rule(implementation=_maven_aar_impl, attrs=_common_maven_rule_attrs, local=False)
def _maven_dependency_plugin_impl(ctx):
_build_file = "\n# DO NOT EDIT: automatically generated BUILD file for maven_dependency_plugin\n\nfilegroup(\n name = 'files',\n srcs = glob(['**']),\n visibility = ['//visibility:public']\n)\n"
ctx.file('BUILD', _BUILD_FILE, False)
_settings_xml = '\n<!-- # DO NOT EDIT: automatically generated settings.xml for maven_dependency_plugin -->\n<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0\n https://maven.apache.org/xsd/settings-1.0.0.xsd">\n <localRepository>{localRepository}</localRepository>\n <mirrors>\n <mirror>\n <id>central</id>\n <url>{mirror}</url>\n <mirrorOf>*,default</mirrorOf>\n </mirror>\n </mirrors>\n</settings>\n'.format(localRepository=ctx.path('repository'), mirror=MAVEN_CENTRAL_URL)
settings_path = ctx.path('settings.xml')
ctx.file('%s' % settings_path, _SETTINGS_XML, False)
mvn_flags = '-s %s' % settings_path
mvn_get = MVN_PLUGIN + ':get'
mvn_artifact = '-Dartifact=%s' % MVN_PLUGIN
command = ' '.join(['mvn', mvn_flags, mvn_get, mvn_artifact])
exec_result = _execute(ctx, command)
if exec_result.return_code != 0:
fail('%s\nFailed to fetch Maven dependency' % exec_result.stderr)
_maven_dependency_plugin = repository_rule(implementation=_maven_dependency_plugin_impl)
def maven_dependency_plugin():
_maven_dependency_plugin(name='m2') |
A, B, C = map(int, input().split())
result = 0
while True:
if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
break
if A == B == C:
result = -1
break
A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
result += 1
print(result)
| (a, b, c) = map(int, input().split())
result = 0
while True:
if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
break
if A == B == C:
result = -1
break
(a, b, c) = ((B + C) // 2, (A + C) // 2, (A + B) // 2)
result += 1
print(result) |
description = 'bottom sample table devices'
group = 'lowlevel'
devices = dict(
st1_omg = device('nicos.devices.generic.Axis',
description = 'table 1 omega axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-180, 180),
precision = 0.01,
motor = 'st1_omgmot',
),
st1_omgmot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 omega motor',
fmtstr = '%.2f',
abslimits = (-180, 180),
lowlevel = True,
unit = 'deg',
),
st1_chi = device('nicos.devices.generic.Axis',
description = 'table 1 chi axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-5, 5),
precision = 0.01,
motor = 'st1_chimot',
),
st1_chimot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 chi motor',
fmtstr = '%.2f',
abslimits = (-5, 5),
lowlevel = True,
unit = 'deg',
),
st1_phi = device('nicos.devices.generic.Axis',
description = 'table 1 phi axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-5, 5),
precision = 0.01,
motor = 'st1_phimot',
),
st1_phimot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 phi motor',
fmtstr = '%.2f',
abslimits = (-5, 5),
lowlevel = True,
unit = 'deg',
),
st1_y = device('nicos.devices.generic.Axis',
description = 'table 1 y axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-99, 99),
precision = 0.01,
motor = 'st1_ymot',
),
st1_ymot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 y motor',
fmtstr = '%.2f',
abslimits = (-99, 99),
lowlevel = True,
unit = 'mm',
),
st1_z = device('nicos.devices.generic.Axis',
description = 'table 1 z axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-50, 50),
precision = 0.01,
motor = 'st1_zmot',
),
st1_zmot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 z motor',
fmtstr = '%.2f',
abslimits = (-50, 50),
lowlevel = True,
unit = 'mm',
),
st1_x = device('nicos.devices.generic.Axis',
description = 'table 1 x axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-500.9, 110.65),
precision = 0.01,
motor = 'st1_xmot',
),
st1_xmot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 x motor',
fmtstr = '%.2f',
abslimits = (-750, 150),
lowlevel = True,
unit = 'mm',
),
)
| description = 'bottom sample table devices'
group = 'lowlevel'
devices = dict(st1_omg=device('nicos.devices.generic.Axis', description='table 1 omega axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-180, 180), precision=0.01, motor='st1_omgmot'), st1_omgmot=device('nicos.devices.generic.VirtualMotor', description='table 1 omega motor', fmtstr='%.2f', abslimits=(-180, 180), lowlevel=True, unit='deg'), st1_chi=device('nicos.devices.generic.Axis', description='table 1 chi axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-5, 5), precision=0.01, motor='st1_chimot'), st1_chimot=device('nicos.devices.generic.VirtualMotor', description='table 1 chi motor', fmtstr='%.2f', abslimits=(-5, 5), lowlevel=True, unit='deg'), st1_phi=device('nicos.devices.generic.Axis', description='table 1 phi axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-5, 5), precision=0.01, motor='st1_phimot'), st1_phimot=device('nicos.devices.generic.VirtualMotor', description='table 1 phi motor', fmtstr='%.2f', abslimits=(-5, 5), lowlevel=True, unit='deg'), st1_y=device('nicos.devices.generic.Axis', description='table 1 y axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-99, 99), precision=0.01, motor='st1_ymot'), st1_ymot=device('nicos.devices.generic.VirtualMotor', description='table 1 y motor', fmtstr='%.2f', abslimits=(-99, 99), lowlevel=True, unit='mm'), st1_z=device('nicos.devices.generic.Axis', description='table 1 z axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-50, 50), precision=0.01, motor='st1_zmot'), st1_zmot=device('nicos.devices.generic.VirtualMotor', description='table 1 z motor', fmtstr='%.2f', abslimits=(-50, 50), lowlevel=True, unit='mm'), st1_x=device('nicos.devices.generic.Axis', description='table 1 x axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-500.9, 110.65), precision=0.01, motor='st1_xmot'), st1_xmot=device('nicos.devices.generic.VirtualMotor', description='table 1 x motor', fmtstr='%.2f', abslimits=(-750, 150), lowlevel=True, unit='mm')) |
# REST framework
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticatedOrReadOnly',),
'PAGINATE_BY': None,
}
| rest_framework = {'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticatedOrReadOnly',), 'PAGINATE_BY': None} |
root = 'demo_markdown_bulma'
environment = {
"STATTIK_ROOT_MODULE": root,
'STATTIK_SETTINGS_MODULE': f"{root}.settings"
} | root = 'demo_markdown_bulma'
environment = {'STATTIK_ROOT_MODULE': root, 'STATTIK_SETTINGS_MODULE': f'{root}.settings'} |
def generate_list(*args):
""" Silly function #1 """
array = []
for entry in args:
array.append(entry)
return array
def generate_dictionary(**kwargs):
""" Silly function #2 """
dictionary = {}
for entry in kwargs:
dictionary[entry] = kwargs[entry]
return dictionary
| def generate_list(*args):
""" Silly function #1 """
array = []
for entry in args:
array.append(entry)
return array
def generate_dictionary(**kwargs):
""" Silly function #2 """
dictionary = {}
for entry in kwargs:
dictionary[entry] = kwargs[entry]
return dictionary |
class CommentGenV16n3:
@classmethod
def generate_comment(clazz, indent, line_list):
text = f"\n{indent}".join(line_list)
return f"{indent}{text}\n"
| class Commentgenv16N3:
@classmethod
def generate_comment(clazz, indent, line_list):
text = f'\n{indent}'.join(line_list)
return f'{indent}{text}\n' |
# Copyright (c) 2010 Spotify AB
# Copyright (c) 2010 Yelp
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# tribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the fol-
# lowing conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
class BootstrapAction(object):
def __init__(self, name, path, bootstrap_action_args):
self.name = name
self.path = path
if isinstance(bootstrap_action_args, basestring):
bootstrap_action_args = [bootstrap_action_args]
self.bootstrap_action_args = bootstrap_action_args
def args(self):
args = []
if self.bootstrap_action_args:
args.extend(self.bootstrap_action_args)
return args
def __repr__(self):
return '%s.%s(name=%r, path=%r, bootstrap_action_args=%r)' % (
self.__class__.__module__, self.__class__.__name__,
self.name, self.path, self.bootstrap_action_args)
| class Bootstrapaction(object):
def __init__(self, name, path, bootstrap_action_args):
self.name = name
self.path = path
if isinstance(bootstrap_action_args, basestring):
bootstrap_action_args = [bootstrap_action_args]
self.bootstrap_action_args = bootstrap_action_args
def args(self):
args = []
if self.bootstrap_action_args:
args.extend(self.bootstrap_action_args)
return args
def __repr__(self):
return '%s.%s(name=%r, path=%r, bootstrap_action_args=%r)' % (self.__class__.__module__, self.__class__.__name__, self.name, self.path, self.bootstrap_action_args) |
class ViewSection(View,IDisposable):
""" ViewSection covers sections,details,elevations,and callouts,all in their reference and non-reference variations. """
@staticmethod
def CreateCallout(document,parentViewId,viewFamilyTypeId,point1,point2):
"""
CreateCallout(document: Document,parentViewId: ElementId,viewFamilyTypeId: ElementId,point1: XYZ,point2: XYZ) -> View
Creates a new callout view.
document: The document to which the new callout will be added.
parentViewId: The view in which the callout appears.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
and Detail
views.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new callout ViewSection.
Detail ViewFamilyTypes can be used in all parent views except for
CeilingPlan and Drafting views.
FloorPlan,CeilingPlan,StructuralPlan,
Section,and Elevation ViewFamilyTypes may be
be used in parent views that
also use a type with the same ViewFamily enum value.
For example,in
StructuralPlan parent views both StructuralPlan and Detail ViewFamilyTypes are
allowed.
point1: Determines the extents of the callout symbol in the parent view.
point2: Determine the extents of the callout symbol in the parent view.
Returns: The new callout view. The view will be either a ViewSection,ViewPlan or
ViewDetail.
"""
pass
@staticmethod
def CreateDetail(document,viewFamilyTypeId,sectionBox):
"""
CreateDetail(document: Document,viewFamilyTypeId: ElementId,sectionBox: BoundingBoxXYZ) -> ViewSection
Returns a new detail ViewSection.
document: The document to which the new detail ViewSection will be added.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new detail ViewSection.
The type needs to be a Detail ViewFamily.
sectionBox: The BoundingBoxXYZ which specifies the new ViewSection's view direction and
extents.
Returns: The new detail ViewSection.
"""
pass
@staticmethod
def CreateReferenceCallout(document,parentViewId,viewIdToReference,point1,point2):
"""
CreateReferenceCallout(document: Document,parentViewId: ElementId,viewIdToReference: ElementId,point1: XYZ,point2: XYZ)
Creates a new reference callout.
document: The document to which the new reference callout will be added.
parentViewId: The view in which the callout symbol appears.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
Drafting,and
Detail views.
viewIdToReference: The view which will be referenced. The ViewFamilyType of the referenced view
will be used
by the new reference callout.
Only cropped views can be
referenced,unless the referenced view is a Drafting view.
Drafting views
can always be referenced regardless of the parent view type.
Elevation
views can be referenced from Elevation and Drafting parent views.
Section
views can be referenced from Section and Drafting parent views.
Detail
views can be referenced from all parent views except for in FloorPlan,
CeilingPlan and
StructuralPlan parent views where only
horizontally-oriented Detail views can be referenced.
FloorPlan,
CeilingPlan and StructuralPlan views can be referenced from FloorPlan,
CeilingPlan
and StructuralPlan parent views.
point1: One corner of the callout symbol in the parent view.
point2: The other diagonally opposed corner of the callout symbol in the parent view.
"""
pass
@staticmethod
def CreateReferenceSection(document,parentViewId,viewIdToReference,headPoint,tailPoint):
"""
CreateReferenceSection(document: Document,parentViewId: ElementId,viewIdToReference: ElementId,headPoint: XYZ,tailPoint: XYZ)
Creates a new reference section.
document: The document to which the reference section will be added.
parentViewId: The view in which the new reference section marker will appear.
Reference
sections can be created in FloorPlan,CeilingPlan,StructuralPlan,Section,
Elevation,
Drafting,and Detail views.
viewIdToReference: Detail,Drafting and Section views can be referenced.
The ViewFamilyType of
the referenced view will be used by the new reference section.
headPoint: Determines the location of the section marker's head in the parent view.
tailPoint: Determines the location of the section marker's tail in the parent view.
"""
pass
@staticmethod
def CreateSection(document,viewFamilyTypeId,sectionBox):
"""
CreateSection(document: Document,viewFamilyTypeId: ElementId,sectionBox: BoundingBoxXYZ) -> ViewSection
Returns a new section ViewSection.
document: The document to which the new section ViewSection will be added.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new section ViewSection.
The type needs to be a Section ViewFamily.
sectionBox: The BoundingBoxXYZ which specifies the new ViewSection's view direction and
extents.
Returns: The new section ViewSection.
"""
pass
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: View,view: View) -> BoundingBoxXYZ """
pass
@staticmethod
def IsParentViewValidForCallout(document,parentViewId):
"""
IsParentViewValidForCallout(document: Document,parentViewId: ElementId) -> bool
This validator checks that the parent view is appropriate for callout views.
document: The document which contains the ViewFamilyType and parent view.
parentViewId: The view in which the new callout will appear.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
and Detail
views.
Returns: True if the ViewFamilyType can be used for callout views in the parent view,
false otherwise.
"""
pass
@staticmethod
def IsViewFamilyTypeValidForCallout(document,viewFamilyTypeId,parentViewId):
"""
IsViewFamilyTypeValidForCallout(document: Document,viewFamilyTypeId: ElementId,parentViewId: ElementId) -> bool
This validator checks that the ViewFamilyType is appropriate for callout views
in the
input parent view.
document: The document which contains the ViewFamilyType and parent view.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new callout ViewSection.
Detail ViewFamilyTypes can be used in all parent views except for
CeilingPlan and Drafting views.
FloorPlan,CeilingPlan,StructuralPlan,
Section,Elevation,and Detail ViewFamilyTypes may be
be used in parent
views that also use a type with the same ViewFamily enum value.
For
example,in StructuralPlan views both StructuralPlan and Detail ViewFamilyTypes
are allowed.
parentViewId: The view in which the new callout will appear.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
and Detail
views.
Returns: True if the ViewFamilyType can be used for callout views in the parent view,
false otherwise.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
| class Viewsection(View, IDisposable):
""" ViewSection covers sections,details,elevations,and callouts,all in their reference and non-reference variations. """
@staticmethod
def create_callout(document, parentViewId, viewFamilyTypeId, point1, point2):
"""
CreateCallout(document: Document,parentViewId: ElementId,viewFamilyTypeId: ElementId,point1: XYZ,point2: XYZ) -> View
Creates a new callout view.
document: The document to which the new callout will be added.
parentViewId: The view in which the callout appears.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
and Detail
views.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new callout ViewSection.
Detail ViewFamilyTypes can be used in all parent views except for
CeilingPlan and Drafting views.
FloorPlan,CeilingPlan,StructuralPlan,
Section,and Elevation ViewFamilyTypes may be
be used in parent views that
also use a type with the same ViewFamily enum value.
For example,in
StructuralPlan parent views both StructuralPlan and Detail ViewFamilyTypes are
allowed.
point1: Determines the extents of the callout symbol in the parent view.
point2: Determine the extents of the callout symbol in the parent view.
Returns: The new callout view. The view will be either a ViewSection,ViewPlan or
ViewDetail.
"""
pass
@staticmethod
def create_detail(document, viewFamilyTypeId, sectionBox):
"""
CreateDetail(document: Document,viewFamilyTypeId: ElementId,sectionBox: BoundingBoxXYZ) -> ViewSection
Returns a new detail ViewSection.
document: The document to which the new detail ViewSection will be added.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new detail ViewSection.
The type needs to be a Detail ViewFamily.
sectionBox: The BoundingBoxXYZ which specifies the new ViewSection's view direction and
extents.
Returns: The new detail ViewSection.
"""
pass
@staticmethod
def create_reference_callout(document, parentViewId, viewIdToReference, point1, point2):
"""
CreateReferenceCallout(document: Document,parentViewId: ElementId,viewIdToReference: ElementId,point1: XYZ,point2: XYZ)
Creates a new reference callout.
document: The document to which the new reference callout will be added.
parentViewId: The view in which the callout symbol appears.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
Drafting,and
Detail views.
viewIdToReference: The view which will be referenced. The ViewFamilyType of the referenced view
will be used
by the new reference callout.
Only cropped views can be
referenced,unless the referenced view is a Drafting view.
Drafting views
can always be referenced regardless of the parent view type.
Elevation
views can be referenced from Elevation and Drafting parent views.
Section
views can be referenced from Section and Drafting parent views.
Detail
views can be referenced from all parent views except for in FloorPlan,
CeilingPlan and
StructuralPlan parent views where only
horizontally-oriented Detail views can be referenced.
FloorPlan,
CeilingPlan and StructuralPlan views can be referenced from FloorPlan,
CeilingPlan
and StructuralPlan parent views.
point1: One corner of the callout symbol in the parent view.
point2: The other diagonally opposed corner of the callout symbol in the parent view.
"""
pass
@staticmethod
def create_reference_section(document, parentViewId, viewIdToReference, headPoint, tailPoint):
"""
CreateReferenceSection(document: Document,parentViewId: ElementId,viewIdToReference: ElementId,headPoint: XYZ,tailPoint: XYZ)
Creates a new reference section.
document: The document to which the reference section will be added.
parentViewId: The view in which the new reference section marker will appear.
Reference
sections can be created in FloorPlan,CeilingPlan,StructuralPlan,Section,
Elevation,
Drafting,and Detail views.
viewIdToReference: Detail,Drafting and Section views can be referenced.
The ViewFamilyType of
the referenced view will be used by the new reference section.
headPoint: Determines the location of the section marker's head in the parent view.
tailPoint: Determines the location of the section marker's tail in the parent view.
"""
pass
@staticmethod
def create_section(document, viewFamilyTypeId, sectionBox):
"""
CreateSection(document: Document,viewFamilyTypeId: ElementId,sectionBox: BoundingBoxXYZ) -> ViewSection
Returns a new section ViewSection.
document: The document to which the new section ViewSection will be added.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new section ViewSection.
The type needs to be a Section ViewFamily.
sectionBox: The BoundingBoxXYZ which specifies the new ViewSection's view direction and
extents.
Returns: The new section ViewSection.
"""
pass
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: View,view: View) -> BoundingBoxXYZ """
pass
@staticmethod
def is_parent_view_valid_for_callout(document, parentViewId):
"""
IsParentViewValidForCallout(document: Document,parentViewId: ElementId) -> bool
This validator checks that the parent view is appropriate for callout views.
document: The document which contains the ViewFamilyType and parent view.
parentViewId: The view in which the new callout will appear.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
and Detail
views.
Returns: True if the ViewFamilyType can be used for callout views in the parent view,
false otherwise.
"""
pass
@staticmethod
def is_view_family_type_valid_for_callout(document, viewFamilyTypeId, parentViewId):
"""
IsViewFamilyTypeValidForCallout(document: Document,viewFamilyTypeId: ElementId,parentViewId: ElementId) -> bool
This validator checks that the ViewFamilyType is appropriate for callout views
in the
input parent view.
document: The document which contains the ViewFamilyType and parent view.
viewFamilyTypeId: The id of the ViewFamilyType which will be used by the new callout ViewSection.
Detail ViewFamilyTypes can be used in all parent views except for
CeilingPlan and Drafting views.
FloorPlan,CeilingPlan,StructuralPlan,
Section,Elevation,and Detail ViewFamilyTypes may be
be used in parent
views that also use a type with the same ViewFamily enum value.
For
example,in StructuralPlan views both StructuralPlan and Detail ViewFamilyTypes
are allowed.
parentViewId: The view in which the new callout will appear.
Callouts can be created in
FloorPlan,CeilingPlan,StructuralPlan,Section,Elevation,
and Detail
views.
Returns: True if the ViewFamilyType can be used for callout views in the parent view,
false otherwise.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass |
"""
[2016-08-24] Challenge #280 [Intermediate] Anagram Maker
https://www.reddit.com/r/dailyprogrammer/comments/4zcly2/20160824_challenge_280_intermediate_anagram_maker/
# Description
Anagrams, where you take the letters from one or more words and rearrange them to spell something else, are a fun word
game.
In this challenge you'll be asked to create anagrams from specific inputs. You should ignore capitalization as needed,
and use only English language words. Note that because there are so many possibilities, there are no "right" answers so
long as they're valid English language words and proper anagrams.
# Example Input
First you'll be given an integer on a single line, this tells you how many lines to read. Then you'll be given a word
(or words) on *N* lines to make anagrams for. Example:
1
Field of dreams
# Example Output
Your program should emit the original word and one or more anagrams it developed. Example:
Field of dreams -> Dads Offer Lime
Field of dreams -> Deaf Fold Miser
# Challenge Input
6
Desperate
Redditor
Dailyprogrammer
Sam likes to swim
The Morse Code
Help, someone stole my purse
# English Wordlist
Feel free to use the venerable http://norvig.com/ngrams/enable1.txt
"""
def main():
pass
if __name__ == "__main__":
main()
| """
[2016-08-24] Challenge #280 [Intermediate] Anagram Maker
https://www.reddit.com/r/dailyprogrammer/comments/4zcly2/20160824_challenge_280_intermediate_anagram_maker/
# Description
Anagrams, where you take the letters from one or more words and rearrange them to spell something else, are a fun word
game.
In this challenge you'll be asked to create anagrams from specific inputs. You should ignore capitalization as needed,
and use only English language words. Note that because there are so many possibilities, there are no "right" answers so
long as they're valid English language words and proper anagrams.
# Example Input
First you'll be given an integer on a single line, this tells you how many lines to read. Then you'll be given a word
(or words) on *N* lines to make anagrams for. Example:
1
Field of dreams
# Example Output
Your program should emit the original word and one or more anagrams it developed. Example:
Field of dreams -> Dads Offer Lime
Field of dreams -> Deaf Fold Miser
# Challenge Input
6
Desperate
Redditor
Dailyprogrammer
Sam likes to swim
The Morse Code
Help, someone stole my purse
# English Wordlist
Feel free to use the venerable http://norvig.com/ngrams/enable1.txt
"""
def main():
pass
if __name__ == '__main__':
main() |
# Time: O(n)
# Space: O(n)
class Solution(object):
def countSubstrings(self, s):
"""
:type s: str
:rtype: int
"""
def manacher(s):
s = '^#' + '#'.join(s) + '#$'
P = [0] * len(s)
C, R = 0, 0
for i in xrange(1, len(s) - 1):
i_mirror = 2*C-i
if R > i:
P[i] = min(R-i, P[i_mirror])
while s[i+1+P[i]] == s[i-1-P[i]]:
P[i] += 1
if i+P[i] > R:
C, R = i, i+P[i]
return P
return sum((max_len+1)/2 for max_len in manacher(s))
| class Solution(object):
def count_substrings(self, s):
"""
:type s: str
:rtype: int
"""
def manacher(s):
s = '^#' + '#'.join(s) + '#$'
p = [0] * len(s)
(c, r) = (0, 0)
for i in xrange(1, len(s) - 1):
i_mirror = 2 * C - i
if R > i:
P[i] = min(R - i, P[i_mirror])
while s[i + 1 + P[i]] == s[i - 1 - P[i]]:
P[i] += 1
if i + P[i] > R:
(c, r) = (i, i + P[i])
return P
return sum(((max_len + 1) / 2 for max_len in manacher(s))) |
def bond(output, i,j,Jz,Jx,S2=1):
if S2==1:
bond_half(output, i,j,Jz,Jx)
elif S2==2:
bond_one(output, i,j,Jz,Jx)
else:
error("S2 should be 1 or 2.")
def bond_half(output, i,j, Jz,Jx):
z = 0.25*Jz
x = 0.5*Jx
# diagonal
output.write('{} 0 {} 0 {} 0 {} 0 {} 0.0 \n'.format(i,i,j,j,z))
output.write('{} 1 {} 1 {} 0 {} 0 {} 0.0 \n'.format(i,i,j,j,-z))
output.write('{} 0 {} 0 {} 1 {} 1 {} 0.0 \n'.format(i,i,j,j,-z))
output.write('{} 1 {} 1 {} 1 {} 1 {} 0.0 \n'.format(i,i,j,j,z))
# off-diagonal
# S_i^+ S_j^-
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(i,i,j,j,x))
# S_j^+ S_i^-
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(j,j,i,i,x))
def bond_one(output, i,j, Jz,Jx):
# diagonal
output.write('{} 0 {} 0 {} 0 {} 0 {} 0.0 \n'.format(i,i,j,j,Jz))
output.write('{} 2 {} 2 {} 0 {} 0 {} 0.0 \n'.format(i,i,j,j,-Jz))
output.write('{} 0 {} 0 {} 2 {} 2 {} 0.0 \n'.format(i,i,j,j,-Jz))
output.write('{} 2 {} 2 {} 2 {} 2 {} 0.0 \n'.format(i,i,j,j,Jz))
# off-diagonal
# S_i^+ S_j^-
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(i,i,j,j,Jx))
output.write('{} 2 {} 1 {} 0 {} 1 {} 0.0 \n'.format(i,i,j,j,Jx))
output.write('{} 1 {} 0 {} 1 {} 2 {} 0.0 \n'.format(i,i,j,j,Jx))
output.write('{} 2 {} 1 {} 1 {} 2 {} 0.0 \n'.format(i,i,j,j,Jx))
# S_j^+ S_i^-
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(j,j,i,i,Jx))
output.write('{} 2 {} 1 {} 0 {} 1 {} 0.0 \n'.format(j,j,i,i,Jx))
output.write('{} 1 {} 0 {} 1 {} 2 {} 0.0 \n'.format(j,j,i,i,Jx))
output.write('{} 2 {} 1 {} 1 {} 2 {} 0.0 \n'.format(j,j,i,i,Jx))
def interall_header(output, L, S2=1):
output.write('=== header start\n')
output.write('NInterAll {}\n'.format(6*S2*L))
output.write('=== header (reserved)\n')
output.write('=== header (reserved)\n')
output.write('=== header end\n')
| def bond(output, i, j, Jz, Jx, S2=1):
if S2 == 1:
bond_half(output, i, j, Jz, Jx)
elif S2 == 2:
bond_one(output, i, j, Jz, Jx)
else:
error('S2 should be 1 or 2.')
def bond_half(output, i, j, Jz, Jx):
z = 0.25 * Jz
x = 0.5 * Jx
output.write('{} 0 {} 0 {} 0 {} 0 {} 0.0 \n'.format(i, i, j, j, z))
output.write('{} 1 {} 1 {} 0 {} 0 {} 0.0 \n'.format(i, i, j, j, -z))
output.write('{} 0 {} 0 {} 1 {} 1 {} 0.0 \n'.format(i, i, j, j, -z))
output.write('{} 1 {} 1 {} 1 {} 1 {} 0.0 \n'.format(i, i, j, j, z))
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(i, i, j, j, x))
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(j, j, i, i, x))
def bond_one(output, i, j, Jz, Jx):
output.write('{} 0 {} 0 {} 0 {} 0 {} 0.0 \n'.format(i, i, j, j, Jz))
output.write('{} 2 {} 2 {} 0 {} 0 {} 0.0 \n'.format(i, i, j, j, -Jz))
output.write('{} 0 {} 0 {} 2 {} 2 {} 0.0 \n'.format(i, i, j, j, -Jz))
output.write('{} 2 {} 2 {} 2 {} 2 {} 0.0 \n'.format(i, i, j, j, Jz))
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(i, i, j, j, Jx))
output.write('{} 2 {} 1 {} 0 {} 1 {} 0.0 \n'.format(i, i, j, j, Jx))
output.write('{} 1 {} 0 {} 1 {} 2 {} 0.0 \n'.format(i, i, j, j, Jx))
output.write('{} 2 {} 1 {} 1 {} 2 {} 0.0 \n'.format(i, i, j, j, Jx))
output.write('{} 1 {} 0 {} 0 {} 1 {} 0.0 \n'.format(j, j, i, i, Jx))
output.write('{} 2 {} 1 {} 0 {} 1 {} 0.0 \n'.format(j, j, i, i, Jx))
output.write('{} 1 {} 0 {} 1 {} 2 {} 0.0 \n'.format(j, j, i, i, Jx))
output.write('{} 2 {} 1 {} 1 {} 2 {} 0.0 \n'.format(j, j, i, i, Jx))
def interall_header(output, L, S2=1):
output.write('=== header start\n')
output.write('NInterAll {}\n'.format(6 * S2 * L))
output.write('=== header (reserved)\n')
output.write('=== header (reserved)\n')
output.write('=== header end\n') |
class Solution:
def minSubArrayLen(self, s: int, nums: List[int]) -> int:
ans = int(2e5)
i = curr = 0
for j in range(len(nums)):
curr += nums[j]
while curr >= s:
curr -= nums[i]
ans = min(ans, j + 1 - i)
i += 1
return 0 if ans == int(2e5) else ans
| class Solution:
def min_sub_array_len(self, s: int, nums: List[int]) -> int:
ans = int(200000.0)
i = curr = 0
for j in range(len(nums)):
curr += nums[j]
while curr >= s:
curr -= nums[i]
ans = min(ans, j + 1 - i)
i += 1
return 0 if ans == int(200000.0) else ans |
"""Xorshift Random Number Generator"""
class Xorshift:
"""Xorshift Random Number Generator"""
def __init__(self,seed_0,seed_1,seed_2,seed_3):
self.seed_0 = seed_0
self.seed_1 = seed_1
self.seed_2 = seed_2
self.seed_3 = seed_3
def next(self):
"""Generate the next random number"""
temp = self.seed_0 ^ self.seed_0 << 11 & 0xFFFFFFFF
self.seed_0 = self.seed_1
self.seed_1 = self.seed_2
self.seed_2 = self.seed_3
self.seed_3 = temp ^ temp >> 8 ^ self.seed_3 ^ self.seed_3 >> 19
return self.seed_3
def prev(self):
"""Generate the previous random number"""
temp = self.seed_2 >> 19 ^ self.seed_2 ^ self.seed_3
temp ^= temp >> 8
temp ^= temp >> 16
temp ^= temp << 11 & 0xFFFFFFFF
temp ^= temp << 22 & 0xFFFFFFFF
self.seed_0 = temp
self.seed_1 = self.seed_0
self.seed_2 = self.seed_1
self.seed_3 = self.seed_2
return self.seed_3
def advance(self,length:int):
"""Skip advances of length"""
self.get_next_rand_sequence(length)
def range(self,minimum:int,maximum:int)->int:
"""Generate random integer in range [minimum,maximum)
Args:
minimum ([int]): minimum
maximum ([int]): maximam
Returns:
int: random integer
"""
return self.next() % (maximum-minimum) + minimum
def randfloat(self)->float:
"""Generate random float in range [0,1]
Returns:
float: random float
"""
return (self.next() & 0x7fffff) / 8388607.0
def rangefloat(self,minimum:float,maximum:float)->float:
"""Generate random float in range [minimum,maximum]
Args:
minimum (float): minimum
maximum (float): maximam
Returns:
float: random float
"""
temp = self.randfloat()
return temp * minimum + (1-temp) * maximum
def get_next_rand_sequence(self,length):
"""Generate a the next random sequence of length"""
return [self.next() for _ in range(length)]
def get_prev_rand_sequence(self,length):
"""Generate the previous random sequence of length"""
return [self.prev() for _ in range(length)]
def get_state(self):
"""Get the state of the RNG"""
return [self.seed_0, self.seed_1, self.seed_2, self.seed_3]
def set_state(self, seed_0, seed_1, seed_2, seed_3):
"""Set state of the RNG"""
self.seed_0 = seed_0
self.seed_1 = seed_1
self.seed_2 = seed_2
self.seed_3 = seed_3
| """Xorshift Random Number Generator"""
class Xorshift:
"""Xorshift Random Number Generator"""
def __init__(self, seed_0, seed_1, seed_2, seed_3):
self.seed_0 = seed_0
self.seed_1 = seed_1
self.seed_2 = seed_2
self.seed_3 = seed_3
def next(self):
"""Generate the next random number"""
temp = self.seed_0 ^ self.seed_0 << 11 & 4294967295
self.seed_0 = self.seed_1
self.seed_1 = self.seed_2
self.seed_2 = self.seed_3
self.seed_3 = temp ^ temp >> 8 ^ self.seed_3 ^ self.seed_3 >> 19
return self.seed_3
def prev(self):
"""Generate the previous random number"""
temp = self.seed_2 >> 19 ^ self.seed_2 ^ self.seed_3
temp ^= temp >> 8
temp ^= temp >> 16
temp ^= temp << 11 & 4294967295
temp ^= temp << 22 & 4294967295
self.seed_0 = temp
self.seed_1 = self.seed_0
self.seed_2 = self.seed_1
self.seed_3 = self.seed_2
return self.seed_3
def advance(self, length: int):
"""Skip advances of length"""
self.get_next_rand_sequence(length)
def range(self, minimum: int, maximum: int) -> int:
"""Generate random integer in range [minimum,maximum)
Args:
minimum ([int]): minimum
maximum ([int]): maximam
Returns:
int: random integer
"""
return self.next() % (maximum - minimum) + minimum
def randfloat(self) -> float:
"""Generate random float in range [0,1]
Returns:
float: random float
"""
return (self.next() & 8388607) / 8388607.0
def rangefloat(self, minimum: float, maximum: float) -> float:
"""Generate random float in range [minimum,maximum]
Args:
minimum (float): minimum
maximum (float): maximam
Returns:
float: random float
"""
temp = self.randfloat()
return temp * minimum + (1 - temp) * maximum
def get_next_rand_sequence(self, length):
"""Generate a the next random sequence of length"""
return [self.next() for _ in range(length)]
def get_prev_rand_sequence(self, length):
"""Generate the previous random sequence of length"""
return [self.prev() for _ in range(length)]
def get_state(self):
"""Get the state of the RNG"""
return [self.seed_0, self.seed_1, self.seed_2, self.seed_3]
def set_state(self, seed_0, seed_1, seed_2, seed_3):
"""Set state of the RNG"""
self.seed_0 = seed_0
self.seed_1 = seed_1
self.seed_2 = seed_2
self.seed_3 = seed_3 |
{'application':{'type':'Application',
'name':'Addresses',
'backgrounds':
[
{'type':'Background',
'name':'bgBody',
'title':'Addresses',
'position':(208,183),
'size':(416, 310),
'menubar':
{
'type':'MenuBar',
'menus':
[
{ 'type':'Menu',
'name':'menuFile',
'label':'&File',
'items': [
{ 'type':'MenuItem',
'name':'menuFileImportOutlook',
'label':"&Import Outlook",
'command':'fileImportOutlook'},
{ 'type':'MenuItem', 'name':'fileSep1', 'label':'-' },
{ 'type':'MenuItem',
'name':'menuFileExit',
'label':'E&xit\tAlt+X',
'command':'exit'}
] },
{'type':'Menu',
'name':'Edit',
'label':'&Edit',
'items': [ { 'type':'MenuItem',
'name':'menuEditUndo',
'label':'&Undo\tCtrl+Z',
'command':'editUndo'},
{ 'type':'MenuItem',
'name':'menuEditRedo',
'label':'&Redo\tCtrl+Y',
'command':'editRedo'},
{ 'type':'MenuItem', 'name':'editSep1', 'label':'-' },
{ 'type':'MenuItem',
'name':'menuEditCut',
'label':'Cu&t\tCtrl+X',
'command':'editCut'},
{ 'type':'MenuItem',
'name':'menuEditCopy',
'label':'&Copy\tCtrl+C',
'command':'editCopy'},
{ 'type':'MenuItem',
'name':'menuEditPaste',
'label':'&Paste\tCtrl+V',
'command':'editPaste'},
{ 'type':'MenuItem', 'name':'editSep2', 'label':'-' },
{ 'type':'MenuItem',
'name':'menuEditClear',
'label':'Cle&ar\tDel',
'command':'editClear'},
{ 'type':'MenuItem',
'name':'menuEditSelectAll',
'label':'Select A&ll\tCtrl+A',
'command':'editSelectAll'},
{ 'type':'MenuItem', 'name':'editSep3', 'label':'-' },
{ 'type':"MenuItem",
'name':"menuEditNewCard",
'label':"&New Card\tCtrl+N",
'command':'editNewCard'},
{ 'type':"MenuItem",
'name':"menuEditDeleteCard",
'label':"&Delete Card",
'command':'editDeleteCard'},
] },
{'type':'Menu',
'name':'Go',
'label':'&Go',
'items': [ { 'type':"MenuItem",
'name':"menuGoNextCard",
'label':"&Next Card\tCtrl+1",
'command':'goNext'},
{ 'type':"MenuItem",
'name':"menuGoPrevCard",
'label':"&Prev Card\tCtrl+2",
'command':'goPrev'},
{ 'type':"MenuItem",
'name':"menuGoFirstCard",
'label':"&First Card\tCtrl+3",
'command':'goFirst'},
{ 'type':"MenuItem",
'name':"menuGoLastCard",
'label':"&Last Card\tCtrl+4",
'command':'goLast'},
] }
]
},
'components':
[
{'type':'TextArea', 'name':'Notes',
'position':(7,64),
'size':(278, 200),
'visible':0,
},
{'type':'TextField', 'name':'Name',
'position':(100,17),
'size':(241, -1),
},
{'type':'TextField', 'name':'Company',
'position':(100,39),
'size':(241, -1),
},
{'type':'TextField', 'name':'Street',
'position':(100,72),
'size':(183, -1),
},
{'type':'TextField', 'name':'City',
'position':(100,94),
'size':(183, -1),
},
{'type':'TextField', 'name':'State',
'position':(100,116),
'size':(183, -1),
},
{'type':'TextField', 'name':'Zip',
'position':(100,138),
'size':(183, -1),
},
{'type':'TextField',
'name':'Phone1',
'position':(100, 176),
'size':(169, -1),
},
{'type':'TextField',
'name':'Phone2',
'position':(100, 198),
'size':(169, -1),
},
{'type':'TextField',
'name':'Phone3',
'position':(100, 220),
'size':(169, -1),
},
{'type':'TextField',
'name':'Phone4',
'position':(100, 242),
'size':(169, -1),
},
{'type':'StaticText', 'name':'NameLabel',
'position':(7,24),
'size':(68, -1),
'text':'Name',
'alignment':'right',
},
{'type':'StaticText', 'name':'CompanyLabel',
'position':(7,46),
'size':(68, -1),
'text':'Company',
'alignment':'right',
},
{'type':'StaticText', 'name':'StreetLabel',
'position':(8,79),
'size':(68, -1),
'text':'Street',
'alignment':'right',
},
{'type':'StaticText', 'name':'CityLabel',
'position':(8,101),
'size':(68, -1),
'text':'City',
'alignment':'right',
},
{'type':'StaticText', 'name':'ZipCodeLabel',
'position':(8,145),
'size':(68, -1),
'text':'Zip Code',
'alignment':'right',
},
{'type':'StaticText', 'name':'TelephoneLabel',
'position':(7,180),
'size':(68, -1),
'text':'Telephone',
'alignment':'right',
},
{'type':'TextField', 'name':'Sortorder',
'position':(0,0),
'size':(30, -1),
'text':'1',
'visible':0,
},
{'type':'TextField', 'name':'NameOrder',
'position':(141,0),
'size':(73, -1),
'text':'last word',
'visible':0,
},
{'type':'StaticText', 'name':'StateLabel',
'position':(8,123),
'size':(68, -1),
'text':'State',
'alignment':'right',
},
{'type':'TextField', 'name':'CorrectName',
'position':(100,0),
'size':(241, -1),
'visible':0,
},
{'type':'Button', 'name':'NewCard',
'position':(301,152),
'size':(100, -1),
'label':'New Card',
'command':'editNewCard'
},
{'type':'Button', 'name':'DeleteCard',
'position':(301,178),
'size':(100, -1),
'label':'Delete Card',
'command':'editDeleteCard'
},
{'type':'Button', 'name':'Find',
'position':(301,100),
'size':(100, -1),
'label':'Find',
'command':'findRecord'
},
{'type':'Button', 'name':'ShowNotes',
'position':(301,126),
'size':(100, -1),
'label':'Show Notes',
'command':'showNotes',
},
{'type':'ImageButton', 'name':'Prev',
'position':(323,68),
'size':(26, 23),
'file':'prev.gif',
'command':'goPrev',
},
{'type':'ImageButton', 'name':'Next',
'position':(355,69),
'size':(25, 23),
'file':'next.gif',
'command':'goNext',
},
] }
] }
}
| {'application': {'type': 'Application', 'name': 'Addresses', 'backgrounds': [{'type': 'Background', 'name': 'bgBody', 'title': 'Addresses', 'position': (208, 183), 'size': (416, 310), 'menubar': {'type': 'MenuBar', 'menus': [{'type': 'Menu', 'name': 'menuFile', 'label': '&File', 'items': [{'type': 'MenuItem', 'name': 'menuFileImportOutlook', 'label': '&Import Outlook', 'command': 'fileImportOutlook'}, {'type': 'MenuItem', 'name': 'fileSep1', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuFileExit', 'label': 'E&xit\tAlt+X', 'command': 'exit'}]}, {'type': 'Menu', 'name': 'Edit', 'label': '&Edit', 'items': [{'type': 'MenuItem', 'name': 'menuEditUndo', 'label': '&Undo\tCtrl+Z', 'command': 'editUndo'}, {'type': 'MenuItem', 'name': 'menuEditRedo', 'label': '&Redo\tCtrl+Y', 'command': 'editRedo'}, {'type': 'MenuItem', 'name': 'editSep1', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuEditCut', 'label': 'Cu&t\tCtrl+X', 'command': 'editCut'}, {'type': 'MenuItem', 'name': 'menuEditCopy', 'label': '&Copy\tCtrl+C', 'command': 'editCopy'}, {'type': 'MenuItem', 'name': 'menuEditPaste', 'label': '&Paste\tCtrl+V', 'command': 'editPaste'}, {'type': 'MenuItem', 'name': 'editSep2', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuEditClear', 'label': 'Cle&ar\tDel', 'command': 'editClear'}, {'type': 'MenuItem', 'name': 'menuEditSelectAll', 'label': 'Select A&ll\tCtrl+A', 'command': 'editSelectAll'}, {'type': 'MenuItem', 'name': 'editSep3', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuEditNewCard', 'label': '&New Card\tCtrl+N', 'command': 'editNewCard'}, {'type': 'MenuItem', 'name': 'menuEditDeleteCard', 'label': '&Delete Card', 'command': 'editDeleteCard'}]}, {'type': 'Menu', 'name': 'Go', 'label': '&Go', 'items': [{'type': 'MenuItem', 'name': 'menuGoNextCard', 'label': '&Next Card\tCtrl+1', 'command': 'goNext'}, {'type': 'MenuItem', 'name': 'menuGoPrevCard', 'label': '&Prev Card\tCtrl+2', 'command': 'goPrev'}, {'type': 'MenuItem', 'name': 'menuGoFirstCard', 'label': '&First Card\tCtrl+3', 'command': 'goFirst'}, {'type': 'MenuItem', 'name': 'menuGoLastCard', 'label': '&Last Card\tCtrl+4', 'command': 'goLast'}]}]}, 'components': [{'type': 'TextArea', 'name': 'Notes', 'position': (7, 64), 'size': (278, 200), 'visible': 0}, {'type': 'TextField', 'name': 'Name', 'position': (100, 17), 'size': (241, -1)}, {'type': 'TextField', 'name': 'Company', 'position': (100, 39), 'size': (241, -1)}, {'type': 'TextField', 'name': 'Street', 'position': (100, 72), 'size': (183, -1)}, {'type': 'TextField', 'name': 'City', 'position': (100, 94), 'size': (183, -1)}, {'type': 'TextField', 'name': 'State', 'position': (100, 116), 'size': (183, -1)}, {'type': 'TextField', 'name': 'Zip', 'position': (100, 138), 'size': (183, -1)}, {'type': 'TextField', 'name': 'Phone1', 'position': (100, 176), 'size': (169, -1)}, {'type': 'TextField', 'name': 'Phone2', 'position': (100, 198), 'size': (169, -1)}, {'type': 'TextField', 'name': 'Phone3', 'position': (100, 220), 'size': (169, -1)}, {'type': 'TextField', 'name': 'Phone4', 'position': (100, 242), 'size': (169, -1)}, {'type': 'StaticText', 'name': 'NameLabel', 'position': (7, 24), 'size': (68, -1), 'text': 'Name', 'alignment': 'right'}, {'type': 'StaticText', 'name': 'CompanyLabel', 'position': (7, 46), 'size': (68, -1), 'text': 'Company', 'alignment': 'right'}, {'type': 'StaticText', 'name': 'StreetLabel', 'position': (8, 79), 'size': (68, -1), 'text': 'Street', 'alignment': 'right'}, {'type': 'StaticText', 'name': 'CityLabel', 'position': (8, 101), 'size': (68, -1), 'text': 'City', 'alignment': 'right'}, {'type': 'StaticText', 'name': 'ZipCodeLabel', 'position': (8, 145), 'size': (68, -1), 'text': 'Zip Code', 'alignment': 'right'}, {'type': 'StaticText', 'name': 'TelephoneLabel', 'position': (7, 180), 'size': (68, -1), 'text': 'Telephone', 'alignment': 'right'}, {'type': 'TextField', 'name': 'Sortorder', 'position': (0, 0), 'size': (30, -1), 'text': '1', 'visible': 0}, {'type': 'TextField', 'name': 'NameOrder', 'position': (141, 0), 'size': (73, -1), 'text': 'last word', 'visible': 0}, {'type': 'StaticText', 'name': 'StateLabel', 'position': (8, 123), 'size': (68, -1), 'text': 'State', 'alignment': 'right'}, {'type': 'TextField', 'name': 'CorrectName', 'position': (100, 0), 'size': (241, -1), 'visible': 0}, {'type': 'Button', 'name': 'NewCard', 'position': (301, 152), 'size': (100, -1), 'label': 'New Card', 'command': 'editNewCard'}, {'type': 'Button', 'name': 'DeleteCard', 'position': (301, 178), 'size': (100, -1), 'label': 'Delete Card', 'command': 'editDeleteCard'}, {'type': 'Button', 'name': 'Find', 'position': (301, 100), 'size': (100, -1), 'label': 'Find', 'command': 'findRecord'}, {'type': 'Button', 'name': 'ShowNotes', 'position': (301, 126), 'size': (100, -1), 'label': 'Show Notes', 'command': 'showNotes'}, {'type': 'ImageButton', 'name': 'Prev', 'position': (323, 68), 'size': (26, 23), 'file': 'prev.gif', 'command': 'goPrev'}, {'type': 'ImageButton', 'name': 'Next', 'position': (355, 69), 'size': (25, 23), 'file': 'next.gif', 'command': 'goNext'}]}]}} |
"""
Russian customizations
Holds customized validation messages for russian language
"""
translations = {
'__meta__': 'Customized translations for Russian',
}
| """
Russian customizations
Holds customized validation messages for russian language
"""
translations = {'__meta__': 'Customized translations for Russian'} |
class API:
# BASE_URL
API_PREFIX = '/api/v1'
# REST Endpoints
ACCOUNT_BALANCE = '/accountbalance'
CURRENT_POSITIONS = '/currentpositions'
EXCHANGE_LIST = '/exchangelist'
HISTORICAL_ACCOUNT_BALANCES = '/historicalaccountbalances'
HISTORICAL_ORDER_FILLS = '/historicalorderfills'
SECURITY_DEFINITION = '/securitydefinition'
TRADE_ACCOUNTS = '/tradeaccounts'
HISTORICAL_PRICE_DATA = '/historicalpricedata'
# WS Endpoints
MARKET_DATA = '/marketdata'
MARKET_DEPTH = '/marketdepth'
| class Api:
api_prefix = '/api/v1'
account_balance = '/accountbalance'
current_positions = '/currentpositions'
exchange_list = '/exchangelist'
historical_account_balances = '/historicalaccountbalances'
historical_order_fills = '/historicalorderfills'
security_definition = '/securitydefinition'
trade_accounts = '/tradeaccounts'
historical_price_data = '/historicalpricedata'
market_data = '/marketdata'
market_depth = '/marketdepth' |
class KubeKrbMixin(object):
def __init__(self, **kwargs):
self.ticket_vol = "kerberos-data"
self.secret_name = "statesecret"
def inject_kerberos(self, kube_resources):
for r in kube_resources:
if r["kind"] == "Job":
for c in r["spec"]["template"]["spec"]["initContainers"]:
self.addKrbContainer(c)
for c in r["spec"]["template"]["spec"]["containers"]:
self.addKrbContainer(c)
r["spec"]["template"]["spec"]["initContainers"].insert(
0, self.getKrbInit()
)
r["spec"]["template"]["spec"]["volumes"].extend(
[{"emptyDir": {}, "name": self.ticket_vol}]
)
return kube_resources
def addKrbContainer(self, data):
data.setdefault("volumeMounts", []).extend(
[{"mountPath": "/tmp/kerberos", "name": self.ticket_vol}]
)
data.setdefault("env", []).extend(
[
{"name": "KRB5CCNAME", "value": "FILE:/tmp/kerberos/tmp_kt"},
{
"name": "KRBUSERNAME",
"valueFrom": {
"secretKeyRef": {"key": "username", "name": self.secret_name}
},
},
{
"name": "KRBPASSWORD",
"valueFrom": {
"secretKeyRef": {"key": "password", "name": self.secret_name}
},
},
]
)
def getKrbInit(self):
init = {
"command": ["sh", "-c", "echo $KRBPASSWORD|kinit $KRBUSERNAME@CERN.CH\n"],
"env": [
{"name": "KRB5CCNAME", "value": "FILE:/tmp/kerberos/tmp_kt"},
{
"name": "KRBUSERNAME",
"valueFrom": {
"secretKeyRef": {"key": "username", "name": self.secret_name}
},
},
{
"name": "KRBPASSWORD",
"valueFrom": {
"secretKeyRef": {"key": "password", "name": self.secret_name}
},
},
],
"image": "cern/cc7-base",
"name": "makecc",
"volumeMounts": [{"mountPath": "/tmp/kerberos", "name": self.ticket_vol}],
}
return init
| class Kubekrbmixin(object):
def __init__(self, **kwargs):
self.ticket_vol = 'kerberos-data'
self.secret_name = 'statesecret'
def inject_kerberos(self, kube_resources):
for r in kube_resources:
if r['kind'] == 'Job':
for c in r['spec']['template']['spec']['initContainers']:
self.addKrbContainer(c)
for c in r['spec']['template']['spec']['containers']:
self.addKrbContainer(c)
r['spec']['template']['spec']['initContainers'].insert(0, self.getKrbInit())
r['spec']['template']['spec']['volumes'].extend([{'emptyDir': {}, 'name': self.ticket_vol}])
return kube_resources
def add_krb_container(self, data):
data.setdefault('volumeMounts', []).extend([{'mountPath': '/tmp/kerberos', 'name': self.ticket_vol}])
data.setdefault('env', []).extend([{'name': 'KRB5CCNAME', 'value': 'FILE:/tmp/kerberos/tmp_kt'}, {'name': 'KRBUSERNAME', 'valueFrom': {'secretKeyRef': {'key': 'username', 'name': self.secret_name}}}, {'name': 'KRBPASSWORD', 'valueFrom': {'secretKeyRef': {'key': 'password', 'name': self.secret_name}}}])
def get_krb_init(self):
init = {'command': ['sh', '-c', 'echo $KRBPASSWORD|kinit $KRBUSERNAME@CERN.CH\n'], 'env': [{'name': 'KRB5CCNAME', 'value': 'FILE:/tmp/kerberos/tmp_kt'}, {'name': 'KRBUSERNAME', 'valueFrom': {'secretKeyRef': {'key': 'username', 'name': self.secret_name}}}, {'name': 'KRBPASSWORD', 'valueFrom': {'secretKeyRef': {'key': 'password', 'name': self.secret_name}}}], 'image': 'cern/cc7-base', 'name': 'makecc', 'volumeMounts': [{'mountPath': '/tmp/kerberos', 'name': self.ticket_vol}]}
return init |
"""Some helper functions for test assertions"""
def assert_lists_equal(left, right):
message = "Lists are not equal; {0}!={1}".format(left, right)
assert len(left) == len(right), message
for i, _ in enumerate(left):
item_message = (message +
"\n; item {0} doesn't match {1}!={2}".format(i, left[i],
right[i]))
assert left[i] == right[i], item_message
def assert_dicts_equal(left, right, item_checker=None):
"""Check if dictionaries are equal.
Args:
item_checker: (Optional): Assert if dictionary items are equal
"""
left_keys = set(left.keys())
right_keys = set(right.keys())
message = [f"{left} != {right}"]
is_equal = True
if left_keys - right_keys:
is_equal = False
message.append(f"Left has extra keys {left_keys - right_keys}")
if right_keys - left_keys:
is_equal = False
message.append(f"right has extra keys {right_keys - left_keys}")
common_keys = left_keys.intersection(right_keys)
assert is_equal, "\n".join(message)
for k in common_keys:
if item_checker:
assert item_checker(left[k], right[k])
else:
assert left[k] == right[k], f"{left[k]}!={right[k]}"
| """Some helper functions for test assertions"""
def assert_lists_equal(left, right):
message = 'Lists are not equal; {0}!={1}'.format(left, right)
assert len(left) == len(right), message
for (i, _) in enumerate(left):
item_message = message + "\n; item {0} doesn't match {1}!={2}".format(i, left[i], right[i])
assert left[i] == right[i], item_message
def assert_dicts_equal(left, right, item_checker=None):
"""Check if dictionaries are equal.
Args:
item_checker: (Optional): Assert if dictionary items are equal
"""
left_keys = set(left.keys())
right_keys = set(right.keys())
message = [f'{left} != {right}']
is_equal = True
if left_keys - right_keys:
is_equal = False
message.append(f'Left has extra keys {left_keys - right_keys}')
if right_keys - left_keys:
is_equal = False
message.append(f'right has extra keys {right_keys - left_keys}')
common_keys = left_keys.intersection(right_keys)
assert is_equal, '\n'.join(message)
for k in common_keys:
if item_checker:
assert item_checker(left[k], right[k])
else:
assert left[k] == right[k], f'{left[k]}!={right[k]}' |
products = {
# 'Basil Hayden\'s 10 Year': '016679',
'Blade and Bow 22 Year': '016834',
'Blantons': '016850',
'Blantons Gold Label': '016841',
'Booker\'s': '016906',
'Buffalo Trace': '018006',
# 'Buffalo Trace Experimental': '0953565',
# 'Eagle Rare': '017766',
'Eagle Rare 17yr': '017756',
'EH Taylor Barrel Proof': '021600',
'EH Taylor Four Grain': '021605',
# 'EH Taylor Seasoned Wood': '021603',
'EH Taylor Single Barrel': '021589',
'EH Taylor Small Batch': '021602',
# 'EH Taylor Straight Rye': '027101',
'EH Taylor 18y Marriage': '017900',
'Elijah Craig 18y': '017920',
'Elijah Craig 21y': '017923',
'Elijah Craig 23y': '017925',
# 'Elijah Craig Barrel Proof': '017914',
'Elijah Craig Toasted Barrel': '017913',
'Elmer T. Lee': '017946',
'Four Roses LE Small Batch': '018374',
'Four Roses LE Small Batch Barrel': '018365',
'Four Roses LE Small Batch Bourbon': '018378',
# 'George Dickel Bottled In Bond': '016102',
'George T. Stagg': '018416',
# 'Henry Mckenna Single Barrel': '018656',
# 'Kentucky Owl Confiscated': '019320',
'Kentucky Owl Straight Rye Whiskey': '026772',
# 'Knob Creek LE 2001': '019240',
# 'Larceny Barrel Proof': '018860',
# 'Little Book Batch 2: Noe Simple Task': '024572'
# 'Little Book Batch 3: The Road Home': '019440'
# 'Little Book Chapter 4: Lessons Honored': '024574',
# 'Lost Prophet': '019456',
# 'Maker\'s Mark Wood Finishing Series': '019492',
'Michter\'s Single Barrel 10 Yr Bourbon': '019876',
'Michter\'s Limited Release Single Barrel 10 Yr Rye': '027062',
'Michter\'s Toasted Barrel Finish': '019872',
'Old Fitzgerald 9 Year Bottled In Bond': '016372',
'Old Fitzgerald 14 Year Bottles In Bond': '016375',
'Old Forester 150 Anniversary': '101052',
'Old Forester Birthday': '000612',
'Old Rip Van Winkle 10yr': '020140',
'Pappy Van Winkle Family Reserve 23yr': '021030',
'Pappy Van Winkle Family Reserve 20yr': '021016',
'Pappy Van Winkle Family Reserve 15yr': '020150',
'Parkers Heritage #13 Heavy Char Rye': '026617',
'Parkers Heritage #43 Heavy Char Bourbon': '026412',
'Rock Hill Farms': '021279',
'Sazerac Rye 6yr': '027100',
'Sazerac Rye 18yr': '027096',
'Stagg Jr.': '021540',
'Thomas H. Handy': '027036',
'Van Winkle Special Reserve 12yr': '021906',
'Weller Antique': '022036',
'Weller 12 Year': '022027',
'Weller Full Proof': '022044',
'Weller Special Reserve': '021986',
'Weller C.Y.P.B': '022042',
'Weller Single Barrel': '022046',
# 'Wild Turkey Master\'s Keep Decades': '022097',
# 'Wild Turkey Master\'s Keep Revival': '086953',
# 'Wild Turkey Master\'s Keep Cornerstone': '022170',
# 'Wild Turkey Master\'s Keep Bottled In Bond': '100992',
'William Larue Weller': '022086'
} | products = {'Blade and Bow 22 Year': '016834', 'Blantons': '016850', 'Blantons Gold Label': '016841', "Booker's": '016906', 'Buffalo Trace': '018006', 'Eagle Rare 17yr': '017756', 'EH Taylor Barrel Proof': '021600', 'EH Taylor Four Grain': '021605', 'EH Taylor Single Barrel': '021589', 'EH Taylor Small Batch': '021602', 'EH Taylor 18y Marriage': '017900', 'Elijah Craig 18y': '017920', 'Elijah Craig 21y': '017923', 'Elijah Craig 23y': '017925', 'Elijah Craig Toasted Barrel': '017913', 'Elmer T. Lee': '017946', 'Four Roses LE Small Batch': '018374', 'Four Roses LE Small Batch Barrel': '018365', 'Four Roses LE Small Batch Bourbon': '018378', 'George T. Stagg': '018416', 'Kentucky Owl Straight Rye Whiskey': '026772', "Michter's Single Barrel 10 Yr Bourbon": '019876', "Michter's Limited Release Single Barrel 10 Yr Rye": '027062', "Michter's Toasted Barrel Finish": '019872', 'Old Fitzgerald 9 Year Bottled In Bond': '016372', 'Old Fitzgerald 14 Year Bottles In Bond': '016375', 'Old Forester 150 Anniversary': '101052', 'Old Forester Birthday': '000612', 'Old Rip Van Winkle 10yr': '020140', 'Pappy Van Winkle Family Reserve 23yr': '021030', 'Pappy Van Winkle Family Reserve 20yr': '021016', 'Pappy Van Winkle Family Reserve 15yr': '020150', 'Parkers Heritage #13 Heavy Char Rye': '026617', 'Parkers Heritage #43 Heavy Char Bourbon': '026412', 'Rock Hill Farms': '021279', 'Sazerac Rye 6yr': '027100', 'Sazerac Rye 18yr': '027096', 'Stagg Jr.': '021540', 'Thomas H. Handy': '027036', 'Van Winkle Special Reserve 12yr': '021906', 'Weller Antique': '022036', 'Weller 12 Year': '022027', 'Weller Full Proof': '022044', 'Weller Special Reserve': '021986', 'Weller C.Y.P.B': '022042', 'Weller Single Barrel': '022046', 'William Larue Weller': '022086'} |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def pathSum(self, root: 'TreeNode', sum: 'int') -> 'List[List[int]]':
return self.hasPathSum(root, sum, sum, 0)
def hasPathSum(self, root: 'TreeNode', sum: 'int', originalSum: 'int', dirty: 'int'):
if root == None:
return 0
elif root.right == None and root.left == None :
return int(sum == root.val)
else:
result = int(sum == root.val) + self.hasPathSum(root.left, sum - root.val, originalSum, 1) + self.hasPathSum(root.right, sum - root.val, originalSum, 1)
if (not dirty):
result = result + self.hasPathSum(root.left, originalSum, originalSum, 0) + self.hasPathSum(root.right, originalSum, originalSum, 0)
return result
| class Solution:
def path_sum(self, root: 'TreeNode', sum: 'int') -> 'List[List[int]]':
return self.hasPathSum(root, sum, sum, 0)
def has_path_sum(self, root: 'TreeNode', sum: 'int', originalSum: 'int', dirty: 'int'):
if root == None:
return 0
elif root.right == None and root.left == None:
return int(sum == root.val)
else:
result = int(sum == root.val) + self.hasPathSum(root.left, sum - root.val, originalSum, 1) + self.hasPathSum(root.right, sum - root.val, originalSum, 1)
if not dirty:
result = result + self.hasPathSum(root.left, originalSum, originalSum, 0) + self.hasPathSum(root.right, originalSum, originalSum, 0)
return result |
#
# PySNMP MIB module NETSERVER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NETSERVER-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:20:48 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Integer32, mib_2, Bits, Counter64, NotificationType, NotificationType, enterprises, ObjectIdentity, Counter32, ModuleIdentity, TimeTicks, IpAddress, MibIdentifier, iso, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "mib-2", "Bits", "Counter64", "NotificationType", "NotificationType", "enterprises", "ObjectIdentity", "Counter32", "ModuleIdentity", "TimeTicks", "IpAddress", "MibIdentifier", "iso", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
auspex = MibIdentifier((1, 3, 6, 1, 4, 1, 80))
netServer = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3))
axProductInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 1))
axNP = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 2))
axFSP = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3))
axTrapData = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4))
axFP = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 2))
fpHTFS = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3))
axSP = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 3))
spRaid = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 3, 2))
npProtocols = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 2, 3))
axFab = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 4))
fabRaid = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5))
axProductName = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 1, 1), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: axProductName.setStatus('mandatory')
if mibBuilder.loadTexts: axProductName.setDescription('Name of the file server product.')
axSWVersion = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 1, 2), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: axSWVersion.setStatus('mandatory')
if mibBuilder.loadTexts: axSWVersion.setDescription('Version of the M16 Kernel on Netserver')
axNumNPFSP = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: axNumNPFSP.setStatus('mandatory')
if mibBuilder.loadTexts: axNumNPFSP.setDescription('Number of NPFSP boards on file server.')
npTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 1), )
if mibBuilder.loadTexts: npTable.setStatus('mandatory')
if mibBuilder.loadTexts: npTable.setDescription('A table for all NPs(Network Processors) on the file server.')
npEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npEntry.setDescription('An entry for each NP on the file server.')
npIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIndex.setStatus('mandatory')
if mibBuilder.loadTexts: npIndex.setDescription('A unique number for identifying an NP in the system.')
npBusyCount = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npBusyCount.setStatus('mandatory')
if mibBuilder.loadTexts: npBusyCount.setDescription('Busy counts of NP.')
npIdleCount = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIdleCount.setStatus('mandatory')
if mibBuilder.loadTexts: npIdleCount.setDescription('Idle counts of NP.')
npIfTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 2), )
if mibBuilder.loadTexts: npIfTable.setStatus('mandatory')
if mibBuilder.loadTexts: npIfTable.setDescription('Table containing information for each interface of NP. It maps the interface with the NP')
npIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"), (0, "NETSERVER-MIB", "npIfIndex"))
if mibBuilder.loadTexts: npIfEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npIfEntry.setDescription('Entry for each interface')
npIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: npIfIndex.setDescription('A unique number for an interface for a given NP')
npIfifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfifIndex.setStatus('mandatory')
if mibBuilder.loadTexts: npIfifIndex.setDescription('Corresponding ifINdex in ifTable of mib-2')
npIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfType.setStatus('mandatory')
if mibBuilder.loadTexts: npIfType.setDescription('Type of network interface ')
npIfSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfSpeed.setStatus('mandatory')
if mibBuilder.loadTexts: npIfSpeed.setDescription('Nominal Interface Speed (in millions of bits per second)')
npIfInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfInOctets.setStatus('mandatory')
if mibBuilder.loadTexts: npIfInOctets.setDescription('The total number of octets received on the interface, including framing characters')
npIfInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfInUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: npIfInUcastPkts.setDescription('The number of subnetwork-unicast packets delivered to a higher-layer protocol')
npIfInNUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfInNUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: npIfInNUcastPkts.setDescription('The number of non-unicast (i.e., subnetwork-broadcast or multicast) packets delivered to a higher-layer protocol')
npIfInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfInDiscards.setStatus('mandatory')
if mibBuilder.loadTexts: npIfInDiscards.setDescription('The inbound packet discard count even though no errors were detected. One reason for discarding could be to free up buffer space')
npIfInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfInErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npIfInErrors.setDescription('The input-packet error count for an interface for a given NP')
npIfInUnknownProto = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfInUnknownProto.setStatus('mandatory')
if mibBuilder.loadTexts: npIfInUnknownProto.setDescription('The input-packet discard count due to an unknown or unsupported protocol')
npIfOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutOctets.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutOctets.setDescription('The total number of octets transmitted out of the interface, including framing characters')
npIfOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutUcastPkts.setDescription('The total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent')
npIfOutNUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutNUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutNUcastPkts.setDescription('The total number of packets that higher-level protocols requested be transmitted to a non-unicast (i.e., a subnetwork-broadcast or multicast) address, including those that were discarded or not sent')
npIfOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutDiscards.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutDiscards.setDescription('The number of outbound packets that were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possibel reason for discarding such a packet could be to free up buffer space')
npIfOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutErrors.setDescription('The number of outbound packets that could not be transmitted because of errors')
npIfOutCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutCollisions.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutCollisions.setDescription('The output-packet collision count for an interface for a given NP')
npIfOutQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 17), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOutQLen.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOutQLen.setDescription('The output-packet queue length (in packets) for an interface for a given NP')
npIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: npIfAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts: npIfAdminStatus.setDescription('The desired state of the interface. The testing(3) state indicates that no operational packets can be passed.')
npIfOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIfOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts: npIfOperStatus.setDescription('The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed.')
npIPTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1), )
if mibBuilder.loadTexts: npIPTable.setStatus('mandatory')
if mibBuilder.loadTexts: npIPTable.setDescription('Table for Internet Protocol statistics for each NP of the system.')
npIPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npIPEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npIPEntry.setDescription('An entry for each NP in the system.')
npIPForwarding = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("forwarding", 1), ("not-forwarding", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPForwarding.setStatus('mandatory')
if mibBuilder.loadTexts: npIPForwarding.setDescription('It has two values : forwarding(1) -- acting as gateway notforwarding(2) -- NOT acting as gateway')
npIPDefaultTTL = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPDefaultTTL.setStatus('mandatory')
if mibBuilder.loadTexts: npIPDefaultTTL.setDescription('NP IP default Time To Live.')
npIPInReceives = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPInReceives.setStatus('mandatory')
if mibBuilder.loadTexts: npIPInReceives.setDescription('NP IP received packet count.')
npIPInHdrErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPInHdrErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npIPInHdrErrors.setDescription('NP IP header error count.')
npIPInAddrErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPInAddrErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npIPInAddrErrors.setDescription('NP IP address error count.')
npIPForwDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPForwDatagrams.setStatus('mandatory')
if mibBuilder.loadTexts: npIPForwDatagrams.setDescription('NP IP forwarded datagram count.')
npIPInUnknownProtos = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPInUnknownProtos.setStatus('mandatory')
if mibBuilder.loadTexts: npIPInUnknownProtos.setDescription('NP IP input packet with unknown protocol.')
npIPInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPInDiscards.setStatus('mandatory')
if mibBuilder.loadTexts: npIPInDiscards.setDescription('NP IP discarded input packet count.')
npIPInDelivers = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPInDelivers.setStatus('mandatory')
if mibBuilder.loadTexts: npIPInDelivers.setDescription('NP IP delivered input packet count.')
npIPOutRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPOutRequests.setStatus('mandatory')
if mibBuilder.loadTexts: npIPOutRequests.setDescription('NP IP tx packet count.')
npIPOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPOutDiscards.setStatus('mandatory')
if mibBuilder.loadTexts: npIPOutDiscards.setDescription('NP IP discarded out packet count.')
npIPOutNoRoutes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPOutNoRoutes.setStatus('mandatory')
if mibBuilder.loadTexts: npIPOutNoRoutes.setDescription('NP IP tx fails due to no route count.')
npIPReasmTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPReasmTimeout.setStatus('mandatory')
if mibBuilder.loadTexts: npIPReasmTimeout.setDescription('NP IP reassembly time out count.')
npIPReasmReqds = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPReasmReqds.setStatus('mandatory')
if mibBuilder.loadTexts: npIPReasmReqds.setDescription('NP IP reassembly required count.')
npIPReasmOKs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPReasmOKs.setStatus('mandatory')
if mibBuilder.loadTexts: npIPReasmOKs.setDescription('NP IP reassembly success count.')
npIPReasmFails = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPReasmFails.setStatus('mandatory')
if mibBuilder.loadTexts: npIPReasmFails.setDescription('NP IP reassembly failure count.')
npIPFragOKs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPFragOKs.setStatus('mandatory')
if mibBuilder.loadTexts: npIPFragOKs.setDescription('NP IP fragmentation success count.')
npIPFragFails = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPFragFails.setStatus('mandatory')
if mibBuilder.loadTexts: npIPFragFails.setDescription('NP IP fragmentation failure count.')
npIPFragCreates = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPFragCreates.setStatus('mandatory')
if mibBuilder.loadTexts: npIPFragCreates.setDescription('NP IP fragment created count.')
npIPRoutingDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npIPRoutingDiscards.setStatus('mandatory')
if mibBuilder.loadTexts: npIPRoutingDiscards.setDescription('NP IP discarded route count.')
npICMPTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2), )
if mibBuilder.loadTexts: npICMPTable.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPTable.setDescription('Table for Internet Control Message Protocol statistics for each NP of the system.')
npICMPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npICMPEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPEntry.setDescription('An entry for each NP in the system.')
npICMPInMsgs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInMsgs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInMsgs.setDescription('NP ICMP input message count.')
npICMPInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInErrors.setDescription('NP ICMP input error packet count.')
npICMPInDestUnreachs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInDestUnreachs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInDestUnreachs.setDescription('NP ICMP input destination unreachable count.')
npICMPInTimeExcds = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInTimeExcds.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInTimeExcds.setDescription('NP ICMP input time exceeded count.')
npICMPInParmProbs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInParmProbs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInParmProbs.setDescription('NP ICMP input parameter problem packet count.')
npICMPInSrcQuenchs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInSrcQuenchs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInSrcQuenchs.setDescription('NP ICMP input source quench packet count.')
npICMPInRedirects = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInRedirects.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInRedirects.setDescription('NP ICMP input redirect packet count.')
npICMPInEchos = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInEchos.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInEchos.setDescription('NP ICMP input echo count.')
npICMPInEchoReps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInEchoReps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInEchoReps.setDescription('NP ICMP input echo reply count.')
npICMPInTimestamps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInTimestamps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInTimestamps.setDescription('NP ICMP input timestamp count.')
npICMPInTimestampReps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInTimestampReps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInTimestampReps.setDescription('NP ICMP input timestamp reply count.')
npICMPInAddrMasks = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInAddrMasks.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInAddrMasks.setDescription('NP ICMP input address mask count.')
npICMPInAddrMaskReps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPInAddrMaskReps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPInAddrMaskReps.setDescription('NP ICMP input address mask reply count.')
npICMPOutMsgs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutMsgs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutMsgs.setDescription('NP ICMP output message count.')
npICMPOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutErrors.setDescription('NP ICMP output error packet count.')
npICMPOutDestUnreachs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutDestUnreachs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutDestUnreachs.setDescription('NP ICMP output destination unreachable count.')
npICMPOutTimeExcds = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutTimeExcds.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutTimeExcds.setDescription('NP ICMP output time exceeded count.')
npICMPOutParmProbs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutParmProbs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutParmProbs.setDescription('NP ICMP output parameter problem packet count.')
npICMPOutSrcQuenchs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutSrcQuenchs.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutSrcQuenchs.setDescription('NP ICMP output source quench packet count.')
npICMPOutRedirects = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutRedirects.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutRedirects.setDescription('NP ICMP output redirect packet count.')
npICMPOutEchos = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutEchos.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutEchos.setDescription('NP ICMP output echo count.')
npICMPOutEchoReps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutEchoReps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutEchoReps.setDescription('NP ICMP output echo reply count.')
npICMPOutTimestamps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutTimestamps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutTimestamps.setDescription('NP ICMP output timestamp count.')
npICMPOutTimestampReps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutTimestampReps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutTimestampReps.setDescription('NP ICMP output timestamp reply count.')
npICMPOutAddrMasks = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutAddrMasks.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutAddrMasks.setDescription('NP ICMP output address mask count.')
npICMPOutAddrMaskReps = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npICMPOutAddrMaskReps.setStatus('mandatory')
if mibBuilder.loadTexts: npICMPOutAddrMaskReps.setDescription('NP ICMP output address mask reply count.')
npTCPTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3), )
if mibBuilder.loadTexts: npTCPTable.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPTable.setDescription('Table for Transmission Control Protocol statistics for each NP of the system.')
npTCPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npTCPEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPEntry.setDescription('An entry for each NP in the system.')
npTCPRtoAlgorithm = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("constant", 2), ("rsre", 3), ("vanj", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPRtoAlgorithm.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPRtoAlgorithm.setDescription('NP TCP Round Trip Algorithm type.')
npTCPRtoMin = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPRtoMin.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPRtoMin.setDescription('NP TCP minimum RTO.')
npTCPRtoMax = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPRtoMax.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPRtoMax.setDescription('NP TCP maximum RTO.')
npTCPMaxConn = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPMaxConn.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPMaxConn.setDescription('NP TCP maximum number of connections.')
npTCPActiveOpens = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPActiveOpens.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPActiveOpens.setDescription('NP TCP active open count.')
npTCPPassiveOpens = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPPassiveOpens.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPPassiveOpens.setDescription('NP TCP passive open count.')
npTCPAttemptFails = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPAttemptFails.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPAttemptFails.setDescription('NP TCP connect attempt fails.')
npTCPEstabResets = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPEstabResets.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPEstabResets.setDescription('NP TCP reset of established session.')
npTCPCurrEstab = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPCurrEstab.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPCurrEstab.setDescription('NP TCP current established session count.')
npTCPInSegs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPInSegs.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPInSegs.setDescription('NP TCP input segments count.')
npTCPOutSegs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPOutSegs.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPOutSegs.setDescription('NP TCP output segments count.')
npTCPRetransSegs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPRetransSegs.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPRetransSegs.setDescription('NP TCP retransmitted segments count.')
npTCPInErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPInErrs.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPInErrs.setDescription('NP TCP input error packets count.')
npTCPOutRsts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npTCPOutRsts.setStatus('mandatory')
if mibBuilder.loadTexts: npTCPOutRsts.setDescription('NP TCP output reset packets count.')
npUDPTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4), )
if mibBuilder.loadTexts: npUDPTable.setStatus('mandatory')
if mibBuilder.loadTexts: npUDPTable.setDescription('Table for User Datagram Protocol statistics for each NP of the system.')
npUDPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npUDPEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npUDPEntry.setDescription('An entry for each NP in the system.')
npUDPInDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npUDPInDatagrams.setStatus('mandatory')
if mibBuilder.loadTexts: npUDPInDatagrams.setDescription('NP UDP input datagram count.')
npUDPNoPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npUDPNoPorts.setStatus('mandatory')
if mibBuilder.loadTexts: npUDPNoPorts.setDescription('NP UDP number of ports.')
npUDPInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npUDPInErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npUDPInErrors.setDescription('NP UDP input error count.')
npUDPOutDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npUDPOutDatagrams.setStatus('mandatory')
if mibBuilder.loadTexts: npUDPOutDatagrams.setDescription('Np UDP output datagram count.')
npNFSTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5), )
if mibBuilder.loadTexts: npNFSTable.setStatus('mandatory')
if mibBuilder.loadTexts: npNFSTable.setDescription('Table for Network File System statistics for each NP in the system.')
npNFSEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npNFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npNFSEntry.setDescription('An entry for each NP in the system.')
npNFSDCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npNFSDCounts.setStatus('mandatory')
if mibBuilder.loadTexts: npNFSDCounts.setDescription('NP NFS count (obtained from NFS daemon)')
npNFSDNJobs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npNFSDNJobs.setStatus('mandatory')
if mibBuilder.loadTexts: npNFSDNJobs.setDescription('NP NFS number of jobs (obtained from NFS daemon)')
npNFSDBusyCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npNFSDBusyCounts.setStatus('mandatory')
if mibBuilder.loadTexts: npNFSDBusyCounts.setDescription('NP NFS busy count (obtained from NFS daemon)')
npSMBTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6), )
if mibBuilder.loadTexts: npSMBTable.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBTable.setDescription('Contains statistical counts for the SMB protocol per NP')
npSMBEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1), ).setIndexNames((0, "NETSERVER-MIB", "npIndex"))
if mibBuilder.loadTexts: npSMBEntry.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBEntry.setDescription('An entry for each NP in the system.')
npSMBRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBRcvd.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBRcvd.setDescription('The total number of SMB netbios messages received.')
npSMBBytesRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBBytesRcvd.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBBytesRcvd.setDescription('The total number of SMB related bytes rvcd by this NP from a client (does not include netbios header bytes).')
npSMBBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBBytesSent.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBBytesSent.setDescription('The total SMB related bytes sent by this NP to a client (does not include netbios header bytes).')
npSMBReads = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBReads.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBReads.setDescription('The total number of SMB reads consisting of the following opcodes: SMB-COM-READ, SMB-COM-LOCK-AND-READ, SMB-COM-READ-RAW, SMB-COM-READ-MPX, SMB-COM-READ-MPX-SECONDARY and SMB-COM-READ-ANDX.')
npSMBWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBWrites.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBWrites.setDescription('The total number of SMB writes consisting of the following opcodes: SMB-COM-WRITE, SMB-COM-WRITE-AND-UNLOCK, SMB-COM-WRITE-RAW, SMB-COM-WRITE-MPX, SMB-COM-WRITE-COMPLETE, SMB-COM-WRITE-ANDX and SMB-COM-WRITE-AND-CLOSE.')
npSMBOpens = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBOpens.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBOpens.setDescription('The total number of SMB opens consisting of the SMB-COM-OPEN, SMB-COM-CREATE,SMB-COM-CREATE-TEMPORARY,SMB-COM-CREATE-NEW, TRANS2-OPEN2, NT-TRANSACT-CREATE and SMB-COM-OPEN-ANDX opcodes received.')
npSMBCloses = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBCloses.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBCloses.setDescription('The total number of SMB SMB-COM-CLOSE opcodes recieved.')
npSMBErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBErrors.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBErrors.setDescription('The total number of invalid netbios messages recieved.')
npSMBLocksHeld = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: npSMBLocksHeld.setStatus('mandatory')
if mibBuilder.loadTexts: npSMBLocksHeld.setDescription('The total number of locks currently held')
fspTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 1), )
if mibBuilder.loadTexts: fspTable.setStatus('mandatory')
if mibBuilder.loadTexts: fspTable.setDescription('A table for all FSPs(File and Storage Processors) on the file server.')
fspEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"))
if mibBuilder.loadTexts: fspEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fspEntry.setDescription('An entry for one FSP on the file server.')
fspIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fspIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fspIndex.setDescription('A unique number for identifying an FSP in the system.')
fspBusyCount = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fspBusyCount.setStatus('mandatory')
if mibBuilder.loadTexts: fspBusyCount.setDescription('Busy counts of FSP.')
fspIdleCount = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fspIdleCount.setStatus('mandatory')
if mibBuilder.loadTexts: fspIdleCount.setDescription('Idle counts of FSP.')
fpLFSTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1), )
if mibBuilder.loadTexts: fpLFSTable.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSTable.setDescription('Table for FP File System Services Statistics for each FSP on the system.')
fpLFSEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"))
if mibBuilder.loadTexts: fpLFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSEntry.setDescription('An entry for each FSP in the system.')
fpLFSVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSVersion.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSVersion.setDescription('FP file system services statistics version.')
fpLFSMounts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSMounts.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSMounts.setDescription('FP file system services - FC-MOUNT - Counter.')
fpLFSUMounts = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSUMounts.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSUMounts.setDescription('FP file system services - FC-UMOUNT - Counter.')
fpLFSReads = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSReads.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSReads.setDescription('FP file system services - FC-READ - Counter.')
fpLFSWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSWrites.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSWrites.setDescription('FP file system services - FC-WRITE - Counter.')
fpLFSReaddirs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSReaddirs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSReaddirs.setDescription('FP file system services - FC-READDIR - Counter.')
fpLFSReadlinks = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSReadlinks.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSReadlinks.setDescription('FP file system services - FC-READLINK - Counter.')
fpLFSMkdirs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSMkdirs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSMkdirs.setDescription('FP file system services - FC-MKDIR - Counter.')
fpLFSMknods = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSMknods.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSMknods.setDescription('FP file system services - FC-MKNOD - Counter.')
fpLFSReaddirPluses = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSReaddirPluses.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSReaddirPluses.setDescription('FP file system services - FC-READDIR-PLUS - Counter.')
fpLFSFsstats = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSFsstats.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSFsstats.setDescription('FP file system services - FC-FSSTAT - Counter.')
fpLFSNull = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSNull.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSNull.setDescription('FP file system services - FC-NULL - Counter.')
fpLFSFsinfo = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSFsinfo.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSFsinfo.setDescription('FP file system services - FC-FSINFO - Counter.')
fpLFSGetattrs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSGetattrs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSGetattrs.setDescription('FP file system services - FC-GETATTR - Counter.')
fpLFSSetattrs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSSetattrs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSSetattrs.setDescription('FP file system services - FC-SETATTR - Counter.')
fpLFSLookups = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSLookups.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSLookups.setDescription('FP file system services - FC-LOOKUP - Counter.')
fpLFSCreates = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSCreates.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSCreates.setDescription('FP file system services - FC-CREATE - Counter.')
fpLFSRemoves = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSRemoves.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSRemoves.setDescription('FP file system services - FC-REMOVE - Counter.')
fpLFSRenames = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSRenames.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSRenames.setDescription('FP file system services - FC-RENAME - Counter.')
fpLFSLinks = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSLinks.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSLinks.setDescription('FP file system services - FC-LINK - Counter.')
fpLFSSymlinks = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSSymlinks.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSSymlinks.setDescription('FP file system services - FC-SYMLINK - Counter.')
fpLFSRmdirs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSRmdirs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSRmdirs.setDescription('FP file system services - FC-RMDIR - Counter.')
fpLFSCkpntons = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSCkpntons.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSCkpntons.setDescription('FP file system services - FC-CKPNTON - Counter.')
fpLFSCkpntoffs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSCkpntoffs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSCkpntoffs.setDescription('FP file system services - FC-CKPNTOFFS - Counter.')
fpLFSClears = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSClears.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSClears.setDescription('FP file system services - FC-CLEAR - Counter.')
fpLFSIsolateFs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSIsolateFs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSIsolateFs.setDescription('FP file system services - FC-ISOLATE-FS - Counter.')
fpLFSReleaseFs = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 27), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSReleaseFs.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSReleaseFs.setDescription('FP file system services - FC-RELEASE-FS - Counter.')
fpLFSIsolationStates = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 28), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSIsolationStates.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSIsolationStates.setDescription('FP file system services - FC-ISOLATION-STATE - Counter.')
fpLFSDiagnostics = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 29), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSDiagnostics.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSDiagnostics.setDescription('FP file system services - FC-DIAGNOSTIC - Counter.')
fpLFSPurges = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 30), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpLFSPurges.setStatus('mandatory')
if mibBuilder.loadTexts: fpLFSPurges.setDescription('FP file system services - FC-PURGE - Counter.')
fpFileSystemTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2), )
if mibBuilder.loadTexts: fpFileSystemTable.setStatus('mandatory')
if mibBuilder.loadTexts: fpFileSystemTable.setDescription('Table containg File systems on each FSP')
fpFSEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"), (0, "NETSERVER-MIB", "fpFSIndex"))
if mibBuilder.loadTexts: fpFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fpFSEntry.setDescription('Entry for each File System')
fpFSIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fpFSIndex.setDescription('Uniquely identifies each FS on FSP')
fpHrFSIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpHrFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fpHrFSIndex.setDescription('Index of the corresponding FS entry in host resource mib')
fpDNLCTStatTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1), )
if mibBuilder.loadTexts: fpDNLCTStatTable.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCTStatTable.setDescription('DNLC is part of StackOS module. This table displays DNLC Statistics.')
fpDNLCSEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"))
if mibBuilder.loadTexts: fpDNLCSEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCSEntry.setDescription('Each entry for a FSP board.')
fpDNLCHit = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCHit.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCHit.setDescription('DNLC hit on a given FSP.')
fpDNLCMiss = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCMiss.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCMiss.setDescription('DNLC miss on a given FSP.')
fpDNLCEnter = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCEnter.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCEnter.setDescription('Number of DNLC entries made (total).')
fpDNLCConflict = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCConflict.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCConflict.setDescription('Times entry found in DNLC on dnlc-enter.')
fpDNLCPurgevfsp = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCPurgevfsp.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCPurgevfsp.setDescription('Entries purged based on vfsp.')
fpDNLCPurgevp = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCPurgevp.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCPurgevp.setDescription('Entries purge based on vp.')
fpDNLCHashsz = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpDNLCHashsz.setStatus('mandatory')
if mibBuilder.loadTexts: fpDNLCHashsz.setDescription('Number of hash buckets in dnlc hash table.')
fpPageStatTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2), )
if mibBuilder.loadTexts: fpPageStatTable.setStatus('mandatory')
if mibBuilder.loadTexts: fpPageStatTable.setDescription('Page is part of StackOS module. This table gives the Page Statistics for all FSPs.')
fpPageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"))
if mibBuilder.loadTexts: fpPageEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fpPageEntry.setDescription('Each Entry in the table displays Page Statistics for a FSP.')
fpPAGETotalmem = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGETotalmem.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGETotalmem.setDescription('Allocated memory for pages.')
fpPAGEFreelistcnt = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEFreelistcnt.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEFreelistcnt.setDescription('Pages on freelist.')
fpPAGECachelistcnt = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGECachelistcnt.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGECachelistcnt.setDescription('Pages on cachelist.')
fpPAGEDirtyflistcnt = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEDirtyflistcnt.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEDirtyflistcnt.setDescription('Pages on dirtyflist.')
fpPAGEDirtydlistcnt = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEDirtydlistcnt.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEDirtydlistcnt.setDescription('Pages on dirtydlist')
fpPAGECachehit = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGECachehit.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGECachehit.setDescription('Page cache hit.')
fpPAGECachemiss = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGECachemiss.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGECachemiss.setDescription('Page cache miss.')
fpPAGEWritehit = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEWritehit.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEWritehit.setDescription('Page cache write hit.')
fpPAGEWritemiss = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEWritemiss.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEWritemiss.setDescription('Page cache write miss.')
fpPAGEZcref = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEZcref.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEZcref.setDescription('Page Zref.')
fpPAGEZcbreak = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEZcbreak.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEZcbreak.setDescription('Page Zbreak.')
fpPAGEOutscan = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEOutscan.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEOutscan.setDescription('Page out scan.')
fpPAGEOutputpage = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEOutputpage.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEOutputpage.setDescription('Output Page.')
fpPAGEFsflushscan = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEFsflushscan.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEFsflushscan.setDescription('Flush scan.')
fpPAGEFsflushputpage = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEFsflushputpage.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEFsflushputpage.setDescription('Flush output page.')
fpPAGEOutcnt = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpPAGEOutcnt.setStatus('mandatory')
if mibBuilder.loadTexts: fpPAGEOutcnt.setDescription('Page out count.')
fpBufferStatTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3), )
if mibBuilder.loadTexts: fpBufferStatTable.setStatus('mandatory')
if mibBuilder.loadTexts: fpBufferStatTable.setDescription('BufferIO is one of the modules present in StackOS. This table displays the bufferIO statistics for all FSPs.')
fpBufferEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"))
if mibBuilder.loadTexts: fpBufferEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fpBufferEntry.setDescription('Each entry in the table for a single FSP.')
fpBUFLreads = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFLreads.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFLreads.setDescription('Number of buffered reads.')
fpBUFBreads = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFBreads.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFBreads.setDescription('Number of breads doing sp-read.')
fpBUFLwrites = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFLwrites.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFLwrites.setDescription('Number of buffered writes (incl. delayed).')
fpBUFBwrites = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFBwrites.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFBwrites.setDescription('Number of bwrites doing sp-write.')
fpBUFIOwaits = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFIOwaits.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFIOwaits.setDescription('Number of processes blocked in biowait.')
fpBUFResid = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFResid.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFResid.setDescription('Running total of unused buf memory.')
fpBUFBufsize = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFBufsize.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFBufsize.setDescription('Running total of memory on free list.')
fpBUFBcount = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpBUFBcount.setStatus('mandatory')
if mibBuilder.loadTexts: fpBUFBcount.setDescription('Running total of memory on hash lists.')
fpInodeTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4), )
if mibBuilder.loadTexts: fpInodeTable.setStatus('mandatory')
if mibBuilder.loadTexts: fpInodeTable.setDescription('Inode table displays the Inode Statistics for all FSPs. Inode is part of StackOS module.')
fpInodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"))
if mibBuilder.loadTexts: fpInodeEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fpInodeEntry.setDescription('Each entry in the table displays Inode Statistics for a FSP.')
fpINODEIgetcalls = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpINODEIgetcalls.setStatus('mandatory')
if mibBuilder.loadTexts: fpINODEIgetcalls.setDescription('Number of calls to htfs-iget.')
fpFoundinodes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpFoundinodes.setStatus('mandatory')
if mibBuilder.loadTexts: fpFoundinodes.setDescription('Inode cache hits.')
fpTotalinodes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpTotalinodes.setStatus('mandatory')
if mibBuilder.loadTexts: fpTotalinodes.setDescription('Total number of inodes in memory.')
fpGoneinodes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpGoneinodes.setStatus('mandatory')
if mibBuilder.loadTexts: fpGoneinodes.setDescription('Number of inodes on gone list.')
fpFreeinodes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpFreeinodes.setStatus('mandatory')
if mibBuilder.loadTexts: fpFreeinodes.setDescription('Number of inodes on free list.')
fpCacheinodes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpCacheinodes.setStatus('mandatory')
if mibBuilder.loadTexts: fpCacheinodes.setDescription('Number of inodes on cache list.')
fpSyncinodes = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fpSyncinodes.setStatus('mandatory')
if mibBuilder.loadTexts: fpSyncinodes.setDescription('Number of inodes on sync list.')
class RaidLevel(TextualConvention, Integer32):
description = 'Defines the type of Raid Level present in the system'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 3, 5, 6, 7))
namedValues = NamedValues(("raid0", 0), ("raid1", 1), ("raid3", 3), ("raid5", 5), ("raid6", 6), ("raid7", 7))
class RebuildFlag(TextualConvention, Integer32):
description = 'Defines the Rebuild Flag type.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 240, 241, 242, 243, 244, 255))
namedValues = NamedValues(("none", 0), ("autorebuild", 1), ("manualrebuild", 2), ("check", 3), ("expandcapacity", 4), ("phydevfailed", 240), ("logdevfailed", 241), ("justfailed", 242), ("canceled", 243), ("expandcapacityfailed", 244), ("autorebuildfailed", 255))
class BusType(TextualConvention, Integer32):
description = 'Defines Bus type.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("eisa", 1), ("mca", 2), ("pci", 3), ("vesa", 4), ("isa", 5), ("scsi", 6))
class ControllerType(TextualConvention, Integer32):
description = 'This textual Convention defines the type of Controller.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 8, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 80, 96, 97, 98, 99, 100, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 192, 193, 194, 195))
namedValues = NamedValues(("dac960E", 1), ("dac960M", 8), ("dac960PD", 16), ("dac960PL", 17), ("dac960PDU", 18), ("dac960PE", 19), ("dac960PG", 20), ("dac960PJ", 21), ("dac960PTL", 22), ("dac960PR", 23), ("dac960PRL", 24), ("dac960PT", 25), ("dac1164P", 26), ("dacI20", 80), ("dac960S", 96), ("dac960SU", 97), ("dac960SX", 98), ("dac960SF", 99), ("dac960FL", 100), ("hba440", 129), ("hba440C", 130), ("hba445", 131), ("hba445C", 132), ("hba440xC", 133), ("hba445S", 134), ("hba640", 136), ("hba640A", 137), ("hba446", 138), ("hba446D", 139), ("hba446S", 140), ("hba742", 144), ("hba742A", 145), ("hba747", 146), ("hba747D", 147), ("hba747S", 148), ("hba74xC", 149), ("hba757", 150), ("hba757D", 151), ("hba757S", 152), ("hba757CD", 153), ("hba75xC", 154), ("hba747C", 155), ("hba757C", 156), ("hba540", 160), ("hba540C", 161), ("hba542", 162), ("hba542B", 163), ("hba542C", 164), ("hba542D", 165), ("hba545", 166), ("hba545C", 167), ("hba545S", 168), ("hba54xC", 169), ("hba946", 176), ("hba946C", 177), ("hba948", 178), ("hba948C", 179), ("hba956", 180), ("hba956C", 181), ("hba958", 182), ("hba958C", 183), ("hba958D", 184), ("hba956CD", 185), ("hba958CD", 186), ("hba930", 192), ("hba932", 193), ("hba950", 194), ("hba952", 195))
class VendorName(TextualConvention, Integer32):
description = 'Name of the Vendors'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8))
namedValues = NamedValues(("mylex", 0), ("ibm", 1), ("hp", 2), ("dec", 3), ("att", 4), ("dell", 5), ("nec", 6), ("sni", 7), ("ncr", 8))
class U08Bits(TextualConvention, Integer32):
description = 'Integer type of range 0..255'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255)
class U16Bits(TextualConvention, Integer32):
description = 'Integer type of range 0..65535'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535)
fabLogDevTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1), )
if mibBuilder.loadTexts: fabLogDevTable.setStatus('mandatory')
if mibBuilder.loadTexts: fabLogDevTable.setDescription('This table contains information for logical devices.')
fabLogDevEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"), (0, "NETSERVER-MIB", "ldIndex"))
if mibBuilder.loadTexts: fabLogDevEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fabLogDevEntry.setDescription('Entry for each logical device')
ldIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldIndex.setStatus('mandatory')
if mibBuilder.loadTexts: ldIndex.setDescription(' Index of the logical device')
ldSectorReads = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldSectorReads.setStatus('mandatory')
if mibBuilder.loadTexts: ldSectorReads.setDescription(' Number of sectors read ')
ldWBufReads = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldWBufReads.setStatus('mandatory')
if mibBuilder.loadTexts: ldWBufReads.setDescription(' Number of sectors read from WBUF ')
ldSectorWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldSectorWrites.setStatus('mandatory')
if mibBuilder.loadTexts: ldSectorWrites.setDescription('Number of sector writes ')
ldReadIO = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldReadIO.setStatus('mandatory')
if mibBuilder.loadTexts: ldReadIO.setDescription("Number of read IO's ")
ldWriteIO = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldWriteIO.setStatus('mandatory')
if mibBuilder.loadTexts: ldWriteIO.setDescription("Number of write IO's ")
ldMediaErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldMediaErrors.setStatus('mandatory')
if mibBuilder.loadTexts: ldMediaErrors.setDescription('Number of media errors ')
ldDriveErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldDriveErrors.setStatus('mandatory')
if mibBuilder.loadTexts: ldDriveErrors.setDescription('Number of drive errors ')
ldTotalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ldTotalTime.setStatus('mandatory')
if mibBuilder.loadTexts: ldTotalTime.setDescription('Total time for the logical device')
fabAdptTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1), )
if mibBuilder.loadTexts: fabAdptTable.setStatus('mandatory')
if mibBuilder.loadTexts: fabAdptTable.setDescription('Table containing information for all fibre channel adapters information on the Auspex IO node')
fabAdptEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"), (0, "NETSERVER-MIB", "fabIndex"))
if mibBuilder.loadTexts: fabAdptEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fabAdptEntry.setDescription('Entry for each fibre channel adapter')
fabIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fabIndex.setDescription('Fabric adapter index')
fabPCIBusNum = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 2), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabPCIBusNum.setStatus('mandatory')
if mibBuilder.loadTexts: fabPCIBusNum.setDescription('Fabric adapter PCI BUS number')
fabSlotNum = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 3), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabSlotNum.setStatus('mandatory')
if mibBuilder.loadTexts: fabSlotNum.setDescription('Fabric adapter Slot number')
fabIntLine = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 4), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabIntLine.setStatus('mandatory')
if mibBuilder.loadTexts: fabIntLine.setDescription('Fabric adapter Interrupt line')
fabIntPin = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 5), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabIntPin.setStatus('mandatory')
if mibBuilder.loadTexts: fabIntPin.setDescription('Fabric adapter Interrupt pin')
fabType = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 6), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabType.setStatus('mandatory')
if mibBuilder.loadTexts: fabType.setDescription('Fabric adapter Type')
fabVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 7), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabVendorId.setStatus('mandatory')
if mibBuilder.loadTexts: fabVendorId.setDescription('Fabric adapter Vendor ID')
fabDeviceId = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 8), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabDeviceId.setStatus('mandatory')
if mibBuilder.loadTexts: fabDeviceId.setDescription('Fabric adapter Device ID')
fabRevisionId = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 9), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabRevisionId.setStatus('mandatory')
if mibBuilder.loadTexts: fabRevisionId.setDescription('Fabric adapter Revision ID')
fabWWN = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabWWN.setStatus('mandatory')
if mibBuilder.loadTexts: fabWWN.setDescription('Fabric adapter World Wide Number')
fabNumOfTargets = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 11), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabNumOfTargets.setStatus('mandatory')
if mibBuilder.loadTexts: fabNumOfTargets.setDescription('Number of targets found for the adapter')
fabAdptNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 12), U08Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabAdptNumber.setStatus('mandatory')
if mibBuilder.loadTexts: fabAdptNumber.setDescription('Fabric adapter Number')
fabTargetTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2), )
if mibBuilder.loadTexts: fabTargetTable.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetTable.setDescription('Table containing information for all fibre channel adapters information on the Auspex IO node')
fabTargetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"), (0, "NETSERVER-MIB", "fabTargetIndex"))
if mibBuilder.loadTexts: fabTargetEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetEntry.setDescription('Entry for each fibre channel adapter')
fabTargetIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetIndex.setDescription('The Fabric target adapter index ')
fabTargetAdapterNum = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 2), U08Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetAdapterNum.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetAdapterNum.setDescription('The fabric target Adapter number')
fabTargetNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 3), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetNumber.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetNumber.setDescription('The fabric target number')
fabTargetWWN = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetWWN.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetWWN.setDescription('The fabric target WWN number')
fabTargetPortWWN = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetPortWWN.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetPortWWN.setDescription('The fabric target Port WWN number')
fabTargetAliasName = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetAliasName.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetAliasName.setDescription('The fabric target Alias Name')
fabTargetType = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disk", 1), ("other", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetType.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetType.setDescription('The fabric target Type disk - other ')
fabTargetNumOfLuns = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 8), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabTargetNumOfLuns.setStatus('mandatory')
if mibBuilder.loadTexts: fabTargetNumOfLuns.setDescription('The number of luns on the target')
fabLunTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3), )
if mibBuilder.loadTexts: fabLunTable.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunTable.setDescription('Table containing information for all Luns ')
fabLunEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"), (0, "NETSERVER-MIB", "fabLunIndex"))
if mibBuilder.loadTexts: fabLunEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunEntry.setDescription('Entry for each Lun')
fabLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunIndex.setDescription('Unique Lun identifier')
fabLunNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 2), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunNumber.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunNumber.setDescription(' Lun Number ')
fabLunAdptNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 3), U08Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunAdptNumber.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunAdptNumber.setDescription('The adapter number for the lun')
fabLunTarNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 4), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunTarNumber.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunTarNumber.setDescription('The Target number for the lun')
fabLunWWN = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunWWN.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunWWN.setDescription('The worldwide number for the lun')
fabLunType = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 6), U08Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunType.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunType.setDescription('The type of the lun')
fabLunSize = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunSize.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunSize.setDescription('The size of the lun')
fabLunMap = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("unmapped", 0), ("mapped", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunMap.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunMap.setDescription('Identifier for the lun mapping')
fabLunMapTable = MibTable((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4), )
if mibBuilder.loadTexts: fabLunMapTable.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunMapTable.setDescription('Table containing mapping information for all Luns ')
fabLunMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1), ).setIndexNames((0, "NETSERVER-MIB", "fspIndex"), (0, "NETSERVER-MIB", "fabLunMapIndex"))
if mibBuilder.loadTexts: fabLunMapEntry.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunMapEntry.setDescription('Entry for each mapped Lun')
fabLunMapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunMapIndex.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunMapIndex.setDescription('Unique Mapped Lun identifier')
fabLunMNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 2), U16Bits()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunMNumber.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunMNumber.setDescription(' Mapped Lun Number ')
fabLunAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunAlias.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunAlias.setDescription('The Alias name associated with the lun')
fabLunMapWWN = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunMapWWN.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunMapWWN.setDescription('The WWN associated with the lun')
fabLunLabel = MibTableColumn((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unlabelled", 0), ("labelled", 1), ("labelledactive", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: fabLunLabel.setStatus('mandatory')
if mibBuilder.loadTexts: fabLunLabel.setDescription('The label of the lun')
trapFSFull = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 1))
trapFSDegradation = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 2))
trapDiskUpdation = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 3))
trapFCAdptLinkFailure = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 4))
trapFCAdptLinkUp = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 5))
trapFCLossOfLinkFailure = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 6))
trapLunDisappear = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 7))
trapLunSizeChange = MibIdentifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 8))
trapFSFullMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFSFullMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapFSFullMsg.setDescription('Name of the file system which got full and for which fileSystemFull trap has to be sent.')
trapFSFullTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 1, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFSFullTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapFSFullTimeStamp.setDescription('Time at which file system identified by trapFSFullMsg got full.')
trapFSDegradationMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 2, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFSDegradationMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapFSDegradationMsg.setDescription('Name of the file system which got degraded and for which fileSystemDegradation trap has to be sent.')
trapFSDegradationTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 2, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFSDegradationTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapFSDegradationTimeStamp.setDescription('Time at which file system identified by trapFSDegradationMsg got degraded.')
trapDiskMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 3, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDiskMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapDiskMsg.setDescription('Name of the disk which got removed from the system and for which diskStackUpdation trap has to be sent.')
trapDiskTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 3, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDiskTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapDiskTimeStamp.setDescription('Time at which disk identified by trapDiskIndex was added/removed.')
trapFCAdptLinkFailureMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 4, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFCAdptLinkFailureMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapFCAdptLinkFailureMsg.setDescription('Name of the fibre channel adapter on which link failure occured.')
trapFCAdptLinkFailureTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 4, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFCAdptLinkFailureTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapFCAdptLinkFailureTimeStamp.setDescription('Time at which the fibre channel adapter link failure occured.')
trapFCAdptLinkUpMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 5, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFCAdptLinkUpMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapFCAdptLinkUpMsg.setDescription('Name of the fibre channel adapter on which link up occured.')
trapFCAdptLinkUpTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 5, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFCAdptLinkUpTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapFCAdptLinkUpTimeStamp.setDescription('Time at which the fibre channel adapter link up occured.')
trapFCLossOfLinkFailureMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 6, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFCLossOfLinkFailureMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapFCLossOfLinkFailureMsg.setDescription('Name of the SD device which had complete loss of link.')
trapFCLossOfLinkFailureTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 6, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapFCLossOfLinkFailureTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapFCLossOfLinkFailureTimeStamp.setDescription('Time at which complete loss of link occured.')
trapLunDisappearMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 7, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapLunDisappearMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapLunDisappearMsg.setDescription('Mapped lun which disappeared')
trapLunDisappearTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 7, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapLunDisappearTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapLunDisappearTimeStamp.setDescription('Time at which mapped lun disappeared')
trapLunSizeChangeMsg = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 8, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapLunSizeChangeMsg.setStatus('mandatory')
if mibBuilder.loadTexts: trapLunSizeChangeMsg.setDescription('Mapped lun whose lun size changed')
trapLunSizeChangeTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 8, 2), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapLunSizeChangeTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts: trapLunSizeChangeTimeStamp.setDescription('Time at which mapped lun size changed')
fileSystemFullTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,1)).setObjects(("NETSERVER-MIB", "trapFSFullMsg"), ("NETSERVER-MIB", "trapFSFullTimeStamp"))
if mibBuilder.loadTexts: fileSystemFullTrap.setDescription('Trap indicating that a file system got full.')
if mibBuilder.loadTexts: fileSystemFullTrap.setReference('None')
fileSystemDegradationTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,2)).setObjects(("NETSERVER-MIB", "trapFSDegradationMsg"), ("NETSERVER-MIB", "trapFSDegradationTimeStamp"))
if mibBuilder.loadTexts: fileSystemDegradationTrap.setDescription('Trap indicating that a file system got degradated.')
if mibBuilder.loadTexts: fileSystemDegradationTrap.setReference('None')
diskStackUpdationTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,3)).setObjects(("NETSERVER-MIB", "trapDiskMsg"), ("NETSERVER-MIB", "trapDiskTimeStamp"))
if mibBuilder.loadTexts: diskStackUpdationTrap.setDescription('Trap indicating that a disk was removed.')
if mibBuilder.loadTexts: diskStackUpdationTrap.setReference('None')
fcLinkFailureTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,4)).setObjects(("NETSERVER-MIB", "trapFCAdptLinkFailureMsg"), ("NETSERVER-MIB", "trapFCAdptLinkFailureTimeStamp"))
if mibBuilder.loadTexts: fcLinkFailureTrap.setDescription('Trap indicating that a adapter link failure occured.')
if mibBuilder.loadTexts: fcLinkFailureTrap.setReference('None')
fcLinkUpTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,5)).setObjects(("NETSERVER-MIB", "trapFCAdptLinkUpMsg"), ("NETSERVER-MIB", "trapFCAdptLinkUpTimeStamp"))
if mibBuilder.loadTexts: fcLinkUpTrap.setDescription('Trap indicating that a adapter link up occured.')
if mibBuilder.loadTexts: fcLinkUpTrap.setReference('None')
fcCompleteLossTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,6)).setObjects(("NETSERVER-MIB", "trapFCLossOfLinkFailureMsg"), ("NETSERVER-MIB", "trapFCLossOfLinkFailureTimeStamp"))
if mibBuilder.loadTexts: fcCompleteLossTrap.setDescription('Trap indicating that complete loss of link occured.')
if mibBuilder.loadTexts: fcCompleteLossTrap.setReference('None')
lunDisappearTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,7)).setObjects(("NETSERVER-MIB", "trapLunDisappearMsg"), ("NETSERVER-MIB", "trapLunDisappearTimeStamp"))
if mibBuilder.loadTexts: lunDisappearTrap.setDescription('Trap indicating that a mapped lun disappeared.')
if mibBuilder.loadTexts: lunDisappearTrap.setReference('None')
lunSizeChangeTrap = NotificationType((1, 3, 6, 1, 4, 1, 80) + (0,8)).setObjects(("NETSERVER-MIB", "trapLunSizeChangeMsg"), ("NETSERVER-MIB", "trapLunSizeChangeTimeStamp"))
if mibBuilder.loadTexts: lunSizeChangeTrap.setDescription('Trap indicating that lun size change occured on a mapped lun.')
if mibBuilder.loadTexts: lunSizeChangeTrap.setReference('None')
host = MibIdentifier((1, 3, 6, 1, 2, 1, 25))
hrSystem = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 1))
hrStorage = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2))
hrDevice = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3))
class Boolean(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("true", 1), ("false", 2))
class KBytes(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class ProductID(ObjectIdentifier):
pass
class DateAndTime(OctetString):
subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(8, 8), ValueSizeConstraint(11, 11), )
class InternationalDisplayString(OctetString):
pass
hrSystemUptime = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 1), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrSystemUptime.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemUptime.setDescription('The amount of time since this host was last initialized. Note that this is different from sysUpTime in MIB-II [3] because sysUpTime is the uptime of the network management portion of the system.')
hrSystemDate = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 2), DateAndTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hrSystemDate.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemDate.setDescription("The host's notion of the local date and time of day.")
hrSystemInitialLoadDevice = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hrSystemInitialLoadDevice.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemInitialLoadDevice.setDescription('The index of the hrDeviceEntry for the device from which this host is configured to load its initial operating system configuration.')
hrSystemInitialLoadParameters = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 4), InternationalDisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hrSystemInitialLoadParameters.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemInitialLoadParameters.setDescription('This object contains the parameters (e.g. a pathname and parameter) supplied to the load device when requesting the initial operating system configuration from that device.')
hrSystemNumUsers = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrSystemNumUsers.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemNumUsers.setDescription('The number of user sessions for which this host is storing state information. A session is a collection of processes requiring a single act of user authentication and possibly subject to collective job control.')
hrSystemProcesses = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrSystemProcesses.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemProcesses.setDescription('The number of process contexts currently loaded or running on this system.')
hrSystemMaxProcesses = MibScalar((1, 3, 6, 1, 2, 1, 25, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrSystemMaxProcesses.setStatus('mandatory')
if mibBuilder.loadTexts: hrSystemMaxProcesses.setDescription('The maximum number of process contexts this system can support. If there is no fixed maximum, the value should be zero. On systems that have a fixed maximum, this object can help diagnose failures that occur when this maximum is reached.')
hrStorageTypes = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1))
hrStorageOther = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 1))
hrStorageRam = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 2))
hrStorageVirtualMemory = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 3))
hrStorageFixedDisk = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 4))
hrStorageRemovableDisk = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 5))
hrStorageFloppyDisk = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 6))
hrStorageCompactDisc = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 7))
hrStorageRamDisk = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 8))
hrMemorySize = MibScalar((1, 3, 6, 1, 2, 1, 25, 2, 2), KBytes()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrMemorySize.setStatus('mandatory')
if mibBuilder.loadTexts: hrMemorySize.setDescription('The amount of physical main memory contained by the host.')
hrStorageTable = MibTable((1, 3, 6, 1, 2, 1, 25, 2, 3), )
if mibBuilder.loadTexts: hrStorageTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageTable.setDescription("The (conceptual) table of logical storage areas on the host. An entry shall be placed in the storage table for each logical area of storage that is allocated and has fixed resource limits. The amount of storage represented in an entity is the amount actually usable by the requesting entity, and excludes loss due to formatting or file system reference information. These entries are associated with logical storage areas, as might be seen by an application, rather than physical storage entities which are typically seen by an operating system. Storage such as tapes and floppies without file systems on them are typically not allocated in chunks by the operating system to requesting applications, and therefore shouldn't appear in this table. Examples of valid storage for this table include disk partitions, file systems, ram (for some architectures this is further segmented into regular memory, extended memory, and so on), backing store for virtual memory (`swap space'). This table is intended to be a useful diagnostic for `out of memory' and `out of buffers' types of failures. In addition, it can be a useful performance monitoring tool for tracking memory, disk, or buffer usage.")
hrStorageEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 2, 3, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrStorageIndex"))
if mibBuilder.loadTexts: hrStorageEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageEntry.setDescription('A (conceptual) entry for one logical storage area on the host. As an example, an instance of the hrStorageType object might be named hrStorageType.3')
hrStorageIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrStorageIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageIndex.setDescription('A unique value for each logical storage area contained by the host.')
hrStorageType = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 2), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageType.setDescription('The type of storage represented by this entry.')
hrStorageDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrStorageDescr.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageDescr.setDescription('A description of the type and instance of the storage described by this entry.')
hrStorageAllocationUnits = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrStorageAllocationUnits.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageAllocationUnits.setDescription('The size, in bytes, of the data objects allocated from this pool. If this entry is monitoring sectors, blocks, buffers, or packets, for example, this number will commonly be greater than one. Otherwise this number will typically be one.')
hrStorageSize = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hrStorageSize.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageSize.setDescription('The size of the storage represented by this entry, in units of hrStorageAllocationUnits.')
hrStorageUsed = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrStorageUsed.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageUsed.setDescription('The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits.')
hrStorageAllocationFailures = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrStorageAllocationFailures.setStatus('mandatory')
if mibBuilder.loadTexts: hrStorageAllocationFailures.setDescription('The number of requests for storage represented by this entry that could not be honored due to not enough storage. It should be noted that as this object has a SYNTAX of Counter, that it does not have a defined initial value. However, it is recommended that this object be initialized to zero.')
hrDeviceTypes = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1))
hrDeviceOther = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 1))
hrDeviceUnknown = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 2))
hrDeviceProcessor = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 3))
hrDeviceNetwork = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 4))
hrDevicePrinter = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 5))
hrDeviceDiskStorage = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 6))
hrDeviceVideo = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 10))
hrDeviceAudio = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 11))
hrDeviceCoprocessor = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 12))
hrDeviceKeyboard = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 13))
hrDeviceModem = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 14))
hrDeviceParallelPort = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 15))
hrDevicePointing = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 16))
hrDeviceSerialPort = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 17))
hrDeviceTape = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 18))
hrDeviceClock = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 19))
hrDeviceVolatileMemory = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 20))
hrDeviceNonVolatileMemory = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 21))
hrDeviceTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 2), )
if mibBuilder.loadTexts: hrDeviceTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceTable.setDescription('The (conceptual) table of devices contained by the host.')
hrDeviceEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 2, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrDeviceIndex"))
if mibBuilder.loadTexts: hrDeviceEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceEntry.setDescription('A (conceptual) entry for one device contained by the host. As an example, an instance of the hrDeviceType object might be named hrDeviceType.3')
hrDeviceIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDeviceIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceIndex.setDescription('A unique value for each device contained by the host. The value for each device must remain constant at least from one re-initialization of the agent to the next re-initialization.')
hrDeviceType = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 2), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDeviceType.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceType.setDescription("An indication of the type of device. If this value is `hrDeviceProcessor { hrDeviceTypes 3 }' then an entry exists in the hrProcessorTable which corresponds to this device. If this value is `hrDeviceNetwork { hrDeviceTypes 4 }', then an entry exists in the hrNetworkTable which corresponds to this device. If this value is `hrDevicePrinter { hrDeviceTypes 5 }', then an entry exists in the hrPrinterTable which corresponds to this device. If this value is `hrDeviceDiskStorage { hrDeviceTypes 6 }', then an entry exists in the hrDiskStorageTable which corresponds to this device.")
hrDeviceDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDeviceDescr.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceDescr.setDescription("A textual description of this device, including the device's manufacturer and revision, and optionally, its serial number.")
hrDeviceID = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 4), ProductID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDeviceID.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceID.setDescription('The product ID for this device.')
hrDeviceStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("running", 2), ("warning", 3), ("testing", 4), ("down", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDeviceStatus.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceStatus.setDescription("The current operational state of the device described by this row of the table. A value unknown(1) indicates that the current state of the device is unknown. running(2) indicates that the device is up and running and that no unusual error conditions are known. The warning(3) state indicates that agent has been informed of an unusual error condition by the operational software (e.g., a disk device driver) but that the device is still 'operational'. An example would be high number of soft errors on a disk. A value of testing(4), indicates that the device is not available for use because it is in the testing state. The state of down(5) is used only when the agent has been informed that the device is not available for any use.")
hrDeviceErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDeviceErrors.setStatus('mandatory')
if mibBuilder.loadTexts: hrDeviceErrors.setDescription('The number of errors detected on this device. It should be noted that as this object has a SYNTAX of Counter, that it does not have a defined initial value. However, it is recommended that this object be initialized to zero.')
hrProcessorTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 3), )
if mibBuilder.loadTexts: hrProcessorTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrProcessorTable.setDescription("The (conceptual) table of processors contained by the host. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDeviceProcessor'.")
hrProcessorEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 3, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrDeviceIndex"))
if mibBuilder.loadTexts: hrProcessorEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrProcessorEntry.setDescription('A (conceptual) entry for one processor contained by the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrProcessorEntry. As an example of how objects in this table are named, an instance of the hrProcessorFrwID object might be named hrProcessorFrwID.3')
hrProcessorFrwID = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 3, 1, 1), ProductID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrProcessorFrwID.setStatus('mandatory')
if mibBuilder.loadTexts: hrProcessorFrwID.setDescription('The product ID of the firmware associated with the processor.')
hrProcessorLoad = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrProcessorLoad.setStatus('mandatory')
if mibBuilder.loadTexts: hrProcessorLoad.setDescription('The average, over the last minute, of the percentage of time that this processor was not idle.')
hrNetworkTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 4), )
if mibBuilder.loadTexts: hrNetworkTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrNetworkTable.setDescription("The (conceptual) table of network devices contained by the host. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDeviceNetwork'.")
hrNetworkEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 4, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrDeviceIndex"))
if mibBuilder.loadTexts: hrNetworkEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrNetworkEntry.setDescription('A (conceptual) entry for one network device contained by the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrNetworkEntry. As an example of how objects in this table are named, an instance of the hrNetworkIfIndex object might be named hrNetworkIfIndex.3')
hrNetworkIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrNetworkIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrNetworkIfIndex.setDescription('The value of ifIndex which corresponds to this network device.')
hrPrinterTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 5), )
if mibBuilder.loadTexts: hrPrinterTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrPrinterTable.setDescription("The (conceptual) table of printers local to the host. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDevicePrinter'.")
hrPrinterEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 5, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrDeviceIndex"))
if mibBuilder.loadTexts: hrPrinterEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrPrinterEntry.setDescription('A (conceptual) entry for one printer local to the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrPrinterEntry. As an example of how objects in this table are named, an instance of the hrPrinterStatus object might be named hrPrinterStatus.3')
hrPrinterStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("idle", 3), ("printing", 4), ("warmup", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPrinterStatus.setStatus('mandatory')
if mibBuilder.loadTexts: hrPrinterStatus.setDescription('The current status of this printer device. When in the idle(1), printing(2), or warmup(3) state, the corresponding hrDeviceStatus should be running(2) or warning(3). When in the unknown state, the corresponding hrDeviceStatus should be unknown(1).')
hrPrinterDetectedErrorState = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 5, 1, 2), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPrinterDetectedErrorState.setStatus('mandatory')
if mibBuilder.loadTexts: hrPrinterDetectedErrorState.setDescription('This object represents any error conditions detected by the printer. The error conditions are encoded as bits in an octet string, with the following definitions: Condition Bit # hrDeviceStatus lowPaper 0 warning(3) noPaper 1 down(5) lowToner 2 warning(3) noToner 3 down(5) doorOpen 4 down(5) jammed 5 down(5) offline 6 down(5) serviceRequested 7 warning(3) If multiple conditions are currently detected and the hrDeviceStatus would not otherwise be unknown(1) or testing(4), the hrDeviceStatus shall correspond to the worst state of those indicated, where down(5) is worse than warning(3) which is worse than running(2). Bits are numbered starting with the most significant bit of the first byte being bit 0, the least significant bit of the first byte being bit 7, the most significant bit of the second byte being bit 8, and so on. A one bit encodes that the condition was detected, while a zero bit encodes that the condition was not detected. This object is useful for alerting an operator to specific warning or error conditions that may occur, especially those requiring human intervention.')
hrDiskStorageTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 6), )
if mibBuilder.loadTexts: hrDiskStorageTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrDiskStorageTable.setDescription("The (conceptual) table of long-term storage devices contained by the host. In particular, disk devices accessed remotely over a network are not included here. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDeviceDiskStorage'.")
hrDiskStorageEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 6, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrDeviceIndex"))
if mibBuilder.loadTexts: hrDiskStorageEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrDiskStorageEntry.setDescription('A (conceptual) entry for one long-term storage device contained by the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrDiskStorageEntry. As an example, an instance of the hrDiskStorageCapacity object might be named hrDiskStorageCapacity.3')
hrDiskStorageAccess = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("readWrite", 1), ("readOnly", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDiskStorageAccess.setStatus('mandatory')
if mibBuilder.loadTexts: hrDiskStorageAccess.setDescription('An indication if this long-term storage device is readable and writable or only readable. This should reflect the media type, any write-protect mechanism, and any device configuration that affects the entire device.')
hrDiskStorageMedia = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("hardDisk", 3), ("floppyDisk", 4), ("opticalDiskROM", 5), ("opticalDiskWORM", 6), ("opticalDiskRW", 7), ("ramDisk", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDiskStorageMedia.setStatus('mandatory')
if mibBuilder.loadTexts: hrDiskStorageMedia.setDescription('An indication of the type of media used in this long-term storage device.')
hrDiskStorageRemoveble = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 3), Boolean()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDiskStorageRemoveble.setStatus('mandatory')
if mibBuilder.loadTexts: hrDiskStorageRemoveble.setDescription('Denotes whether or not the disk media may be removed from the drive.')
hrDiskStorageCapacity = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 4), KBytes()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrDiskStorageCapacity.setStatus('mandatory')
if mibBuilder.loadTexts: hrDiskStorageCapacity.setDescription('The total size for this long-term storage device.')
hrPartitionTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 7), )
if mibBuilder.loadTexts: hrPartitionTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionTable.setDescription('The (conceptual) table of partitions for long-term storage devices contained by the host. In particular, partitions accessed remotely over a network are not included here.')
hrPartitionEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 7, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrDeviceIndex"), (0, "NETSERVER-MIB", "hrPartitionIndex"))
if mibBuilder.loadTexts: hrPartitionEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionEntry.setDescription('A (conceptual) entry for one partition. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrPartitionEntry. As an example of how objects in this table are named, an instance of the hrPartitionSize object might be named hrPartitionSize.3.1')
hrPartitionIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPartitionIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionIndex.setDescription('A unique value for each partition on this long- term storage device. The value for each long-term storage device must remain constant at least from one re-initialization of the agent to the next re- initialization.')
hrPartitionLabel = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 2), InternationalDisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPartitionLabel.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionLabel.setDescription('A textual description of this partition.')
hrPartitionID = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 3), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPartitionID.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionID.setDescription('A descriptor which uniquely represents this partition to the responsible operating system. On some systems, this might take on a binary representation.')
hrPartitionSize = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 4), KBytes()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPartitionSize.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionSize.setDescription('The size of this partition.')
hrPartitionFSIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrPartitionFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrPartitionFSIndex.setDescription('The index of the file system mounted on this partition. If no file system is mounted on this partition, then this value shall be zero. Note that multiple partitions may point to one file system, denoting that that file system resides on those partitions. Multiple file systems may not reside on one partition.')
hrFSTable = MibTable((1, 3, 6, 1, 2, 1, 25, 3, 8), )
if mibBuilder.loadTexts: hrFSTable.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSTable.setDescription("The (conceptual) table of file systems local to this host or remotely mounted from a file server. File systems that are in only one user's environment on a multi-user system will not be included in this table.")
hrFSEntry = MibTableRow((1, 3, 6, 1, 2, 1, 25, 3, 8, 1), ).setIndexNames((0, "NETSERVER-MIB", "hrFSIndex"))
if mibBuilder.loadTexts: hrFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSEntry.setDescription("A (conceptual) entry for one file system local to this host or remotely mounted from a file server. File systems that are in only one user's environment on a multi-user system will not be included in this table. As an example of how objects in this table are named, an instance of the hrFSMountPoint object might be named hrFSMountPoint.3")
hrFSTypes = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9))
hrFSOther = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 1))
hrFSUnknown = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 2))
hrFSBerkeleyFFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 3))
hrFSSys5FS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 4))
hrFSFat = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 5))
hrFSHPFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 6))
hrFSHFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 7))
hrFSMFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 8))
hrFSNTFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 9))
hrFSVNode = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 10))
hrFSJournaled = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 11))
hrFSiso9660 = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 12))
hrFSRockRidge = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 13))
hrFSNFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 14))
hrFSNetware = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 15))
hrFSAFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 16))
hrFSDFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 17))
hrFSAppleshare = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 18))
hrFSRFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 19))
hrFSDGCFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 20))
hrFSBFS = MibIdentifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 21))
hrFSIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSIndex.setDescription('A unique value for each file system local to this host. The value for each file system must remain constant at least from one re-initialization of the agent to the next re-initialization.')
hrFSMountPoint = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 2), InternationalDisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSMountPoint.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSMountPoint.setDescription('The path name of the root of this file system.')
hrFSRemoteMountPoint = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 3), InternationalDisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSRemoteMountPoint.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSRemoteMountPoint.setDescription('A description of the name and/or address of the server that this file system is mounted from. This may also include parameters such as the mount point on the remote file system. If this is not a remote file system, this string should have a length of zero.')
hrFSType = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 4), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSType.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSType.setDescription('The value of this object identifies the type of this file system.')
hrFSAccess = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("readWrite", 1), ("readOnly", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSAccess.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSAccess.setDescription('An indication if this file system is logically configured by the operating system to be readable and writable or only readable. This does not represent any local access-control policy, except one that is applied to the file system as a whole.')
hrFSBootable = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 6), Boolean()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSBootable.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSBootable.setDescription('A flag indicating whether this file system is bootable.')
hrFSStorageIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hrFSStorageIndex.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSStorageIndex.setDescription('The index of the hrStorageEntry that represents information about this file system. If there is no such information available, then this value shall be zero. The relevant storage entry will be useful in tracking the percent usage of this file system and diagnosing errors that may occur when it runs out of space.')
hrFSLastFullBackupDate = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 8), DateAndTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hrFSLastFullBackupDate.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSLastFullBackupDate.setDescription("The last date at which this complete file system was copied to another storage device for backup. This information is useful for ensuring that backups are being performed regularly. If this information is not known, then this variable shall have the value corresponding to January 1, year 0000, 00:00:00.0, which is encoded as (hex)'00 00 01 01 00 00 00 00'.")
hrFSLastPartialBackupDate = MibTableColumn((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 9), DateAndTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hrFSLastPartialBackupDate.setStatus('mandatory')
if mibBuilder.loadTexts: hrFSLastPartialBackupDate.setDescription("The last date at which a portion of this file system was copied to another storage device for backup. This information is useful for ensuring that backups are being performed regularly. If this information is not known, then this variable shall have the value corresponding to January 1, year 0000, 00:00:00.0, which is encoded as (hex)'00 00 01 01 00 00 00 00'.")
mibBuilder.exportSymbols("NETSERVER-MIB", fabAdptEntry=fabAdptEntry, diskStackUpdationTrap=diskStackUpdationTrap, trapLunDisappear=trapLunDisappear, npIndex=npIndex, npIfEntry=npIfEntry, BusType=BusType, trapFCAdptLinkUpMsg=trapFCAdptLinkUpMsg, fpDNLCHit=fpDNLCHit, fabLunMapEntry=fabLunMapEntry, hrFSTypes=hrFSTypes, npICMPOutMsgs=npICMPOutMsgs, ldDriveErrors=ldDriveErrors, fpDNLCConflict=fpDNLCConflict, npSMBRcvd=npSMBRcvd, hrDeviceNonVolatileMemory=hrDeviceNonVolatileMemory, fpLFSPurges=fpLFSPurges, npICMPInTimestampReps=npICMPInTimestampReps, hrStorageTable=hrStorageTable, hrFSIndex=hrFSIndex, fpPAGECachelistcnt=fpPAGECachelistcnt, npUDPEntry=npUDPEntry, netServer=netServer, hrPrinterEntry=hrPrinterEntry, fabAdptTable=fabAdptTable, RebuildFlag=RebuildFlag, ldMediaErrors=ldMediaErrors, fpHTFS=fpHTFS, fpLFSReaddirPluses=fpLFSReaddirPluses, npTCPActiveOpens=npTCPActiveOpens, fileSystemDegradationTrap=fileSystemDegradationTrap, fspBusyCount=fspBusyCount, npIPOutNoRoutes=npIPOutNoRoutes, hrFSDFS=hrFSDFS, fspTable=fspTable, npSMBCloses=npSMBCloses, fpLFSLinks=fpLFSLinks, hrFSVNode=hrFSVNode, fabIntLine=fabIntLine, npICMPOutTimestampReps=npICMPOutTimestampReps, npIfOutUcastPkts=npIfOutUcastPkts, fpPAGEDirtydlistcnt=fpPAGEDirtydlistcnt, fpPAGEWritehit=fpPAGEWritehit, trapFCAdptLinkUp=trapFCAdptLinkUp, npIPRoutingDiscards=npIPRoutingDiscards, fabTargetTable=fabTargetTable, fabLunMapIndex=fabLunMapIndex, npEntry=npEntry, fabTargetEntry=fabTargetEntry, hrPartitionTable=hrPartitionTable, npIfInErrors=npIfInErrors, npUDPNoPorts=npUDPNoPorts, fabLunNumber=fabLunNumber, axSP=axSP, ldWriteIO=ldWriteIO, fpLFSEntry=fpLFSEntry, fpPAGEZcbreak=fpPAGEZcbreak, npSMBWrites=npSMBWrites, npTCPRetransSegs=npTCPRetransSegs, npTable=npTable, axProductInfo=axProductInfo, npIPInDiscards=npIPInDiscards, axFP=axFP, trapFSDegradation=trapFSDegradation, hrStorageVirtualMemory=hrStorageVirtualMemory, hrFSAFS=hrFSAFS, fpInodeTable=fpInodeTable, fabLunMap=fabLunMap, fpLFSGetattrs=fpLFSGetattrs, fabRaid=fabRaid, fpDNLCHashsz=fpDNLCHashsz, npIfInDiscards=npIfInDiscards, npTCPCurrEstab=npTCPCurrEstab, fpLFSClears=fpLFSClears, fpBUFBufsize=fpBUFBufsize, hrStorageIndex=hrStorageIndex, hrFSUnknown=hrFSUnknown, fabTargetIndex=fabTargetIndex, npIPInUnknownProtos=npIPInUnknownProtos, KBytes=KBytes, fcLinkUpTrap=fcLinkUpTrap, fpLFSCreates=fpLFSCreates, hrStorageRam=hrStorageRam, fabSlotNum=fabSlotNum, npIPReasmReqds=npIPReasmReqds, npICMPOutEchos=npICMPOutEchos, ldSectorWrites=ldSectorWrites, hrDiskStorageRemoveble=hrDiskStorageRemoveble, DateAndTime=DateAndTime, Boolean=Boolean, fpFSEntry=fpFSEntry, npIdleCount=npIdleCount, hrPartitionLabel=hrPartitionLabel, npSMBTable=npSMBTable, hrSystem=hrSystem, hrDeviceProcessor=hrDeviceProcessor, fabLunType=fabLunType, hrNetworkIfIndex=hrNetworkIfIndex, fspEntry=fspEntry, hrPartitionIndex=hrPartitionIndex, ProductID=ProductID, trapFCLossOfLinkFailure=trapFCLossOfLinkFailure, npICMPTable=npICMPTable, hrFSBFS=hrFSBFS, fabLunEntry=fabLunEntry, npICMPOutAddrMasks=npICMPOutAddrMasks, trapDiskMsg=trapDiskMsg, hrMemorySize=hrMemorySize, hrFSAppleshare=hrFSAppleshare, hrPartitionID=hrPartitionID, axFSP=axFSP, hrFSNetware=hrFSNetware, fpGoneinodes=fpGoneinodes, fcCompleteLossTrap=fcCompleteLossTrap, hrFSMountPoint=hrFSMountPoint, fpHrFSIndex=fpHrFSIndex, hrStorageTypes=hrStorageTypes, hrStorageSize=hrStorageSize, npICMPOutAddrMaskReps=npICMPOutAddrMaskReps, fpLFSMkdirs=fpLFSMkdirs, npIPEntry=npIPEntry, InternationalDisplayString=InternationalDisplayString, hrDeviceVideo=hrDeviceVideo, npIPInReceives=npIPInReceives, fpPAGECachemiss=fpPAGECachemiss, fabDeviceId=fabDeviceId, fpDNLCSEntry=fpDNLCSEntry, npIfSpeed=npIfSpeed, npIPDefaultTTL=npIPDefaultTTL, npSMBBytesRcvd=npSMBBytesRcvd, fabTargetNumOfLuns=fabTargetNumOfLuns, hrSystemUptime=hrSystemUptime, U08Bits=U08Bits, npNFSDCounts=npNFSDCounts, auspex=auspex, fpLFSMounts=fpLFSMounts, hrFSiso9660=hrFSiso9660, fpPAGEOutscan=fpPAGEOutscan, npTCPRtoAlgorithm=npTCPRtoAlgorithm, npIfInUnknownProto=npIfInUnknownProto, npTCPTable=npTCPTable, fpPAGEFsflushscan=fpPAGEFsflushscan, fabTargetPortWWN=fabTargetPortWWN, fabAdptNumber=fabAdptNumber, fabLunMapWWN=fabLunMapWWN, hrFSDGCFS=hrFSDGCFS, trapFSFull=trapFSFull, hrDeviceOther=hrDeviceOther, hrDiskStorageTable=hrDiskStorageTable, hrDeviceTable=hrDeviceTable, fabTargetNumber=fabTargetNumber, fpLFSRenames=fpLFSRenames, fpINODEIgetcalls=fpINODEIgetcalls, npTCPRtoMin=npTCPRtoMin, ldReadIO=ldReadIO, fpBUFLwrites=fpBUFLwrites, fpLFSNull=fpLFSNull, fpTotalinodes=fpTotalinodes, hrProcessorLoad=hrProcessorLoad, npSMBErrors=npSMBErrors, fpPageStatTable=fpPageStatTable, npIfOutDiscards=npIfOutDiscards, fpBufferStatTable=fpBufferStatTable, hrProcessorEntry=hrProcessorEntry, npTCPMaxConn=npTCPMaxConn, hrStorageAllocationUnits=hrStorageAllocationUnits, npIfOutErrors=npIfOutErrors, hrStorageFixedDisk=hrStorageFixedDisk, hrFSTable=hrFSTable, npTCPOutRsts=npTCPOutRsts, hrStorageType=hrStorageType, trapFCAdptLinkFailure=trapFCAdptLinkFailure, npICMPOutSrcQuenchs=npICMPOutSrcQuenchs, fpPAGETotalmem=fpPAGETotalmem, trapFSFullMsg=trapFSFullMsg, hrDeviceType=hrDeviceType, trapLunSizeChangeMsg=trapLunSizeChangeMsg, hrPrinterTable=hrPrinterTable, hrDeviceParallelPort=hrDeviceParallelPort, hrStorageUsed=hrStorageUsed, axNP=axNP, lunDisappearTrap=lunDisappearTrap, spRaid=spRaid, hrSystemInitialLoadDevice=hrSystemInitialLoadDevice, npICMPInTimeExcds=npICMPInTimeExcds, fpSyncinodes=fpSyncinodes, fpPageEntry=fpPageEntry, npICMPInErrors=npICMPInErrors, fabWWN=fabWWN, hrPartitionFSIndex=hrPartitionFSIndex, fpPAGEFsflushputpage=fpPAGEFsflushputpage, hrProcessorFrwID=hrProcessorFrwID, ldTotalTime=ldTotalTime, npIfOutOctets=npIfOutOctets, fpLFSCkpntoffs=fpLFSCkpntoffs, fpPAGEOutcnt=fpPAGEOutcnt, fpPAGECachehit=fpPAGECachehit, npIfInOctets=npIfInOctets, fabLogDevTable=fabLogDevTable, hrDiskStorageCapacity=hrDiskStorageCapacity, fpLFSFsstats=fpLFSFsstats, fabLunAlias=fabLunAlias, trapFCAdptLinkUpTimeStamp=trapFCAdptLinkUpTimeStamp, npIfOperStatus=npIfOperStatus, fabNumOfTargets=fabNumOfTargets, fpLFSCkpntons=fpLFSCkpntons, fpFSIndex=fpFSIndex, fpLFSUMounts=fpLFSUMounts, fpLFSRemoves=fpLFSRemoves, RaidLevel=RaidLevel, VendorName=VendorName, hrFSOther=hrFSOther, fileSystemFullTrap=fileSystemFullTrap, npICMPOutParmProbs=npICMPOutParmProbs, hrFSRemoteMountPoint=hrFSRemoteMountPoint, hrDeviceClock=hrDeviceClock, hrFSEntry=hrFSEntry, npIPTable=npIPTable, trapLunDisappearTimeStamp=trapLunDisappearTimeStamp, hrFSAccess=hrFSAccess, npIfInUcastPkts=npIfInUcastPkts, fpLFSSymlinks=fpLFSSymlinks, hrFSNTFS=hrFSNTFS, hrFSType=hrFSType, fabType=fabType, ldIndex=ldIndex, npTCPInSegs=npTCPInSegs, npICMPInAddrMaskReps=npICMPInAddrMaskReps, fpPAGEOutputpage=fpPAGEOutputpage, axFab=axFab, npSMBEntry=npSMBEntry, hrFSNFS=hrFSNFS, hrFSHFS=hrFSHFS, hrFSLastFullBackupDate=hrFSLastFullBackupDate, npTCPAttemptFails=npTCPAttemptFails, npSMBBytesSent=npSMBBytesSent, fpBUFBcount=fpBUFBcount, fpLFSSetattrs=fpLFSSetattrs, hrFSMFS=hrFSMFS, npICMPInEchoReps=npICMPInEchoReps, hrStorageDescr=hrStorageDescr, npIPForwarding=npIPForwarding, npICMPInEchos=npICMPInEchos, hrDeviceErrors=hrDeviceErrors, npTCPPassiveOpens=npTCPPassiveOpens, fpFileSystemTable=fpFileSystemTable, hrDeviceDescr=hrDeviceDescr, fpFoundinodes=fpFoundinodes, hrDeviceUnknown=hrDeviceUnknown, hrProcessorTable=hrProcessorTable, npNFSDNJobs=npNFSDNJobs, fabRevisionId=fabRevisionId, hrFSBootable=hrFSBootable, trapFCAdptLinkFailureMsg=trapFCAdptLinkFailureMsg, hrDeviceNetwork=hrDeviceNetwork)
mibBuilder.exportSymbols("NETSERVER-MIB", hrDevicePointing=hrDevicePointing, fpPAGEFreelistcnt=fpPAGEFreelistcnt, axNumNPFSP=axNumNPFSP, npICMPOutTimestamps=npICMPOutTimestamps, npNFSTable=npNFSTable, npNFSDBusyCounts=npNFSDBusyCounts, hrDeviceTape=hrDeviceTape, hrDeviceTypes=hrDeviceTypes, hrDiskStorageEntry=hrDiskStorageEntry, npSMBOpens=npSMBOpens, hrStorageOther=hrStorageOther, hrPrinterDetectedErrorState=hrPrinterDetectedErrorState, fabLunTarNumber=fabLunTarNumber, npUDPOutDatagrams=npUDPOutDatagrams, fpLFSRmdirs=fpLFSRmdirs, fpBUFLreads=fpBUFLreads, fpCacheinodes=fpCacheinodes, fabIndex=fabIndex, npIPFragCreates=npIPFragCreates, fpBUFIOwaits=fpBUFIOwaits, npNFSEntry=npNFSEntry, lunSizeChangeTrap=lunSizeChangeTrap, fpBUFBreads=fpBUFBreads, fabTargetAliasName=fabTargetAliasName, hrPrinterStatus=hrPrinterStatus, hrDeviceVolatileMemory=hrDeviceVolatileMemory, hrFSFat=hrFSFat, fabLunTable=fabLunTable, npICMPInSrcQuenchs=npICMPInSrcQuenchs, npIPFragOKs=npIPFragOKs, fpLFSVersion=fpLFSVersion, trapDiskUpdation=trapDiskUpdation, hrStorageFloppyDisk=hrStorageFloppyDisk, fpLFSReleaseFs=fpLFSReleaseFs, trapFSDegradationTimeStamp=trapFSDegradationTimeStamp, fpLFSReaddirs=fpLFSReaddirs, fpBUFResid=fpBUFResid, fabLunMapTable=fabLunMapTable, hrStorageAllocationFailures=hrStorageAllocationFailures, npICMPOutErrors=npICMPOutErrors, hrFSRockRidge=hrFSRockRidge, fabLunMNumber=fabLunMNumber, fpLFSReads=fpLFSReads, fpLFSFsinfo=fpLFSFsinfo, fabVendorId=fabVendorId, npIfifIndex=npIfifIndex, hrSystemProcesses=hrSystemProcesses, fpLFSMknods=fpLFSMknods, fabTargetWWN=fabTargetWWN, hrDevicePrinter=hrDevicePrinter, hrStorageEntry=hrStorageEntry, npUDPInDatagrams=npUDPInDatagrams, npICMPOutTimeExcds=npICMPOutTimeExcds, ControllerType=ControllerType, npProtocols=npProtocols, U16Bits=U16Bits, hrDeviceEntry=hrDeviceEntry, npUDPInErrors=npUDPInErrors, fpLFSWrites=fpLFSWrites, npICMPOutEchoReps=npICMPOutEchoReps, fabLunIndex=fabLunIndex, fspIndex=fspIndex, npIfIndex=npIfIndex, trapFCAdptLinkFailureTimeStamp=trapFCAdptLinkFailureTimeStamp, npIfTable=npIfTable, npTCPEstabResets=npTCPEstabResets, npIPReasmTimeout=npIPReasmTimeout, hrSystemNumUsers=hrSystemNumUsers, hrSystemMaxProcesses=hrSystemMaxProcesses, trapFCLossOfLinkFailureMsg=trapFCLossOfLinkFailureMsg, hrFSStorageIndex=hrFSStorageIndex, hrDiskStorageAccess=hrDiskStorageAccess, hrDeviceStatus=hrDeviceStatus, hrDiskStorageMedia=hrDiskStorageMedia, fpLFSLookups=fpLFSLookups, hrPartitionEntry=hrPartitionEntry, hrFSLastPartialBackupDate=hrFSLastPartialBackupDate, fpBufferEntry=fpBufferEntry, axTrapData=axTrapData, npICMPOutRedirects=npICMPOutRedirects, hrFSSys5FS=hrFSSys5FS, hrDeviceDiskStorage=hrDeviceDiskStorage, hrSystemDate=hrSystemDate, hrStorage=hrStorage, npUDPTable=npUDPTable, npICMPInMsgs=npICMPInMsgs, ldWBufReads=ldWBufReads, trapFCLossOfLinkFailureTimeStamp=trapFCLossOfLinkFailureTimeStamp, trapLunDisappearMsg=trapLunDisappearMsg, npIfType=npIfType, trapDiskTimeStamp=trapDiskTimeStamp, fpLFSIsolationStates=fpLFSIsolationStates, fabTargetAdapterNum=fabTargetAdapterNum, fabLunWWN=fabLunWWN, fpDNLCMiss=fpDNLCMiss, fspIdleCount=fspIdleCount, npICMPInAddrMasks=npICMPInAddrMasks, hrDeviceModem=hrDeviceModem, fpDNLCPurgevp=fpDNLCPurgevp, fpBUFBwrites=fpBUFBwrites, hrFSJournaled=hrFSJournaled, hrStorageCompactDisc=hrStorageCompactDisc, fpLFSDiagnostics=fpLFSDiagnostics, npICMPEntry=npICMPEntry, trapFSFullTimeStamp=trapFSFullTimeStamp, hrSystemInitialLoadParameters=hrSystemInitialLoadParameters, hrDevice=hrDevice, hrDeviceSerialPort=hrDeviceSerialPort, npICMPInParmProbs=npICMPInParmProbs, hrFSBerkeleyFFS=hrFSBerkeleyFFS, trapLunSizeChange=trapLunSizeChange, npIPReasmFails=npIPReasmFails, fabLunSize=fabLunSize, host=host, fpDNLCTStatTable=fpDNLCTStatTable, fpPAGEDirtyflistcnt=fpPAGEDirtyflistcnt, npIPReasmOKs=npIPReasmOKs, npICMPInRedirects=npICMPInRedirects, fpFreeinodes=fpFreeinodes, fpDNLCPurgevfsp=fpDNLCPurgevfsp, fabLunLabel=fabLunLabel, hrDeviceID=hrDeviceID, hrDeviceIndex=hrDeviceIndex, npTCPRtoMax=npTCPRtoMax, hrPartitionSize=hrPartitionSize, npIPInHdrErrors=npIPInHdrErrors, npICMPInTimestamps=npICMPInTimestamps, fabIntPin=fabIntPin, npTCPInErrs=npTCPInErrs, hrFSHPFS=hrFSHPFS, fpLFSIsolateFs=fpLFSIsolateFs, fpDNLCEnter=fpDNLCEnter, npTCPOutSegs=npTCPOutSegs, fabTargetType=fabTargetType, fpPAGEZcref=fpPAGEZcref, hrFSRFS=hrFSRFS, fpPAGEWritemiss=fpPAGEWritemiss, npIPOutRequests=npIPOutRequests, npIfAdminStatus=npIfAdminStatus, fpLFSTable=fpLFSTable, ldSectorReads=ldSectorReads, hrStorageRamDisk=hrStorageRamDisk, npIfOutQLen=npIfOutQLen, hrStorageRemovableDisk=hrStorageRemovableDisk, fpInodeEntry=fpInodeEntry, axProductName=axProductName, fcLinkFailureTrap=fcLinkFailureTrap, fabPCIBusNum=fabPCIBusNum, npSMBLocksHeld=npSMBLocksHeld, trapLunSizeChangeTimeStamp=trapLunSizeChangeTimeStamp, npIPInAddrErrors=npIPInAddrErrors, hrNetworkTable=hrNetworkTable, npIPOutDiscards=npIPOutDiscards, hrDeviceAudio=hrDeviceAudio, npSMBReads=npSMBReads, axSWVersion=axSWVersion, fabLunAdptNumber=fabLunAdptNumber, trapFSDegradationMsg=trapFSDegradationMsg, npIPFragFails=npIPFragFails, fabLogDevEntry=fabLogDevEntry, npIfOutNUcastPkts=npIfOutNUcastPkts, npIfInNUcastPkts=npIfInNUcastPkts, hrNetworkEntry=hrNetworkEntry, hrDeviceCoprocessor=hrDeviceCoprocessor, fpLFSReadlinks=fpLFSReadlinks, npIfOutCollisions=npIfOutCollisions, npIPForwDatagrams=npIPForwDatagrams, npICMPInDestUnreachs=npICMPInDestUnreachs, hrDeviceKeyboard=hrDeviceKeyboard, npBusyCount=npBusyCount, npIPInDelivers=npIPInDelivers, npICMPOutDestUnreachs=npICMPOutDestUnreachs, npTCPEntry=npTCPEntry)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(integer32, mib_2, bits, counter64, notification_type, notification_type, enterprises, object_identity, counter32, module_identity, time_ticks, ip_address, mib_identifier, iso, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'mib-2', 'Bits', 'Counter64', 'NotificationType', 'NotificationType', 'enterprises', 'ObjectIdentity', 'Counter32', 'ModuleIdentity', 'TimeTicks', 'IpAddress', 'MibIdentifier', 'iso', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
auspex = mib_identifier((1, 3, 6, 1, 4, 1, 80))
net_server = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3))
ax_product_info = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 1))
ax_np = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 2))
ax_fsp = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3))
ax_trap_data = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4))
ax_fp = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 2))
fp_htfs = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3))
ax_sp = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 3))
sp_raid = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 3, 2))
np_protocols = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 2, 3))
ax_fab = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 4))
fab_raid = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5))
ax_product_name = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 1, 1), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
axProductName.setStatus('mandatory')
if mibBuilder.loadTexts:
axProductName.setDescription('Name of the file server product.')
ax_sw_version = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 1, 2), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
axSWVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
axSWVersion.setDescription('Version of the M16 Kernel on Netserver')
ax_num_npfsp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
axNumNPFSP.setStatus('mandatory')
if mibBuilder.loadTexts:
axNumNPFSP.setDescription('Number of NPFSP boards on file server.')
np_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 1))
if mibBuilder.loadTexts:
npTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npTable.setDescription('A table for all NPs(Network Processors) on the file server.')
np_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npEntry.setDescription('An entry for each NP on the file server.')
np_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
npIndex.setDescription('A unique number for identifying an NP in the system.')
np_busy_count = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npBusyCount.setStatus('mandatory')
if mibBuilder.loadTexts:
npBusyCount.setDescription('Busy counts of NP.')
np_idle_count = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIdleCount.setStatus('mandatory')
if mibBuilder.loadTexts:
npIdleCount.setDescription('Idle counts of NP.')
np_if_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 2))
if mibBuilder.loadTexts:
npIfTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfTable.setDescription('Table containing information for each interface of NP. It maps the interface with the NP')
np_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'), (0, 'NETSERVER-MIB', 'npIfIndex'))
if mibBuilder.loadTexts:
npIfEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfEntry.setDescription('Entry for each interface')
np_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfIndex.setDescription('A unique number for an interface for a given NP')
np_ifif_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfifIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfifIndex.setDescription('Corresponding ifINdex in ifTable of mib-2')
np_if_type = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfType.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfType.setDescription('Type of network interface ')
np_if_speed = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfSpeed.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfSpeed.setDescription('Nominal Interface Speed (in millions of bits per second)')
np_if_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfInOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfInOctets.setDescription('The total number of octets received on the interface, including framing characters')
np_if_in_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfInUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfInUcastPkts.setDescription('The number of subnetwork-unicast packets delivered to a higher-layer protocol')
np_if_in_n_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfInNUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfInNUcastPkts.setDescription('The number of non-unicast (i.e., subnetwork-broadcast or multicast) packets delivered to a higher-layer protocol')
np_if_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfInDiscards.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfInDiscards.setDescription('The inbound packet discard count even though no errors were detected. One reason for discarding could be to free up buffer space')
np_if_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfInErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfInErrors.setDescription('The input-packet error count for an interface for a given NP')
np_if_in_unknown_proto = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfInUnknownProto.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfInUnknownProto.setDescription('The input-packet discard count due to an unknown or unsupported protocol')
np_if_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutOctets.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutOctets.setDescription('The total number of octets transmitted out of the interface, including framing characters')
np_if_out_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutUcastPkts.setDescription('The total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent')
np_if_out_n_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutNUcastPkts.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutNUcastPkts.setDescription('The total number of packets that higher-level protocols requested be transmitted to a non-unicast (i.e., a subnetwork-broadcast or multicast) address, including those that were discarded or not sent')
np_if_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutDiscards.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutDiscards.setDescription('The number of outbound packets that were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possibel reason for discarding such a packet could be to free up buffer space')
np_if_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutErrors.setDescription('The number of outbound packets that could not be transmitted because of errors')
np_if_out_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutCollisions.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutCollisions.setDescription('The output-packet collision count for an interface for a given NP')
np_if_out_q_len = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 17), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOutQLen.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOutQLen.setDescription('The output-packet queue length (in packets) for an interface for a given NP')
np_if_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
npIfAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfAdminStatus.setDescription('The desired state of the interface. The testing(3) state indicates that no operational packets can be passed.')
np_if_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 2, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIfOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
npIfOperStatus.setDescription('The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed.')
np_ip_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1))
if mibBuilder.loadTexts:
npIPTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPTable.setDescription('Table for Internet Protocol statistics for each NP of the system.')
np_ip_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npIPEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPEntry.setDescription('An entry for each NP in the system.')
np_ip_forwarding = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('forwarding', 1), ('not-forwarding', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPForwarding.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPForwarding.setDescription('It has two values : forwarding(1) -- acting as gateway notforwarding(2) -- NOT acting as gateway')
np_ip_default_ttl = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPDefaultTTL.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPDefaultTTL.setDescription('NP IP default Time To Live.')
np_ip_in_receives = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPInReceives.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPInReceives.setDescription('NP IP received packet count.')
np_ip_in_hdr_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPInHdrErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPInHdrErrors.setDescription('NP IP header error count.')
np_ip_in_addr_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPInAddrErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPInAddrErrors.setDescription('NP IP address error count.')
np_ip_forw_datagrams = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPForwDatagrams.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPForwDatagrams.setDescription('NP IP forwarded datagram count.')
np_ip_in_unknown_protos = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPInUnknownProtos.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPInUnknownProtos.setDescription('NP IP input packet with unknown protocol.')
np_ip_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPInDiscards.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPInDiscards.setDescription('NP IP discarded input packet count.')
np_ip_in_delivers = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPInDelivers.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPInDelivers.setDescription('NP IP delivered input packet count.')
np_ip_out_requests = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPOutRequests.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPOutRequests.setDescription('NP IP tx packet count.')
np_ip_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPOutDiscards.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPOutDiscards.setDescription('NP IP discarded out packet count.')
np_ip_out_no_routes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPOutNoRoutes.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPOutNoRoutes.setDescription('NP IP tx fails due to no route count.')
np_ip_reasm_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPReasmTimeout.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPReasmTimeout.setDescription('NP IP reassembly time out count.')
np_ip_reasm_reqds = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPReasmReqds.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPReasmReqds.setDescription('NP IP reassembly required count.')
np_ip_reasm_o_ks = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPReasmOKs.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPReasmOKs.setDescription('NP IP reassembly success count.')
np_ip_reasm_fails = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPReasmFails.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPReasmFails.setDescription('NP IP reassembly failure count.')
np_ip_frag_o_ks = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPFragOKs.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPFragOKs.setDescription('NP IP fragmentation success count.')
np_ip_frag_fails = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPFragFails.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPFragFails.setDescription('NP IP fragmentation failure count.')
np_ip_frag_creates = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPFragCreates.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPFragCreates.setDescription('NP IP fragment created count.')
np_ip_routing_discards = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 1, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npIPRoutingDiscards.setStatus('mandatory')
if mibBuilder.loadTexts:
npIPRoutingDiscards.setDescription('NP IP discarded route count.')
np_icmp_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2))
if mibBuilder.loadTexts:
npICMPTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPTable.setDescription('Table for Internet Control Message Protocol statistics for each NP of the system.')
np_icmp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npICMPEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPEntry.setDescription('An entry for each NP in the system.')
np_icmp_in_msgs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInMsgs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInMsgs.setDescription('NP ICMP input message count.')
np_icmp_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInErrors.setDescription('NP ICMP input error packet count.')
np_icmp_in_dest_unreachs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInDestUnreachs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInDestUnreachs.setDescription('NP ICMP input destination unreachable count.')
np_icmp_in_time_excds = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInTimeExcds.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInTimeExcds.setDescription('NP ICMP input time exceeded count.')
np_icmp_in_parm_probs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInParmProbs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInParmProbs.setDescription('NP ICMP input parameter problem packet count.')
np_icmp_in_src_quenchs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInSrcQuenchs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInSrcQuenchs.setDescription('NP ICMP input source quench packet count.')
np_icmp_in_redirects = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInRedirects.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInRedirects.setDescription('NP ICMP input redirect packet count.')
np_icmp_in_echos = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInEchos.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInEchos.setDescription('NP ICMP input echo count.')
np_icmp_in_echo_reps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInEchoReps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInEchoReps.setDescription('NP ICMP input echo reply count.')
np_icmp_in_timestamps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInTimestamps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInTimestamps.setDescription('NP ICMP input timestamp count.')
np_icmp_in_timestamp_reps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInTimestampReps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInTimestampReps.setDescription('NP ICMP input timestamp reply count.')
np_icmp_in_addr_masks = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInAddrMasks.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInAddrMasks.setDescription('NP ICMP input address mask count.')
np_icmp_in_addr_mask_reps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPInAddrMaskReps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPInAddrMaskReps.setDescription('NP ICMP input address mask reply count.')
np_icmp_out_msgs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutMsgs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutMsgs.setDescription('NP ICMP output message count.')
np_icmp_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutErrors.setDescription('NP ICMP output error packet count.')
np_icmp_out_dest_unreachs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutDestUnreachs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutDestUnreachs.setDescription('NP ICMP output destination unreachable count.')
np_icmp_out_time_excds = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutTimeExcds.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutTimeExcds.setDescription('NP ICMP output time exceeded count.')
np_icmp_out_parm_probs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutParmProbs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutParmProbs.setDescription('NP ICMP output parameter problem packet count.')
np_icmp_out_src_quenchs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutSrcQuenchs.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutSrcQuenchs.setDescription('NP ICMP output source quench packet count.')
np_icmp_out_redirects = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutRedirects.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutRedirects.setDescription('NP ICMP output redirect packet count.')
np_icmp_out_echos = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutEchos.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutEchos.setDescription('NP ICMP output echo count.')
np_icmp_out_echo_reps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutEchoReps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutEchoReps.setDescription('NP ICMP output echo reply count.')
np_icmp_out_timestamps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutTimestamps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutTimestamps.setDescription('NP ICMP output timestamp count.')
np_icmp_out_timestamp_reps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutTimestampReps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutTimestampReps.setDescription('NP ICMP output timestamp reply count.')
np_icmp_out_addr_masks = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutAddrMasks.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutAddrMasks.setDescription('NP ICMP output address mask count.')
np_icmp_out_addr_mask_reps = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 2, 1, 26), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npICMPOutAddrMaskReps.setStatus('mandatory')
if mibBuilder.loadTexts:
npICMPOutAddrMaskReps.setDescription('NP ICMP output address mask reply count.')
np_tcp_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3))
if mibBuilder.loadTexts:
npTCPTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPTable.setDescription('Table for Transmission Control Protocol statistics for each NP of the system.')
np_tcp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npTCPEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPEntry.setDescription('An entry for each NP in the system.')
np_tcp_rto_algorithm = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('constant', 2), ('rsre', 3), ('vanj', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPRtoAlgorithm.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPRtoAlgorithm.setDescription('NP TCP Round Trip Algorithm type.')
np_tcp_rto_min = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPRtoMin.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPRtoMin.setDescription('NP TCP minimum RTO.')
np_tcp_rto_max = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPRtoMax.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPRtoMax.setDescription('NP TCP maximum RTO.')
np_tcp_max_conn = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPMaxConn.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPMaxConn.setDescription('NP TCP maximum number of connections.')
np_tcp_active_opens = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPActiveOpens.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPActiveOpens.setDescription('NP TCP active open count.')
np_tcp_passive_opens = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPPassiveOpens.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPPassiveOpens.setDescription('NP TCP passive open count.')
np_tcp_attempt_fails = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPAttemptFails.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPAttemptFails.setDescription('NP TCP connect attempt fails.')
np_tcp_estab_resets = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPEstabResets.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPEstabResets.setDescription('NP TCP reset of established session.')
np_tcp_curr_estab = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPCurrEstab.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPCurrEstab.setDescription('NP TCP current established session count.')
np_tcp_in_segs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPInSegs.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPInSegs.setDescription('NP TCP input segments count.')
np_tcp_out_segs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPOutSegs.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPOutSegs.setDescription('NP TCP output segments count.')
np_tcp_retrans_segs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPRetransSegs.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPRetransSegs.setDescription('NP TCP retransmitted segments count.')
np_tcp_in_errs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPInErrs.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPInErrs.setDescription('NP TCP input error packets count.')
np_tcp_out_rsts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 3, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npTCPOutRsts.setStatus('mandatory')
if mibBuilder.loadTexts:
npTCPOutRsts.setDescription('NP TCP output reset packets count.')
np_udp_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4))
if mibBuilder.loadTexts:
npUDPTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npUDPTable.setDescription('Table for User Datagram Protocol statistics for each NP of the system.')
np_udp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npUDPEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npUDPEntry.setDescription('An entry for each NP in the system.')
np_udp_in_datagrams = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npUDPInDatagrams.setStatus('mandatory')
if mibBuilder.loadTexts:
npUDPInDatagrams.setDescription('NP UDP input datagram count.')
np_udp_no_ports = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npUDPNoPorts.setStatus('mandatory')
if mibBuilder.loadTexts:
npUDPNoPorts.setDescription('NP UDP number of ports.')
np_udp_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npUDPInErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npUDPInErrors.setDescription('NP UDP input error count.')
np_udp_out_datagrams = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 4, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npUDPOutDatagrams.setStatus('mandatory')
if mibBuilder.loadTexts:
npUDPOutDatagrams.setDescription('Np UDP output datagram count.')
np_nfs_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5))
if mibBuilder.loadTexts:
npNFSTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npNFSTable.setDescription('Table for Network File System statistics for each NP in the system.')
np_nfs_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npNFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npNFSEntry.setDescription('An entry for each NP in the system.')
np_nfsd_counts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npNFSDCounts.setStatus('mandatory')
if mibBuilder.loadTexts:
npNFSDCounts.setDescription('NP NFS count (obtained from NFS daemon)')
np_nfsdn_jobs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npNFSDNJobs.setStatus('mandatory')
if mibBuilder.loadTexts:
npNFSDNJobs.setDescription('NP NFS number of jobs (obtained from NFS daemon)')
np_nfsd_busy_counts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 5, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npNFSDBusyCounts.setStatus('mandatory')
if mibBuilder.loadTexts:
npNFSDBusyCounts.setDescription('NP NFS busy count (obtained from NFS daemon)')
np_smb_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6))
if mibBuilder.loadTexts:
npSMBTable.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBTable.setDescription('Contains statistical counts for the SMB protocol per NP')
np_smb_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1)).setIndexNames((0, 'NETSERVER-MIB', 'npIndex'))
if mibBuilder.loadTexts:
npSMBEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBEntry.setDescription('An entry for each NP in the system.')
np_smb_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBRcvd.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBRcvd.setDescription('The total number of SMB netbios messages received.')
np_smb_bytes_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBBytesRcvd.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBBytesRcvd.setDescription('The total number of SMB related bytes rvcd by this NP from a client (does not include netbios header bytes).')
np_smb_bytes_sent = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBBytesSent.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBBytesSent.setDescription('The total SMB related bytes sent by this NP to a client (does not include netbios header bytes).')
np_smb_reads = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBReads.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBReads.setDescription('The total number of SMB reads consisting of the following opcodes: SMB-COM-READ, SMB-COM-LOCK-AND-READ, SMB-COM-READ-RAW, SMB-COM-READ-MPX, SMB-COM-READ-MPX-SECONDARY and SMB-COM-READ-ANDX.')
np_smb_writes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBWrites.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBWrites.setDescription('The total number of SMB writes consisting of the following opcodes: SMB-COM-WRITE, SMB-COM-WRITE-AND-UNLOCK, SMB-COM-WRITE-RAW, SMB-COM-WRITE-MPX, SMB-COM-WRITE-COMPLETE, SMB-COM-WRITE-ANDX and SMB-COM-WRITE-AND-CLOSE.')
np_smb_opens = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBOpens.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBOpens.setDescription('The total number of SMB opens consisting of the SMB-COM-OPEN, SMB-COM-CREATE,SMB-COM-CREATE-TEMPORARY,SMB-COM-CREATE-NEW, TRANS2-OPEN2, NT-TRANSACT-CREATE and SMB-COM-OPEN-ANDX opcodes received.')
np_smb_closes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBCloses.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBCloses.setDescription('The total number of SMB SMB-COM-CLOSE opcodes recieved.')
np_smb_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBErrors.setDescription('The total number of invalid netbios messages recieved.')
np_smb_locks_held = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 2, 3, 6, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
npSMBLocksHeld.setStatus('mandatory')
if mibBuilder.loadTexts:
npSMBLocksHeld.setDescription('The total number of locks currently held')
fsp_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 1))
if mibBuilder.loadTexts:
fspTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fspTable.setDescription('A table for all FSPs(File and Storage Processors) on the file server.')
fsp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'))
if mibBuilder.loadTexts:
fspEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fspEntry.setDescription('An entry for one FSP on the file server.')
fsp_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fspIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fspIndex.setDescription('A unique number for identifying an FSP in the system.')
fsp_busy_count = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fspBusyCount.setStatus('mandatory')
if mibBuilder.loadTexts:
fspBusyCount.setDescription('Busy counts of FSP.')
fsp_idle_count = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fspIdleCount.setStatus('mandatory')
if mibBuilder.loadTexts:
fspIdleCount.setDescription('Idle counts of FSP.')
fp_lfs_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1))
if mibBuilder.loadTexts:
fpLFSTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSTable.setDescription('Table for FP File System Services Statistics for each FSP on the system.')
fp_lfs_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'))
if mibBuilder.loadTexts:
fpLFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSEntry.setDescription('An entry for each FSP in the system.')
fp_lfs_version = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSVersion.setDescription('FP file system services statistics version.')
fp_lfs_mounts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSMounts.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSMounts.setDescription('FP file system services - FC-MOUNT - Counter.')
fp_lfsu_mounts = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSUMounts.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSUMounts.setDescription('FP file system services - FC-UMOUNT - Counter.')
fp_lfs_reads = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSReads.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSReads.setDescription('FP file system services - FC-READ - Counter.')
fp_lfs_writes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSWrites.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSWrites.setDescription('FP file system services - FC-WRITE - Counter.')
fp_lfs_readdirs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSReaddirs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSReaddirs.setDescription('FP file system services - FC-READDIR - Counter.')
fp_lfs_readlinks = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSReadlinks.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSReadlinks.setDescription('FP file system services - FC-READLINK - Counter.')
fp_lfs_mkdirs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSMkdirs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSMkdirs.setDescription('FP file system services - FC-MKDIR - Counter.')
fp_lfs_mknods = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSMknods.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSMknods.setDescription('FP file system services - FC-MKNOD - Counter.')
fp_lfs_readdir_pluses = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSReaddirPluses.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSReaddirPluses.setDescription('FP file system services - FC-READDIR-PLUS - Counter.')
fp_lfs_fsstats = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSFsstats.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSFsstats.setDescription('FP file system services - FC-FSSTAT - Counter.')
fp_lfs_null = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSNull.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSNull.setDescription('FP file system services - FC-NULL - Counter.')
fp_lfs_fsinfo = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSFsinfo.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSFsinfo.setDescription('FP file system services - FC-FSINFO - Counter.')
fp_lfs_getattrs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSGetattrs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSGetattrs.setDescription('FP file system services - FC-GETATTR - Counter.')
fp_lfs_setattrs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSSetattrs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSSetattrs.setDescription('FP file system services - FC-SETATTR - Counter.')
fp_lfs_lookups = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSLookups.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSLookups.setDescription('FP file system services - FC-LOOKUP - Counter.')
fp_lfs_creates = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSCreates.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSCreates.setDescription('FP file system services - FC-CREATE - Counter.')
fp_lfs_removes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSRemoves.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSRemoves.setDescription('FP file system services - FC-REMOVE - Counter.')
fp_lfs_renames = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSRenames.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSRenames.setDescription('FP file system services - FC-RENAME - Counter.')
fp_lfs_links = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSLinks.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSLinks.setDescription('FP file system services - FC-LINK - Counter.')
fp_lfs_symlinks = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSSymlinks.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSSymlinks.setDescription('FP file system services - FC-SYMLINK - Counter.')
fp_lfs_rmdirs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSRmdirs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSRmdirs.setDescription('FP file system services - FC-RMDIR - Counter.')
fp_lfs_ckpntons = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSCkpntons.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSCkpntons.setDescription('FP file system services - FC-CKPNTON - Counter.')
fp_lfs_ckpntoffs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSCkpntoffs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSCkpntoffs.setDescription('FP file system services - FC-CKPNTOFFS - Counter.')
fp_lfs_clears = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSClears.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSClears.setDescription('FP file system services - FC-CLEAR - Counter.')
fp_lfs_isolate_fs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 26), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSIsolateFs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSIsolateFs.setDescription('FP file system services - FC-ISOLATE-FS - Counter.')
fp_lfs_release_fs = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 27), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSReleaseFs.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSReleaseFs.setDescription('FP file system services - FC-RELEASE-FS - Counter.')
fp_lfs_isolation_states = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 28), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSIsolationStates.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSIsolationStates.setDescription('FP file system services - FC-ISOLATION-STATE - Counter.')
fp_lfs_diagnostics = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 29), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSDiagnostics.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSDiagnostics.setDescription('FP file system services - FC-DIAGNOSTIC - Counter.')
fp_lfs_purges = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 1, 1, 30), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpLFSPurges.setStatus('mandatory')
if mibBuilder.loadTexts:
fpLFSPurges.setDescription('FP file system services - FC-PURGE - Counter.')
fp_file_system_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2))
if mibBuilder.loadTexts:
fpFileSystemTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fpFileSystemTable.setDescription('Table containg File systems on each FSP')
fp_fs_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'), (0, 'NETSERVER-MIB', 'fpFSIndex'))
if mibBuilder.loadTexts:
fpFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fpFSEntry.setDescription('Entry for each File System')
fp_fs_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fpFSIndex.setDescription('Uniquely identifies each FS on FSP')
fp_hr_fs_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpHrFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fpHrFSIndex.setDescription('Index of the corresponding FS entry in host resource mib')
fp_dnlct_stat_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1))
if mibBuilder.loadTexts:
fpDNLCTStatTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCTStatTable.setDescription('DNLC is part of StackOS module. This table displays DNLC Statistics.')
fp_dnlcs_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'))
if mibBuilder.loadTexts:
fpDNLCSEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCSEntry.setDescription('Each entry for a FSP board.')
fp_dnlc_hit = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCHit.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCHit.setDescription('DNLC hit on a given FSP.')
fp_dnlc_miss = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCMiss.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCMiss.setDescription('DNLC miss on a given FSP.')
fp_dnlc_enter = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCEnter.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCEnter.setDescription('Number of DNLC entries made (total).')
fp_dnlc_conflict = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCConflict.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCConflict.setDescription('Times entry found in DNLC on dnlc-enter.')
fp_dnlc_purgevfsp = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCPurgevfsp.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCPurgevfsp.setDescription('Entries purged based on vfsp.')
fp_dnlc_purgevp = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCPurgevp.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCPurgevp.setDescription('Entries purge based on vp.')
fp_dnlc_hashsz = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpDNLCHashsz.setStatus('mandatory')
if mibBuilder.loadTexts:
fpDNLCHashsz.setDescription('Number of hash buckets in dnlc hash table.')
fp_page_stat_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2))
if mibBuilder.loadTexts:
fpPageStatTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPageStatTable.setDescription('Page is part of StackOS module. This table gives the Page Statistics for all FSPs.')
fp_page_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'))
if mibBuilder.loadTexts:
fpPageEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPageEntry.setDescription('Each Entry in the table displays Page Statistics for a FSP.')
fp_page_totalmem = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGETotalmem.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGETotalmem.setDescription('Allocated memory for pages.')
fp_page_freelistcnt = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEFreelistcnt.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEFreelistcnt.setDescription('Pages on freelist.')
fp_page_cachelistcnt = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGECachelistcnt.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGECachelistcnt.setDescription('Pages on cachelist.')
fp_page_dirtyflistcnt = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEDirtyflistcnt.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEDirtyflistcnt.setDescription('Pages on dirtyflist.')
fp_page_dirtydlistcnt = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEDirtydlistcnt.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEDirtydlistcnt.setDescription('Pages on dirtydlist')
fp_page_cachehit = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGECachehit.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGECachehit.setDescription('Page cache hit.')
fp_page_cachemiss = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGECachemiss.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGECachemiss.setDescription('Page cache miss.')
fp_page_writehit = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEWritehit.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEWritehit.setDescription('Page cache write hit.')
fp_page_writemiss = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEWritemiss.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEWritemiss.setDescription('Page cache write miss.')
fp_page_zcref = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEZcref.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEZcref.setDescription('Page Zref.')
fp_page_zcbreak = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEZcbreak.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEZcbreak.setDescription('Page Zbreak.')
fp_page_outscan = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEOutscan.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEOutscan.setDescription('Page out scan.')
fp_page_outputpage = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEOutputpage.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEOutputpage.setDescription('Output Page.')
fp_page_fsflushscan = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEFsflushscan.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEFsflushscan.setDescription('Flush scan.')
fp_page_fsflushputpage = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEFsflushputpage.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEFsflushputpage.setDescription('Flush output page.')
fp_page_outcnt = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 2, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpPAGEOutcnt.setStatus('mandatory')
if mibBuilder.loadTexts:
fpPAGEOutcnt.setDescription('Page out count.')
fp_buffer_stat_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3))
if mibBuilder.loadTexts:
fpBufferStatTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBufferStatTable.setDescription('BufferIO is one of the modules present in StackOS. This table displays the bufferIO statistics for all FSPs.')
fp_buffer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'))
if mibBuilder.loadTexts:
fpBufferEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBufferEntry.setDescription('Each entry in the table for a single FSP.')
fp_buf_lreads = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFLreads.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFLreads.setDescription('Number of buffered reads.')
fp_buf_breads = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFBreads.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFBreads.setDescription('Number of breads doing sp-read.')
fp_buf_lwrites = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFLwrites.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFLwrites.setDescription('Number of buffered writes (incl. delayed).')
fp_buf_bwrites = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFBwrites.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFBwrites.setDescription('Number of bwrites doing sp-write.')
fp_bufi_owaits = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFIOwaits.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFIOwaits.setDescription('Number of processes blocked in biowait.')
fp_buf_resid = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFResid.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFResid.setDescription('Running total of unused buf memory.')
fp_buf_bufsize = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFBufsize.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFBufsize.setDescription('Running total of memory on free list.')
fp_buf_bcount = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 3, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpBUFBcount.setStatus('mandatory')
if mibBuilder.loadTexts:
fpBUFBcount.setDescription('Running total of memory on hash lists.')
fp_inode_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4))
if mibBuilder.loadTexts:
fpInodeTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fpInodeTable.setDescription('Inode table displays the Inode Statistics for all FSPs. Inode is part of StackOS module.')
fp_inode_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'))
if mibBuilder.loadTexts:
fpInodeEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fpInodeEntry.setDescription('Each entry in the table displays Inode Statistics for a FSP.')
fp_inode_igetcalls = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpINODEIgetcalls.setStatus('mandatory')
if mibBuilder.loadTexts:
fpINODEIgetcalls.setDescription('Number of calls to htfs-iget.')
fp_foundinodes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpFoundinodes.setStatus('mandatory')
if mibBuilder.loadTexts:
fpFoundinodes.setDescription('Inode cache hits.')
fp_totalinodes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpTotalinodes.setStatus('mandatory')
if mibBuilder.loadTexts:
fpTotalinodes.setDescription('Total number of inodes in memory.')
fp_goneinodes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpGoneinodes.setStatus('mandatory')
if mibBuilder.loadTexts:
fpGoneinodes.setDescription('Number of inodes on gone list.')
fp_freeinodes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpFreeinodes.setStatus('mandatory')
if mibBuilder.loadTexts:
fpFreeinodes.setDescription('Number of inodes on free list.')
fp_cacheinodes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpCacheinodes.setStatus('mandatory')
if mibBuilder.loadTexts:
fpCacheinodes.setDescription('Number of inodes on cache list.')
fp_syncinodes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 2, 3, 4, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fpSyncinodes.setStatus('mandatory')
if mibBuilder.loadTexts:
fpSyncinodes.setDescription('Number of inodes on sync list.')
class Raidlevel(TextualConvention, Integer32):
description = 'Defines the type of Raid Level present in the system'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 3, 5, 6, 7))
named_values = named_values(('raid0', 0), ('raid1', 1), ('raid3', 3), ('raid5', 5), ('raid6', 6), ('raid7', 7))
class Rebuildflag(TextualConvention, Integer32):
description = 'Defines the Rebuild Flag type.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 240, 241, 242, 243, 244, 255))
named_values = named_values(('none', 0), ('autorebuild', 1), ('manualrebuild', 2), ('check', 3), ('expandcapacity', 4), ('phydevfailed', 240), ('logdevfailed', 241), ('justfailed', 242), ('canceled', 243), ('expandcapacityfailed', 244), ('autorebuildfailed', 255))
class Bustype(TextualConvention, Integer32):
description = 'Defines Bus type.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('eisa', 1), ('mca', 2), ('pci', 3), ('vesa', 4), ('isa', 5), ('scsi', 6))
class Controllertype(TextualConvention, Integer32):
description = 'This textual Convention defines the type of Controller.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 8, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 80, 96, 97, 98, 99, 100, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 192, 193, 194, 195))
named_values = named_values(('dac960E', 1), ('dac960M', 8), ('dac960PD', 16), ('dac960PL', 17), ('dac960PDU', 18), ('dac960PE', 19), ('dac960PG', 20), ('dac960PJ', 21), ('dac960PTL', 22), ('dac960PR', 23), ('dac960PRL', 24), ('dac960PT', 25), ('dac1164P', 26), ('dacI20', 80), ('dac960S', 96), ('dac960SU', 97), ('dac960SX', 98), ('dac960SF', 99), ('dac960FL', 100), ('hba440', 129), ('hba440C', 130), ('hba445', 131), ('hba445C', 132), ('hba440xC', 133), ('hba445S', 134), ('hba640', 136), ('hba640A', 137), ('hba446', 138), ('hba446D', 139), ('hba446S', 140), ('hba742', 144), ('hba742A', 145), ('hba747', 146), ('hba747D', 147), ('hba747S', 148), ('hba74xC', 149), ('hba757', 150), ('hba757D', 151), ('hba757S', 152), ('hba757CD', 153), ('hba75xC', 154), ('hba747C', 155), ('hba757C', 156), ('hba540', 160), ('hba540C', 161), ('hba542', 162), ('hba542B', 163), ('hba542C', 164), ('hba542D', 165), ('hba545', 166), ('hba545C', 167), ('hba545S', 168), ('hba54xC', 169), ('hba946', 176), ('hba946C', 177), ('hba948', 178), ('hba948C', 179), ('hba956', 180), ('hba956C', 181), ('hba958', 182), ('hba958C', 183), ('hba958D', 184), ('hba956CD', 185), ('hba958CD', 186), ('hba930', 192), ('hba932', 193), ('hba950', 194), ('hba952', 195))
class Vendorname(TextualConvention, Integer32):
description = 'Name of the Vendors'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8))
named_values = named_values(('mylex', 0), ('ibm', 1), ('hp', 2), ('dec', 3), ('att', 4), ('dell', 5), ('nec', 6), ('sni', 7), ('ncr', 8))
class U08Bits(TextualConvention, Integer32):
description = 'Integer type of range 0..255'
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 255)
class U16Bits(TextualConvention, Integer32):
description = 'Integer type of range 0..65535'
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535)
fab_log_dev_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1))
if mibBuilder.loadTexts:
fabLogDevTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLogDevTable.setDescription('This table contains information for logical devices.')
fab_log_dev_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'), (0, 'NETSERVER-MIB', 'ldIndex'))
if mibBuilder.loadTexts:
fabLogDevEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLogDevEntry.setDescription('Entry for each logical device')
ld_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
ldIndex.setDescription(' Index of the logical device')
ld_sector_reads = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldSectorReads.setStatus('mandatory')
if mibBuilder.loadTexts:
ldSectorReads.setDescription(' Number of sectors read ')
ld_w_buf_reads = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldWBufReads.setStatus('mandatory')
if mibBuilder.loadTexts:
ldWBufReads.setDescription(' Number of sectors read from WBUF ')
ld_sector_writes = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldSectorWrites.setStatus('mandatory')
if mibBuilder.loadTexts:
ldSectorWrites.setDescription('Number of sector writes ')
ld_read_io = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldReadIO.setStatus('mandatory')
if mibBuilder.loadTexts:
ldReadIO.setDescription("Number of read IO's ")
ld_write_io = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldWriteIO.setStatus('mandatory')
if mibBuilder.loadTexts:
ldWriteIO.setDescription("Number of write IO's ")
ld_media_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldMediaErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
ldMediaErrors.setDescription('Number of media errors ')
ld_drive_errors = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldDriveErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
ldDriveErrors.setDescription('Number of drive errors ')
ld_total_time = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 5, 1, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ldTotalTime.setStatus('mandatory')
if mibBuilder.loadTexts:
ldTotalTime.setDescription('Total time for the logical device')
fab_adpt_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1))
if mibBuilder.loadTexts:
fabAdptTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fabAdptTable.setDescription('Table containing information for all fibre channel adapters information on the Auspex IO node')
fab_adpt_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'), (0, 'NETSERVER-MIB', 'fabIndex'))
if mibBuilder.loadTexts:
fabAdptEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fabAdptEntry.setDescription('Entry for each fibre channel adapter')
fab_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fabIndex.setDescription('Fabric adapter index')
fab_pci_bus_num = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 2), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabPCIBusNum.setStatus('mandatory')
if mibBuilder.loadTexts:
fabPCIBusNum.setDescription('Fabric adapter PCI BUS number')
fab_slot_num = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 3), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabSlotNum.setStatus('mandatory')
if mibBuilder.loadTexts:
fabSlotNum.setDescription('Fabric adapter Slot number')
fab_int_line = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 4), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabIntLine.setStatus('mandatory')
if mibBuilder.loadTexts:
fabIntLine.setDescription('Fabric adapter Interrupt line')
fab_int_pin = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 5), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabIntPin.setStatus('mandatory')
if mibBuilder.loadTexts:
fabIntPin.setDescription('Fabric adapter Interrupt pin')
fab_type = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 6), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabType.setStatus('mandatory')
if mibBuilder.loadTexts:
fabType.setDescription('Fabric adapter Type')
fab_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 7), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabVendorId.setStatus('mandatory')
if mibBuilder.loadTexts:
fabVendorId.setDescription('Fabric adapter Vendor ID')
fab_device_id = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 8), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabDeviceId.setStatus('mandatory')
if mibBuilder.loadTexts:
fabDeviceId.setDescription('Fabric adapter Device ID')
fab_revision_id = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 9), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabRevisionId.setStatus('mandatory')
if mibBuilder.loadTexts:
fabRevisionId.setDescription('Fabric adapter Revision ID')
fab_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabWWN.setStatus('mandatory')
if mibBuilder.loadTexts:
fabWWN.setDescription('Fabric adapter World Wide Number')
fab_num_of_targets = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 11), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabNumOfTargets.setStatus('mandatory')
if mibBuilder.loadTexts:
fabNumOfTargets.setDescription('Number of targets found for the adapter')
fab_adpt_number = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 1, 1, 12), u08_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabAdptNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
fabAdptNumber.setDescription('Fabric adapter Number')
fab_target_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2))
if mibBuilder.loadTexts:
fabTargetTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetTable.setDescription('Table containing information for all fibre channel adapters information on the Auspex IO node')
fab_target_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'), (0, 'NETSERVER-MIB', 'fabTargetIndex'))
if mibBuilder.loadTexts:
fabTargetEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetEntry.setDescription('Entry for each fibre channel adapter')
fab_target_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetIndex.setDescription('The Fabric target adapter index ')
fab_target_adapter_num = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 2), u08_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetAdapterNum.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetAdapterNum.setDescription('The fabric target Adapter number')
fab_target_number = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 3), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetNumber.setDescription('The fabric target number')
fab_target_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetWWN.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetWWN.setDescription('The fabric target WWN number')
fab_target_port_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetPortWWN.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetPortWWN.setDescription('The fabric target Port WWN number')
fab_target_alias_name = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetAliasName.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetAliasName.setDescription('The fabric target Alias Name')
fab_target_type = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disk', 1), ('other', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetType.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetType.setDescription('The fabric target Type disk - other ')
fab_target_num_of_luns = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 2, 1, 8), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabTargetNumOfLuns.setStatus('mandatory')
if mibBuilder.loadTexts:
fabTargetNumOfLuns.setDescription('The number of luns on the target')
fab_lun_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3))
if mibBuilder.loadTexts:
fabLunTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunTable.setDescription('Table containing information for all Luns ')
fab_lun_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'), (0, 'NETSERVER-MIB', 'fabLunIndex'))
if mibBuilder.loadTexts:
fabLunEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunEntry.setDescription('Entry for each Lun')
fab_lun_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunIndex.setDescription('Unique Lun identifier')
fab_lun_number = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 2), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunNumber.setDescription(' Lun Number ')
fab_lun_adpt_number = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 3), u08_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunAdptNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunAdptNumber.setDescription('The adapter number for the lun')
fab_lun_tar_number = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 4), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunTarNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunTarNumber.setDescription('The Target number for the lun')
fab_lun_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunWWN.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunWWN.setDescription('The worldwide number for the lun')
fab_lun_type = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 6), u08_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunType.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunType.setDescription('The type of the lun')
fab_lun_size = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunSize.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunSize.setDescription('The size of the lun')
fab_lun_map = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('unmapped', 0), ('mapped', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunMap.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunMap.setDescription('Identifier for the lun mapping')
fab_lun_map_table = mib_table((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4))
if mibBuilder.loadTexts:
fabLunMapTable.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunMapTable.setDescription('Table containing mapping information for all Luns ')
fab_lun_map_entry = mib_table_row((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1)).setIndexNames((0, 'NETSERVER-MIB', 'fspIndex'), (0, 'NETSERVER-MIB', 'fabLunMapIndex'))
if mibBuilder.loadTexts:
fabLunMapEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunMapEntry.setDescription('Entry for each mapped Lun')
fab_lun_map_index = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunMapIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunMapIndex.setDescription('Unique Mapped Lun identifier')
fab_lun_m_number = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 2), u16_bits()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunMNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunMNumber.setDescription(' Mapped Lun Number ')
fab_lun_alias = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunAlias.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunAlias.setDescription('The Alias name associated with the lun')
fab_lun_map_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunMapWWN.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunMapWWN.setDescription('The WWN associated with the lun')
fab_lun_label = mib_table_column((1, 3, 6, 1, 4, 1, 80, 3, 3, 4, 4, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unlabelled', 0), ('labelled', 1), ('labelledactive', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fabLunLabel.setStatus('mandatory')
if mibBuilder.loadTexts:
fabLunLabel.setDescription('The label of the lun')
trap_fs_full = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 1))
trap_fs_degradation = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 2))
trap_disk_updation = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 3))
trap_fc_adpt_link_failure = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 4))
trap_fc_adpt_link_up = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 5))
trap_fc_loss_of_link_failure = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 6))
trap_lun_disappear = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 7))
trap_lun_size_change = mib_identifier((1, 3, 6, 1, 4, 1, 80, 3, 4, 8))
trap_fs_full_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFSFullMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFSFullMsg.setDescription('Name of the file system which got full and for which fileSystemFull trap has to be sent.')
trap_fs_full_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 1, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFSFullTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFSFullTimeStamp.setDescription('Time at which file system identified by trapFSFullMsg got full.')
trap_fs_degradation_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 2, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFSDegradationMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFSDegradationMsg.setDescription('Name of the file system which got degraded and for which fileSystemDegradation trap has to be sent.')
trap_fs_degradation_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 2, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFSDegradationTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFSDegradationTimeStamp.setDescription('Time at which file system identified by trapFSDegradationMsg got degraded.')
trap_disk_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 3, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDiskMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapDiskMsg.setDescription('Name of the disk which got removed from the system and for which diskStackUpdation trap has to be sent.')
trap_disk_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 3, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDiskTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapDiskTimeStamp.setDescription('Time at which disk identified by trapDiskIndex was added/removed.')
trap_fc_adpt_link_failure_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 4, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFCAdptLinkFailureMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFCAdptLinkFailureMsg.setDescription('Name of the fibre channel adapter on which link failure occured.')
trap_fc_adpt_link_failure_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 4, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFCAdptLinkFailureTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFCAdptLinkFailureTimeStamp.setDescription('Time at which the fibre channel adapter link failure occured.')
trap_fc_adpt_link_up_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 5, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFCAdptLinkUpMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFCAdptLinkUpMsg.setDescription('Name of the fibre channel adapter on which link up occured.')
trap_fc_adpt_link_up_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 5, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFCAdptLinkUpTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFCAdptLinkUpTimeStamp.setDescription('Time at which the fibre channel adapter link up occured.')
trap_fc_loss_of_link_failure_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 6, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFCLossOfLinkFailureMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFCLossOfLinkFailureMsg.setDescription('Name of the SD device which had complete loss of link.')
trap_fc_loss_of_link_failure_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 6, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapFCLossOfLinkFailureTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapFCLossOfLinkFailureTimeStamp.setDescription('Time at which complete loss of link occured.')
trap_lun_disappear_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 7, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapLunDisappearMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapLunDisappearMsg.setDescription('Mapped lun which disappeared')
trap_lun_disappear_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 7, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapLunDisappearTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapLunDisappearTimeStamp.setDescription('Time at which mapped lun disappeared')
trap_lun_size_change_msg = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 8, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapLunSizeChangeMsg.setStatus('mandatory')
if mibBuilder.loadTexts:
trapLunSizeChangeMsg.setDescription('Mapped lun whose lun size changed')
trap_lun_size_change_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 80, 3, 4, 8, 2), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapLunSizeChangeTimeStamp.setStatus('mandatory')
if mibBuilder.loadTexts:
trapLunSizeChangeTimeStamp.setDescription('Time at which mapped lun size changed')
file_system_full_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 1)).setObjects(('NETSERVER-MIB', 'trapFSFullMsg'), ('NETSERVER-MIB', 'trapFSFullTimeStamp'))
if mibBuilder.loadTexts:
fileSystemFullTrap.setDescription('Trap indicating that a file system got full.')
if mibBuilder.loadTexts:
fileSystemFullTrap.setReference('None')
file_system_degradation_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 2)).setObjects(('NETSERVER-MIB', 'trapFSDegradationMsg'), ('NETSERVER-MIB', 'trapFSDegradationTimeStamp'))
if mibBuilder.loadTexts:
fileSystemDegradationTrap.setDescription('Trap indicating that a file system got degradated.')
if mibBuilder.loadTexts:
fileSystemDegradationTrap.setReference('None')
disk_stack_updation_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 3)).setObjects(('NETSERVER-MIB', 'trapDiskMsg'), ('NETSERVER-MIB', 'trapDiskTimeStamp'))
if mibBuilder.loadTexts:
diskStackUpdationTrap.setDescription('Trap indicating that a disk was removed.')
if mibBuilder.loadTexts:
diskStackUpdationTrap.setReference('None')
fc_link_failure_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 4)).setObjects(('NETSERVER-MIB', 'trapFCAdptLinkFailureMsg'), ('NETSERVER-MIB', 'trapFCAdptLinkFailureTimeStamp'))
if mibBuilder.loadTexts:
fcLinkFailureTrap.setDescription('Trap indicating that a adapter link failure occured.')
if mibBuilder.loadTexts:
fcLinkFailureTrap.setReference('None')
fc_link_up_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 5)).setObjects(('NETSERVER-MIB', 'trapFCAdptLinkUpMsg'), ('NETSERVER-MIB', 'trapFCAdptLinkUpTimeStamp'))
if mibBuilder.loadTexts:
fcLinkUpTrap.setDescription('Trap indicating that a adapter link up occured.')
if mibBuilder.loadTexts:
fcLinkUpTrap.setReference('None')
fc_complete_loss_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 6)).setObjects(('NETSERVER-MIB', 'trapFCLossOfLinkFailureMsg'), ('NETSERVER-MIB', 'trapFCLossOfLinkFailureTimeStamp'))
if mibBuilder.loadTexts:
fcCompleteLossTrap.setDescription('Trap indicating that complete loss of link occured.')
if mibBuilder.loadTexts:
fcCompleteLossTrap.setReference('None')
lun_disappear_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 7)).setObjects(('NETSERVER-MIB', 'trapLunDisappearMsg'), ('NETSERVER-MIB', 'trapLunDisappearTimeStamp'))
if mibBuilder.loadTexts:
lunDisappearTrap.setDescription('Trap indicating that a mapped lun disappeared.')
if mibBuilder.loadTexts:
lunDisappearTrap.setReference('None')
lun_size_change_trap = notification_type((1, 3, 6, 1, 4, 1, 80) + (0, 8)).setObjects(('NETSERVER-MIB', 'trapLunSizeChangeMsg'), ('NETSERVER-MIB', 'trapLunSizeChangeTimeStamp'))
if mibBuilder.loadTexts:
lunSizeChangeTrap.setDescription('Trap indicating that lun size change occured on a mapped lun.')
if mibBuilder.loadTexts:
lunSizeChangeTrap.setReference('None')
host = mib_identifier((1, 3, 6, 1, 2, 1, 25))
hr_system = mib_identifier((1, 3, 6, 1, 2, 1, 25, 1))
hr_storage = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2))
hr_device = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3))
class Boolean(Integer32):
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('true', 1), ('false', 2))
class Kbytes(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Productid(ObjectIdentifier):
pass
class Dateandtime(OctetString):
subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(8, 8), value_size_constraint(11, 11))
class Internationaldisplaystring(OctetString):
pass
hr_system_uptime = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 1), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrSystemUptime.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemUptime.setDescription('The amount of time since this host was last initialized. Note that this is different from sysUpTime in MIB-II [3] because sysUpTime is the uptime of the network management portion of the system.')
hr_system_date = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 2), date_and_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hrSystemDate.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemDate.setDescription("The host's notion of the local date and time of day.")
hr_system_initial_load_device = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hrSystemInitialLoadDevice.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemInitialLoadDevice.setDescription('The index of the hrDeviceEntry for the device from which this host is configured to load its initial operating system configuration.')
hr_system_initial_load_parameters = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 4), international_display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hrSystemInitialLoadParameters.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemInitialLoadParameters.setDescription('This object contains the parameters (e.g. a pathname and parameter) supplied to the load device when requesting the initial operating system configuration from that device.')
hr_system_num_users = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrSystemNumUsers.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemNumUsers.setDescription('The number of user sessions for which this host is storing state information. A session is a collection of processes requiring a single act of user authentication and possibly subject to collective job control.')
hr_system_processes = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrSystemProcesses.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemProcesses.setDescription('The number of process contexts currently loaded or running on this system.')
hr_system_max_processes = mib_scalar((1, 3, 6, 1, 2, 1, 25, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrSystemMaxProcesses.setStatus('mandatory')
if mibBuilder.loadTexts:
hrSystemMaxProcesses.setDescription('The maximum number of process contexts this system can support. If there is no fixed maximum, the value should be zero. On systems that have a fixed maximum, this object can help diagnose failures that occur when this maximum is reached.')
hr_storage_types = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1))
hr_storage_other = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 1))
hr_storage_ram = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 2))
hr_storage_virtual_memory = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 3))
hr_storage_fixed_disk = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 4))
hr_storage_removable_disk = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 5))
hr_storage_floppy_disk = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 6))
hr_storage_compact_disc = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 7))
hr_storage_ram_disk = mib_identifier((1, 3, 6, 1, 2, 1, 25, 2, 1, 8))
hr_memory_size = mib_scalar((1, 3, 6, 1, 2, 1, 25, 2, 2), k_bytes()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrMemorySize.setStatus('mandatory')
if mibBuilder.loadTexts:
hrMemorySize.setDescription('The amount of physical main memory contained by the host.')
hr_storage_table = mib_table((1, 3, 6, 1, 2, 1, 25, 2, 3))
if mibBuilder.loadTexts:
hrStorageTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageTable.setDescription("The (conceptual) table of logical storage areas on the host. An entry shall be placed in the storage table for each logical area of storage that is allocated and has fixed resource limits. The amount of storage represented in an entity is the amount actually usable by the requesting entity, and excludes loss due to formatting or file system reference information. These entries are associated with logical storage areas, as might be seen by an application, rather than physical storage entities which are typically seen by an operating system. Storage such as tapes and floppies without file systems on them are typically not allocated in chunks by the operating system to requesting applications, and therefore shouldn't appear in this table. Examples of valid storage for this table include disk partitions, file systems, ram (for some architectures this is further segmented into regular memory, extended memory, and so on), backing store for virtual memory (`swap space'). This table is intended to be a useful diagnostic for `out of memory' and `out of buffers' types of failures. In addition, it can be a useful performance monitoring tool for tracking memory, disk, or buffer usage.")
hr_storage_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 2, 3, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrStorageIndex'))
if mibBuilder.loadTexts:
hrStorageEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageEntry.setDescription('A (conceptual) entry for one logical storage area on the host. As an example, an instance of the hrStorageType object might be named hrStorageType.3')
hr_storage_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrStorageIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageIndex.setDescription('A unique value for each logical storage area contained by the host.')
hr_storage_type = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 2), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageType.setDescription('The type of storage represented by this entry.')
hr_storage_descr = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrStorageDescr.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageDescr.setDescription('A description of the type and instance of the storage described by this entry.')
hr_storage_allocation_units = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrStorageAllocationUnits.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageAllocationUnits.setDescription('The size, in bytes, of the data objects allocated from this pool. If this entry is monitoring sectors, blocks, buffers, or packets, for example, this number will commonly be greater than one. Otherwise this number will typically be one.')
hr_storage_size = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hrStorageSize.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageSize.setDescription('The size of the storage represented by this entry, in units of hrStorageAllocationUnits.')
hr_storage_used = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrStorageUsed.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageUsed.setDescription('The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits.')
hr_storage_allocation_failures = mib_table_column((1, 3, 6, 1, 2, 1, 25, 2, 3, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrStorageAllocationFailures.setStatus('mandatory')
if mibBuilder.loadTexts:
hrStorageAllocationFailures.setDescription('The number of requests for storage represented by this entry that could not be honored due to not enough storage. It should be noted that as this object has a SYNTAX of Counter, that it does not have a defined initial value. However, it is recommended that this object be initialized to zero.')
hr_device_types = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1))
hr_device_other = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 1))
hr_device_unknown = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 2))
hr_device_processor = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 3))
hr_device_network = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 4))
hr_device_printer = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 5))
hr_device_disk_storage = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 6))
hr_device_video = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 10))
hr_device_audio = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 11))
hr_device_coprocessor = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 12))
hr_device_keyboard = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 13))
hr_device_modem = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 14))
hr_device_parallel_port = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 15))
hr_device_pointing = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 16))
hr_device_serial_port = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 17))
hr_device_tape = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 18))
hr_device_clock = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 19))
hr_device_volatile_memory = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 20))
hr_device_non_volatile_memory = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 1, 21))
hr_device_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 2))
if mibBuilder.loadTexts:
hrDeviceTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceTable.setDescription('The (conceptual) table of devices contained by the host.')
hr_device_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 2, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrDeviceIndex'))
if mibBuilder.loadTexts:
hrDeviceEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceEntry.setDescription('A (conceptual) entry for one device contained by the host. As an example, an instance of the hrDeviceType object might be named hrDeviceType.3')
hr_device_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDeviceIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceIndex.setDescription('A unique value for each device contained by the host. The value for each device must remain constant at least from one re-initialization of the agent to the next re-initialization.')
hr_device_type = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 2), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDeviceType.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceType.setDescription("An indication of the type of device. If this value is `hrDeviceProcessor { hrDeviceTypes 3 }' then an entry exists in the hrProcessorTable which corresponds to this device. If this value is `hrDeviceNetwork { hrDeviceTypes 4 }', then an entry exists in the hrNetworkTable which corresponds to this device. If this value is `hrDevicePrinter { hrDeviceTypes 5 }', then an entry exists in the hrPrinterTable which corresponds to this device. If this value is `hrDeviceDiskStorage { hrDeviceTypes 6 }', then an entry exists in the hrDiskStorageTable which corresponds to this device.")
hr_device_descr = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDeviceDescr.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceDescr.setDescription("A textual description of this device, including the device's manufacturer and revision, and optionally, its serial number.")
hr_device_id = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 4), product_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDeviceID.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceID.setDescription('The product ID for this device.')
hr_device_status = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('running', 2), ('warning', 3), ('testing', 4), ('down', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDeviceStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceStatus.setDescription("The current operational state of the device described by this row of the table. A value unknown(1) indicates that the current state of the device is unknown. running(2) indicates that the device is up and running and that no unusual error conditions are known. The warning(3) state indicates that agent has been informed of an unusual error condition by the operational software (e.g., a disk device driver) but that the device is still 'operational'. An example would be high number of soft errors on a disk. A value of testing(4), indicates that the device is not available for use because it is in the testing state. The state of down(5) is used only when the agent has been informed that the device is not available for any use.")
hr_device_errors = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDeviceErrors.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDeviceErrors.setDescription('The number of errors detected on this device. It should be noted that as this object has a SYNTAX of Counter, that it does not have a defined initial value. However, it is recommended that this object be initialized to zero.')
hr_processor_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 3))
if mibBuilder.loadTexts:
hrProcessorTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrProcessorTable.setDescription("The (conceptual) table of processors contained by the host. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDeviceProcessor'.")
hr_processor_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 3, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrDeviceIndex'))
if mibBuilder.loadTexts:
hrProcessorEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrProcessorEntry.setDescription('A (conceptual) entry for one processor contained by the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrProcessorEntry. As an example of how objects in this table are named, an instance of the hrProcessorFrwID object might be named hrProcessorFrwID.3')
hr_processor_frw_id = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 3, 1, 1), product_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrProcessorFrwID.setStatus('mandatory')
if mibBuilder.loadTexts:
hrProcessorFrwID.setDescription('The product ID of the firmware associated with the processor.')
hr_processor_load = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrProcessorLoad.setStatus('mandatory')
if mibBuilder.loadTexts:
hrProcessorLoad.setDescription('The average, over the last minute, of the percentage of time that this processor was not idle.')
hr_network_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 4))
if mibBuilder.loadTexts:
hrNetworkTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrNetworkTable.setDescription("The (conceptual) table of network devices contained by the host. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDeviceNetwork'.")
hr_network_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 4, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrDeviceIndex'))
if mibBuilder.loadTexts:
hrNetworkEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrNetworkEntry.setDescription('A (conceptual) entry for one network device contained by the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrNetworkEntry. As an example of how objects in this table are named, an instance of the hrNetworkIfIndex object might be named hrNetworkIfIndex.3')
hr_network_if_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 4, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrNetworkIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrNetworkIfIndex.setDescription('The value of ifIndex which corresponds to this network device.')
hr_printer_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 5))
if mibBuilder.loadTexts:
hrPrinterTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPrinterTable.setDescription("The (conceptual) table of printers local to the host. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDevicePrinter'.")
hr_printer_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 5, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrDeviceIndex'))
if mibBuilder.loadTexts:
hrPrinterEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPrinterEntry.setDescription('A (conceptual) entry for one printer local to the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrPrinterEntry. As an example of how objects in this table are named, an instance of the hrPrinterStatus object might be named hrPrinterStatus.3')
hr_printer_status = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('idle', 3), ('printing', 4), ('warmup', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPrinterStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPrinterStatus.setDescription('The current status of this printer device. When in the idle(1), printing(2), or warmup(3) state, the corresponding hrDeviceStatus should be running(2) or warning(3). When in the unknown state, the corresponding hrDeviceStatus should be unknown(1).')
hr_printer_detected_error_state = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 5, 1, 2), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPrinterDetectedErrorState.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPrinterDetectedErrorState.setDescription('This object represents any error conditions detected by the printer. The error conditions are encoded as bits in an octet string, with the following definitions: Condition Bit # hrDeviceStatus lowPaper 0 warning(3) noPaper 1 down(5) lowToner 2 warning(3) noToner 3 down(5) doorOpen 4 down(5) jammed 5 down(5) offline 6 down(5) serviceRequested 7 warning(3) If multiple conditions are currently detected and the hrDeviceStatus would not otherwise be unknown(1) or testing(4), the hrDeviceStatus shall correspond to the worst state of those indicated, where down(5) is worse than warning(3) which is worse than running(2). Bits are numbered starting with the most significant bit of the first byte being bit 0, the least significant bit of the first byte being bit 7, the most significant bit of the second byte being bit 8, and so on. A one bit encodes that the condition was detected, while a zero bit encodes that the condition was not detected. This object is useful for alerting an operator to specific warning or error conditions that may occur, especially those requiring human intervention.')
hr_disk_storage_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 6))
if mibBuilder.loadTexts:
hrDiskStorageTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDiskStorageTable.setDescription("The (conceptual) table of long-term storage devices contained by the host. In particular, disk devices accessed remotely over a network are not included here. Note that this table is potentially sparse: a (conceptual) entry exists only if the correspondent value of the hrDeviceType object is `hrDeviceDiskStorage'.")
hr_disk_storage_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 6, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrDeviceIndex'))
if mibBuilder.loadTexts:
hrDiskStorageEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDiskStorageEntry.setDescription('A (conceptual) entry for one long-term storage device contained by the host. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrDiskStorageEntry. As an example, an instance of the hrDiskStorageCapacity object might be named hrDiskStorageCapacity.3')
hr_disk_storage_access = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('readWrite', 1), ('readOnly', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDiskStorageAccess.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDiskStorageAccess.setDescription('An indication if this long-term storage device is readable and writable or only readable. This should reflect the media type, any write-protect mechanism, and any device configuration that affects the entire device.')
hr_disk_storage_media = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('hardDisk', 3), ('floppyDisk', 4), ('opticalDiskROM', 5), ('opticalDiskWORM', 6), ('opticalDiskRW', 7), ('ramDisk', 8)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDiskStorageMedia.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDiskStorageMedia.setDescription('An indication of the type of media used in this long-term storage device.')
hr_disk_storage_removeble = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 3), boolean()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDiskStorageRemoveble.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDiskStorageRemoveble.setDescription('Denotes whether or not the disk media may be removed from the drive.')
hr_disk_storage_capacity = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 6, 1, 4), k_bytes()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrDiskStorageCapacity.setStatus('mandatory')
if mibBuilder.loadTexts:
hrDiskStorageCapacity.setDescription('The total size for this long-term storage device.')
hr_partition_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 7))
if mibBuilder.loadTexts:
hrPartitionTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionTable.setDescription('The (conceptual) table of partitions for long-term storage devices contained by the host. In particular, partitions accessed remotely over a network are not included here.')
hr_partition_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 7, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrDeviceIndex'), (0, 'NETSERVER-MIB', 'hrPartitionIndex'))
if mibBuilder.loadTexts:
hrPartitionEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionEntry.setDescription('A (conceptual) entry for one partition. The hrDeviceIndex in the index represents the entry in the hrDeviceTable that corresponds to the hrPartitionEntry. As an example of how objects in this table are named, an instance of the hrPartitionSize object might be named hrPartitionSize.3.1')
hr_partition_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPartitionIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionIndex.setDescription('A unique value for each partition on this long- term storage device. The value for each long-term storage device must remain constant at least from one re-initialization of the agent to the next re- initialization.')
hr_partition_label = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 2), international_display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPartitionLabel.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionLabel.setDescription('A textual description of this partition.')
hr_partition_id = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 3), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPartitionID.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionID.setDescription('A descriptor which uniquely represents this partition to the responsible operating system. On some systems, this might take on a binary representation.')
hr_partition_size = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 4), k_bytes()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPartitionSize.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionSize.setDescription('The size of this partition.')
hr_partition_fs_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 7, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrPartitionFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrPartitionFSIndex.setDescription('The index of the file system mounted on this partition. If no file system is mounted on this partition, then this value shall be zero. Note that multiple partitions may point to one file system, denoting that that file system resides on those partitions. Multiple file systems may not reside on one partition.')
hr_fs_table = mib_table((1, 3, 6, 1, 2, 1, 25, 3, 8))
if mibBuilder.loadTexts:
hrFSTable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSTable.setDescription("The (conceptual) table of file systems local to this host or remotely mounted from a file server. File systems that are in only one user's environment on a multi-user system will not be included in this table.")
hr_fs_entry = mib_table_row((1, 3, 6, 1, 2, 1, 25, 3, 8, 1)).setIndexNames((0, 'NETSERVER-MIB', 'hrFSIndex'))
if mibBuilder.loadTexts:
hrFSEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSEntry.setDescription("A (conceptual) entry for one file system local to this host or remotely mounted from a file server. File systems that are in only one user's environment on a multi-user system will not be included in this table. As an example of how objects in this table are named, an instance of the hrFSMountPoint object might be named hrFSMountPoint.3")
hr_fs_types = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9))
hr_fs_other = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 1))
hr_fs_unknown = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 2))
hr_fs_berkeley_ffs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 3))
hr_fs_sys5_fs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 4))
hr_fs_fat = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 5))
hr_fshpfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 6))
hr_fshfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 7))
hr_fsmfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 8))
hr_fsntfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 9))
hr_fsv_node = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 10))
hr_fs_journaled = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 11))
hr_f_siso9660 = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 12))
hr_fs_rock_ridge = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 13))
hr_fsnfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 14))
hr_fs_netware = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 15))
hr_fsafs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 16))
hr_fsdfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 17))
hr_fs_appleshare = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 18))
hr_fsrfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 19))
hr_fsdgcfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 20))
hr_fsbfs = mib_identifier((1, 3, 6, 1, 2, 1, 25, 3, 9, 21))
hr_fs_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSIndex.setDescription('A unique value for each file system local to this host. The value for each file system must remain constant at least from one re-initialization of the agent to the next re-initialization.')
hr_fs_mount_point = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 2), international_display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSMountPoint.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSMountPoint.setDescription('The path name of the root of this file system.')
hr_fs_remote_mount_point = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 3), international_display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSRemoteMountPoint.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSRemoteMountPoint.setDescription('A description of the name and/or address of the server that this file system is mounted from. This may also include parameters such as the mount point on the remote file system. If this is not a remote file system, this string should have a length of zero.')
hr_fs_type = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 4), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSType.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSType.setDescription('The value of this object identifies the type of this file system.')
hr_fs_access = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('readWrite', 1), ('readOnly', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSAccess.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSAccess.setDescription('An indication if this file system is logically configured by the operating system to be readable and writable or only readable. This does not represent any local access-control policy, except one that is applied to the file system as a whole.')
hr_fs_bootable = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 6), boolean()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSBootable.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSBootable.setDescription('A flag indicating whether this file system is bootable.')
hr_fs_storage_index = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hrFSStorageIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSStorageIndex.setDescription('The index of the hrStorageEntry that represents information about this file system. If there is no such information available, then this value shall be zero. The relevant storage entry will be useful in tracking the percent usage of this file system and diagnosing errors that may occur when it runs out of space.')
hr_fs_last_full_backup_date = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 8), date_and_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hrFSLastFullBackupDate.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSLastFullBackupDate.setDescription("The last date at which this complete file system was copied to another storage device for backup. This information is useful for ensuring that backups are being performed regularly. If this information is not known, then this variable shall have the value corresponding to January 1, year 0000, 00:00:00.0, which is encoded as (hex)'00 00 01 01 00 00 00 00'.")
hr_fs_last_partial_backup_date = mib_table_column((1, 3, 6, 1, 2, 1, 25, 3, 8, 1, 9), date_and_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hrFSLastPartialBackupDate.setStatus('mandatory')
if mibBuilder.loadTexts:
hrFSLastPartialBackupDate.setDescription("The last date at which a portion of this file system was copied to another storage device for backup. This information is useful for ensuring that backups are being performed regularly. If this information is not known, then this variable shall have the value corresponding to January 1, year 0000, 00:00:00.0, which is encoded as (hex)'00 00 01 01 00 00 00 00'.")
mibBuilder.exportSymbols('NETSERVER-MIB', fabAdptEntry=fabAdptEntry, diskStackUpdationTrap=diskStackUpdationTrap, trapLunDisappear=trapLunDisappear, npIndex=npIndex, npIfEntry=npIfEntry, BusType=BusType, trapFCAdptLinkUpMsg=trapFCAdptLinkUpMsg, fpDNLCHit=fpDNLCHit, fabLunMapEntry=fabLunMapEntry, hrFSTypes=hrFSTypes, npICMPOutMsgs=npICMPOutMsgs, ldDriveErrors=ldDriveErrors, fpDNLCConflict=fpDNLCConflict, npSMBRcvd=npSMBRcvd, hrDeviceNonVolatileMemory=hrDeviceNonVolatileMemory, fpLFSPurges=fpLFSPurges, npICMPInTimestampReps=npICMPInTimestampReps, hrStorageTable=hrStorageTable, hrFSIndex=hrFSIndex, fpPAGECachelistcnt=fpPAGECachelistcnt, npUDPEntry=npUDPEntry, netServer=netServer, hrPrinterEntry=hrPrinterEntry, fabAdptTable=fabAdptTable, RebuildFlag=RebuildFlag, ldMediaErrors=ldMediaErrors, fpHTFS=fpHTFS, fpLFSReaddirPluses=fpLFSReaddirPluses, npTCPActiveOpens=npTCPActiveOpens, fileSystemDegradationTrap=fileSystemDegradationTrap, fspBusyCount=fspBusyCount, npIPOutNoRoutes=npIPOutNoRoutes, hrFSDFS=hrFSDFS, fspTable=fspTable, npSMBCloses=npSMBCloses, fpLFSLinks=fpLFSLinks, hrFSVNode=hrFSVNode, fabIntLine=fabIntLine, npICMPOutTimestampReps=npICMPOutTimestampReps, npIfOutUcastPkts=npIfOutUcastPkts, fpPAGEDirtydlistcnt=fpPAGEDirtydlistcnt, fpPAGEWritehit=fpPAGEWritehit, trapFCAdptLinkUp=trapFCAdptLinkUp, npIPRoutingDiscards=npIPRoutingDiscards, fabTargetTable=fabTargetTable, fabLunMapIndex=fabLunMapIndex, npEntry=npEntry, fabTargetEntry=fabTargetEntry, hrPartitionTable=hrPartitionTable, npIfInErrors=npIfInErrors, npUDPNoPorts=npUDPNoPorts, fabLunNumber=fabLunNumber, axSP=axSP, ldWriteIO=ldWriteIO, fpLFSEntry=fpLFSEntry, fpPAGEZcbreak=fpPAGEZcbreak, npSMBWrites=npSMBWrites, npTCPRetransSegs=npTCPRetransSegs, npTable=npTable, axProductInfo=axProductInfo, npIPInDiscards=npIPInDiscards, axFP=axFP, trapFSDegradation=trapFSDegradation, hrStorageVirtualMemory=hrStorageVirtualMemory, hrFSAFS=hrFSAFS, fpInodeTable=fpInodeTable, fabLunMap=fabLunMap, fpLFSGetattrs=fpLFSGetattrs, fabRaid=fabRaid, fpDNLCHashsz=fpDNLCHashsz, npIfInDiscards=npIfInDiscards, npTCPCurrEstab=npTCPCurrEstab, fpLFSClears=fpLFSClears, fpBUFBufsize=fpBUFBufsize, hrStorageIndex=hrStorageIndex, hrFSUnknown=hrFSUnknown, fabTargetIndex=fabTargetIndex, npIPInUnknownProtos=npIPInUnknownProtos, KBytes=KBytes, fcLinkUpTrap=fcLinkUpTrap, fpLFSCreates=fpLFSCreates, hrStorageRam=hrStorageRam, fabSlotNum=fabSlotNum, npIPReasmReqds=npIPReasmReqds, npICMPOutEchos=npICMPOutEchos, ldSectorWrites=ldSectorWrites, hrDiskStorageRemoveble=hrDiskStorageRemoveble, DateAndTime=DateAndTime, Boolean=Boolean, fpFSEntry=fpFSEntry, npIdleCount=npIdleCount, hrPartitionLabel=hrPartitionLabel, npSMBTable=npSMBTable, hrSystem=hrSystem, hrDeviceProcessor=hrDeviceProcessor, fabLunType=fabLunType, hrNetworkIfIndex=hrNetworkIfIndex, fspEntry=fspEntry, hrPartitionIndex=hrPartitionIndex, ProductID=ProductID, trapFCLossOfLinkFailure=trapFCLossOfLinkFailure, npICMPTable=npICMPTable, hrFSBFS=hrFSBFS, fabLunEntry=fabLunEntry, npICMPOutAddrMasks=npICMPOutAddrMasks, trapDiskMsg=trapDiskMsg, hrMemorySize=hrMemorySize, hrFSAppleshare=hrFSAppleshare, hrPartitionID=hrPartitionID, axFSP=axFSP, hrFSNetware=hrFSNetware, fpGoneinodes=fpGoneinodes, fcCompleteLossTrap=fcCompleteLossTrap, hrFSMountPoint=hrFSMountPoint, fpHrFSIndex=fpHrFSIndex, hrStorageTypes=hrStorageTypes, hrStorageSize=hrStorageSize, npICMPOutAddrMaskReps=npICMPOutAddrMaskReps, fpLFSMkdirs=fpLFSMkdirs, npIPEntry=npIPEntry, InternationalDisplayString=InternationalDisplayString, hrDeviceVideo=hrDeviceVideo, npIPInReceives=npIPInReceives, fpPAGECachemiss=fpPAGECachemiss, fabDeviceId=fabDeviceId, fpDNLCSEntry=fpDNLCSEntry, npIfSpeed=npIfSpeed, npIPDefaultTTL=npIPDefaultTTL, npSMBBytesRcvd=npSMBBytesRcvd, fabTargetNumOfLuns=fabTargetNumOfLuns, hrSystemUptime=hrSystemUptime, U08Bits=U08Bits, npNFSDCounts=npNFSDCounts, auspex=auspex, fpLFSMounts=fpLFSMounts, hrFSiso9660=hrFSiso9660, fpPAGEOutscan=fpPAGEOutscan, npTCPRtoAlgorithm=npTCPRtoAlgorithm, npIfInUnknownProto=npIfInUnknownProto, npTCPTable=npTCPTable, fpPAGEFsflushscan=fpPAGEFsflushscan, fabTargetPortWWN=fabTargetPortWWN, fabAdptNumber=fabAdptNumber, fabLunMapWWN=fabLunMapWWN, hrFSDGCFS=hrFSDGCFS, trapFSFull=trapFSFull, hrDeviceOther=hrDeviceOther, hrDiskStorageTable=hrDiskStorageTable, hrDeviceTable=hrDeviceTable, fabTargetNumber=fabTargetNumber, fpLFSRenames=fpLFSRenames, fpINODEIgetcalls=fpINODEIgetcalls, npTCPRtoMin=npTCPRtoMin, ldReadIO=ldReadIO, fpBUFLwrites=fpBUFLwrites, fpLFSNull=fpLFSNull, fpTotalinodes=fpTotalinodes, hrProcessorLoad=hrProcessorLoad, npSMBErrors=npSMBErrors, fpPageStatTable=fpPageStatTable, npIfOutDiscards=npIfOutDiscards, fpBufferStatTable=fpBufferStatTable, hrProcessorEntry=hrProcessorEntry, npTCPMaxConn=npTCPMaxConn, hrStorageAllocationUnits=hrStorageAllocationUnits, npIfOutErrors=npIfOutErrors, hrStorageFixedDisk=hrStorageFixedDisk, hrFSTable=hrFSTable, npTCPOutRsts=npTCPOutRsts, hrStorageType=hrStorageType, trapFCAdptLinkFailure=trapFCAdptLinkFailure, npICMPOutSrcQuenchs=npICMPOutSrcQuenchs, fpPAGETotalmem=fpPAGETotalmem, trapFSFullMsg=trapFSFullMsg, hrDeviceType=hrDeviceType, trapLunSizeChangeMsg=trapLunSizeChangeMsg, hrPrinterTable=hrPrinterTable, hrDeviceParallelPort=hrDeviceParallelPort, hrStorageUsed=hrStorageUsed, axNP=axNP, lunDisappearTrap=lunDisappearTrap, spRaid=spRaid, hrSystemInitialLoadDevice=hrSystemInitialLoadDevice, npICMPInTimeExcds=npICMPInTimeExcds, fpSyncinodes=fpSyncinodes, fpPageEntry=fpPageEntry, npICMPInErrors=npICMPInErrors, fabWWN=fabWWN, hrPartitionFSIndex=hrPartitionFSIndex, fpPAGEFsflushputpage=fpPAGEFsflushputpage, hrProcessorFrwID=hrProcessorFrwID, ldTotalTime=ldTotalTime, npIfOutOctets=npIfOutOctets, fpLFSCkpntoffs=fpLFSCkpntoffs, fpPAGEOutcnt=fpPAGEOutcnt, fpPAGECachehit=fpPAGECachehit, npIfInOctets=npIfInOctets, fabLogDevTable=fabLogDevTable, hrDiskStorageCapacity=hrDiskStorageCapacity, fpLFSFsstats=fpLFSFsstats, fabLunAlias=fabLunAlias, trapFCAdptLinkUpTimeStamp=trapFCAdptLinkUpTimeStamp, npIfOperStatus=npIfOperStatus, fabNumOfTargets=fabNumOfTargets, fpLFSCkpntons=fpLFSCkpntons, fpFSIndex=fpFSIndex, fpLFSUMounts=fpLFSUMounts, fpLFSRemoves=fpLFSRemoves, RaidLevel=RaidLevel, VendorName=VendorName, hrFSOther=hrFSOther, fileSystemFullTrap=fileSystemFullTrap, npICMPOutParmProbs=npICMPOutParmProbs, hrFSRemoteMountPoint=hrFSRemoteMountPoint, hrDeviceClock=hrDeviceClock, hrFSEntry=hrFSEntry, npIPTable=npIPTable, trapLunDisappearTimeStamp=trapLunDisappearTimeStamp, hrFSAccess=hrFSAccess, npIfInUcastPkts=npIfInUcastPkts, fpLFSSymlinks=fpLFSSymlinks, hrFSNTFS=hrFSNTFS, hrFSType=hrFSType, fabType=fabType, ldIndex=ldIndex, npTCPInSegs=npTCPInSegs, npICMPInAddrMaskReps=npICMPInAddrMaskReps, fpPAGEOutputpage=fpPAGEOutputpage, axFab=axFab, npSMBEntry=npSMBEntry, hrFSNFS=hrFSNFS, hrFSHFS=hrFSHFS, hrFSLastFullBackupDate=hrFSLastFullBackupDate, npTCPAttemptFails=npTCPAttemptFails, npSMBBytesSent=npSMBBytesSent, fpBUFBcount=fpBUFBcount, fpLFSSetattrs=fpLFSSetattrs, hrFSMFS=hrFSMFS, npICMPInEchoReps=npICMPInEchoReps, hrStorageDescr=hrStorageDescr, npIPForwarding=npIPForwarding, npICMPInEchos=npICMPInEchos, hrDeviceErrors=hrDeviceErrors, npTCPPassiveOpens=npTCPPassiveOpens, fpFileSystemTable=fpFileSystemTable, hrDeviceDescr=hrDeviceDescr, fpFoundinodes=fpFoundinodes, hrDeviceUnknown=hrDeviceUnknown, hrProcessorTable=hrProcessorTable, npNFSDNJobs=npNFSDNJobs, fabRevisionId=fabRevisionId, hrFSBootable=hrFSBootable, trapFCAdptLinkFailureMsg=trapFCAdptLinkFailureMsg, hrDeviceNetwork=hrDeviceNetwork)
mibBuilder.exportSymbols('NETSERVER-MIB', hrDevicePointing=hrDevicePointing, fpPAGEFreelistcnt=fpPAGEFreelistcnt, axNumNPFSP=axNumNPFSP, npICMPOutTimestamps=npICMPOutTimestamps, npNFSTable=npNFSTable, npNFSDBusyCounts=npNFSDBusyCounts, hrDeviceTape=hrDeviceTape, hrDeviceTypes=hrDeviceTypes, hrDiskStorageEntry=hrDiskStorageEntry, npSMBOpens=npSMBOpens, hrStorageOther=hrStorageOther, hrPrinterDetectedErrorState=hrPrinterDetectedErrorState, fabLunTarNumber=fabLunTarNumber, npUDPOutDatagrams=npUDPOutDatagrams, fpLFSRmdirs=fpLFSRmdirs, fpBUFLreads=fpBUFLreads, fpCacheinodes=fpCacheinodes, fabIndex=fabIndex, npIPFragCreates=npIPFragCreates, fpBUFIOwaits=fpBUFIOwaits, npNFSEntry=npNFSEntry, lunSizeChangeTrap=lunSizeChangeTrap, fpBUFBreads=fpBUFBreads, fabTargetAliasName=fabTargetAliasName, hrPrinterStatus=hrPrinterStatus, hrDeviceVolatileMemory=hrDeviceVolatileMemory, hrFSFat=hrFSFat, fabLunTable=fabLunTable, npICMPInSrcQuenchs=npICMPInSrcQuenchs, npIPFragOKs=npIPFragOKs, fpLFSVersion=fpLFSVersion, trapDiskUpdation=trapDiskUpdation, hrStorageFloppyDisk=hrStorageFloppyDisk, fpLFSReleaseFs=fpLFSReleaseFs, trapFSDegradationTimeStamp=trapFSDegradationTimeStamp, fpLFSReaddirs=fpLFSReaddirs, fpBUFResid=fpBUFResid, fabLunMapTable=fabLunMapTable, hrStorageAllocationFailures=hrStorageAllocationFailures, npICMPOutErrors=npICMPOutErrors, hrFSRockRidge=hrFSRockRidge, fabLunMNumber=fabLunMNumber, fpLFSReads=fpLFSReads, fpLFSFsinfo=fpLFSFsinfo, fabVendorId=fabVendorId, npIfifIndex=npIfifIndex, hrSystemProcesses=hrSystemProcesses, fpLFSMknods=fpLFSMknods, fabTargetWWN=fabTargetWWN, hrDevicePrinter=hrDevicePrinter, hrStorageEntry=hrStorageEntry, npUDPInDatagrams=npUDPInDatagrams, npICMPOutTimeExcds=npICMPOutTimeExcds, ControllerType=ControllerType, npProtocols=npProtocols, U16Bits=U16Bits, hrDeviceEntry=hrDeviceEntry, npUDPInErrors=npUDPInErrors, fpLFSWrites=fpLFSWrites, npICMPOutEchoReps=npICMPOutEchoReps, fabLunIndex=fabLunIndex, fspIndex=fspIndex, npIfIndex=npIfIndex, trapFCAdptLinkFailureTimeStamp=trapFCAdptLinkFailureTimeStamp, npIfTable=npIfTable, npTCPEstabResets=npTCPEstabResets, npIPReasmTimeout=npIPReasmTimeout, hrSystemNumUsers=hrSystemNumUsers, hrSystemMaxProcesses=hrSystemMaxProcesses, trapFCLossOfLinkFailureMsg=trapFCLossOfLinkFailureMsg, hrFSStorageIndex=hrFSStorageIndex, hrDiskStorageAccess=hrDiskStorageAccess, hrDeviceStatus=hrDeviceStatus, hrDiskStorageMedia=hrDiskStorageMedia, fpLFSLookups=fpLFSLookups, hrPartitionEntry=hrPartitionEntry, hrFSLastPartialBackupDate=hrFSLastPartialBackupDate, fpBufferEntry=fpBufferEntry, axTrapData=axTrapData, npICMPOutRedirects=npICMPOutRedirects, hrFSSys5FS=hrFSSys5FS, hrDeviceDiskStorage=hrDeviceDiskStorage, hrSystemDate=hrSystemDate, hrStorage=hrStorage, npUDPTable=npUDPTable, npICMPInMsgs=npICMPInMsgs, ldWBufReads=ldWBufReads, trapFCLossOfLinkFailureTimeStamp=trapFCLossOfLinkFailureTimeStamp, trapLunDisappearMsg=trapLunDisappearMsg, npIfType=npIfType, trapDiskTimeStamp=trapDiskTimeStamp, fpLFSIsolationStates=fpLFSIsolationStates, fabTargetAdapterNum=fabTargetAdapterNum, fabLunWWN=fabLunWWN, fpDNLCMiss=fpDNLCMiss, fspIdleCount=fspIdleCount, npICMPInAddrMasks=npICMPInAddrMasks, hrDeviceModem=hrDeviceModem, fpDNLCPurgevp=fpDNLCPurgevp, fpBUFBwrites=fpBUFBwrites, hrFSJournaled=hrFSJournaled, hrStorageCompactDisc=hrStorageCompactDisc, fpLFSDiagnostics=fpLFSDiagnostics, npICMPEntry=npICMPEntry, trapFSFullTimeStamp=trapFSFullTimeStamp, hrSystemInitialLoadParameters=hrSystemInitialLoadParameters, hrDevice=hrDevice, hrDeviceSerialPort=hrDeviceSerialPort, npICMPInParmProbs=npICMPInParmProbs, hrFSBerkeleyFFS=hrFSBerkeleyFFS, trapLunSizeChange=trapLunSizeChange, npIPReasmFails=npIPReasmFails, fabLunSize=fabLunSize, host=host, fpDNLCTStatTable=fpDNLCTStatTable, fpPAGEDirtyflistcnt=fpPAGEDirtyflistcnt, npIPReasmOKs=npIPReasmOKs, npICMPInRedirects=npICMPInRedirects, fpFreeinodes=fpFreeinodes, fpDNLCPurgevfsp=fpDNLCPurgevfsp, fabLunLabel=fabLunLabel, hrDeviceID=hrDeviceID, hrDeviceIndex=hrDeviceIndex, npTCPRtoMax=npTCPRtoMax, hrPartitionSize=hrPartitionSize, npIPInHdrErrors=npIPInHdrErrors, npICMPInTimestamps=npICMPInTimestamps, fabIntPin=fabIntPin, npTCPInErrs=npTCPInErrs, hrFSHPFS=hrFSHPFS, fpLFSIsolateFs=fpLFSIsolateFs, fpDNLCEnter=fpDNLCEnter, npTCPOutSegs=npTCPOutSegs, fabTargetType=fabTargetType, fpPAGEZcref=fpPAGEZcref, hrFSRFS=hrFSRFS, fpPAGEWritemiss=fpPAGEWritemiss, npIPOutRequests=npIPOutRequests, npIfAdminStatus=npIfAdminStatus, fpLFSTable=fpLFSTable, ldSectorReads=ldSectorReads, hrStorageRamDisk=hrStorageRamDisk, npIfOutQLen=npIfOutQLen, hrStorageRemovableDisk=hrStorageRemovableDisk, fpInodeEntry=fpInodeEntry, axProductName=axProductName, fcLinkFailureTrap=fcLinkFailureTrap, fabPCIBusNum=fabPCIBusNum, npSMBLocksHeld=npSMBLocksHeld, trapLunSizeChangeTimeStamp=trapLunSizeChangeTimeStamp, npIPInAddrErrors=npIPInAddrErrors, hrNetworkTable=hrNetworkTable, npIPOutDiscards=npIPOutDiscards, hrDeviceAudio=hrDeviceAudio, npSMBReads=npSMBReads, axSWVersion=axSWVersion, fabLunAdptNumber=fabLunAdptNumber, trapFSDegradationMsg=trapFSDegradationMsg, npIPFragFails=npIPFragFails, fabLogDevEntry=fabLogDevEntry, npIfOutNUcastPkts=npIfOutNUcastPkts, npIfInNUcastPkts=npIfInNUcastPkts, hrNetworkEntry=hrNetworkEntry, hrDeviceCoprocessor=hrDeviceCoprocessor, fpLFSReadlinks=fpLFSReadlinks, npIfOutCollisions=npIfOutCollisions, npIPForwDatagrams=npIPForwDatagrams, npICMPInDestUnreachs=npICMPInDestUnreachs, hrDeviceKeyboard=hrDeviceKeyboard, npBusyCount=npBusyCount, npIPInDelivers=npIPInDelivers, npICMPOutDestUnreachs=npICMPOutDestUnreachs, npTCPEntry=npTCPEntry) |
'''2. Write a Python script to add a key to a dictionary.
Sample Dictionary : {0: 10, 1: 20}
Expected Result : {0: 10, 1: 20, 2: 30} '''
original_dict = {0: 10, 1: 20}
original_dict[2] = 30
print(original_dict) | """2. Write a Python script to add a key to a dictionary.
Sample Dictionary : {0: 10, 1: 20}
Expected Result : {0: 10, 1: 20, 2: 30} """
original_dict = {0: 10, 1: 20}
original_dict[2] = 30
print(original_dict) |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def partition(self, head):
pre, slow, fast = None, head, head
while fast and fast.next:
pre, slow, fast = slow, slow.next, fast.next.next
pre.next = None
return head, slow
def merge(self, first, second):
merge_head = ListNode()
pm, p1, p2 = merge_head, first, second
while p1 and p2:
if p1.val <= p2.val:
pm.next = p1
p1 = p1.next
else:
pm.next = p2
p2 = p2.next
pm = pm.next
pm.next = p1 or p2
return merge_head.next
def sortList(self, head: ListNode) -> ListNode:
"""
:type head: ListNode
:rtype: ListNode
"""
if not head or not head.next:
return head
first_half, second_half = self.partition(head)
first_half = self.sortList(first_half)
second_half = self.sortList(second_half)
return self.merge(first_half, second_half)
| class Solution:
def partition(self, head):
(pre, slow, fast) = (None, head, head)
while fast and fast.next:
(pre, slow, fast) = (slow, slow.next, fast.next.next)
pre.next = None
return (head, slow)
def merge(self, first, second):
merge_head = list_node()
(pm, p1, p2) = (merge_head, first, second)
while p1 and p2:
if p1.val <= p2.val:
pm.next = p1
p1 = p1.next
else:
pm.next = p2
p2 = p2.next
pm = pm.next
pm.next = p1 or p2
return merge_head.next
def sort_list(self, head: ListNode) -> ListNode:
"""
:type head: ListNode
:rtype: ListNode
"""
if not head or not head.next:
return head
(first_half, second_half) = self.partition(head)
first_half = self.sortList(first_half)
second_half = self.sortList(second_half)
return self.merge(first_half, second_half) |
# Class method return
# EXPECTED OUTPUT:
# case4.py: MyClass.hash -> dict
# case4.py: MyClass.get_hash() -> {}
class MyClass:
def __init__(self):
self.hash = {}
def get_hash(self):
return self.hash
| class Myclass:
def __init__(self):
self.hash = {}
def get_hash(self):
return self.hash |
# https://leetcode.com/problems/factorial-trailing-zeroes/
# https://practice.geeksforgeeks.org/problems/trailing-zeroes-in-factorial5134/1
class Solution:
def trailingZeroes(self, N):
j = 5
ans = 0
while j<=N:
ans = ans + N//j
j = j*5
return ans | class Solution:
def trailing_zeroes(self, N):
j = 5
ans = 0
while j <= N:
ans = ans + N // j
j = j * 5
return ans |
# train and classify variations
class ReadDepthLogisticClassifier (object):
'''
build a classifier using local read depth data with 2 possible labels
'''
def __init__( self, fasta, read_length ):
'''
@fasta: ProbabilisticFasta
@read_length: determines how local the features will be (i.e. +/- read_legnth)
'''
self.fasta = fasta
self.read_length = read_length
self.window_start = -read_length
def add_instance( pos, positive ):
'''
@pos: position on fasta
@positive: is this a positive example
'''
pass
def classify( pos ):
'''
return a probability of positive classification
'''
pass
| class Readdepthlogisticclassifier(object):
"""
build a classifier using local read depth data with 2 possible labels
"""
def __init__(self, fasta, read_length):
"""
@fasta: ProbabilisticFasta
@read_length: determines how local the features will be (i.e. +/- read_legnth)
"""
self.fasta = fasta
self.read_length = read_length
self.window_start = -read_length
def add_instance(pos, positive):
"""
@pos: position on fasta
@positive: is this a positive example
"""
pass
def classify(pos):
"""
return a probability of positive classification
"""
pass |
class Jumble(object):
def __init__(self):
self.dict = self.create_dict()
def create_dict(self):
f = open('/usr/share/dict/words', 'r')
sortedict = {}
for word in f:
word = word.strip().lower()
sort = ''.join(sorted(word))
sortedict[sort] = word
return sortedict
def create_word_solver(self,word):
sorted_input = ''.join(sorted(word))
if sorted_input in self.dict:
return self.dict[sorted_input]
def create_solver(self, words):
# List to add solved words to
solved = []
# loop through the given words
for word in words:
solved_words = self.create_word_solver(word)
# check to make sure there are words
if solved_words:
if len(solved_words) == 1:
solved.prepend(solved_words)
else:
solved.append(solved_words)
# return the word list
return solved
if __name__ == "__main__":
jumble = Jumble()
words = ['shast', 'doore', 'ditnic', 'bureek']
solved_words = jumble.create_solver(words)
print(solved_words)
| class Jumble(object):
def __init__(self):
self.dict = self.create_dict()
def create_dict(self):
f = open('/usr/share/dict/words', 'r')
sortedict = {}
for word in f:
word = word.strip().lower()
sort = ''.join(sorted(word))
sortedict[sort] = word
return sortedict
def create_word_solver(self, word):
sorted_input = ''.join(sorted(word))
if sorted_input in self.dict:
return self.dict[sorted_input]
def create_solver(self, words):
solved = []
for word in words:
solved_words = self.create_word_solver(word)
if solved_words:
if len(solved_words) == 1:
solved.prepend(solved_words)
else:
solved.append(solved_words)
return solved
if __name__ == '__main__':
jumble = jumble()
words = ['shast', 'doore', 'ditnic', 'bureek']
solved_words = jumble.create_solver(words)
print(solved_words) |
class Task:
def __init__(self, robot):
self.robot = robot
def warmup(self):
pass
def run(self, input):
pass
def cooldown(self):
pass
def mock(self, input):
return "this is a test"
| class Task:
def __init__(self, robot):
self.robot = robot
def warmup(self):
pass
def run(self, input):
pass
def cooldown(self):
pass
def mock(self, input):
return 'this is a test' |
#!usr/bin/python3
#simple fizzbuzz solution
# Author: @fr4nkl1n-1k3h
for num in range(101):
if n%5 == 0 and n%3 == 0:
print('fizzbuzz',num,end="/n")
elif n%5 == 0:
print('buzz',num,end=" ")
elif n%3 == 0:
print('fizz',num, end=" ")
else:
print(num, end=" ")
print("Simple fizzbuzz by Fr4nkl1n-1keh")
| for num in range(101):
if n % 5 == 0 and n % 3 == 0:
print('fizzbuzz', num, end='/n')
elif n % 5 == 0:
print('buzz', num, end=' ')
elif n % 3 == 0:
print('fizz', num, end=' ')
else:
print(num, end=' ')
print('Simple fizzbuzz by Fr4nkl1n-1keh') |
__title__ = "betfairlightweight"
__description__ = "Lightweight python wrapper for Betfair API-NG"
__url__ = "https://github.com/liampauling/betfair"
__version__ = "2.7.2"
__author__ = "Liam Pauling"
__license__ = "MIT"
| __title__ = 'betfairlightweight'
__description__ = 'Lightweight python wrapper for Betfair API-NG'
__url__ = 'https://github.com/liampauling/betfair'
__version__ = '2.7.2'
__author__ = 'Liam Pauling'
__license__ = 'MIT' |
class Operand:
def add(self, x, y):
return x + y
def multiply(self, x, y):
return x * y
def subtract(self, x, y):
return x - y
def divide(self, x, y):
if y == 0:
return 0
return x / y | class Operand:
def add(self, x, y):
return x + y
def multiply(self, x, y):
return x * y
def subtract(self, x, y):
return x - y
def divide(self, x, y):
if y == 0:
return 0
return x / y |
def coding_problem_50(tree):
"""
Suppose an arithmetic expression is given as a binary tree. Each leaf is an integer and each internal node
is one of '+', '-', '*' or '/'. Given the root to such a tree, write a function to evaluate it.
For example, given the following tree:
*
/ \
+ +
/ \ / \
3 2 4 5
you should return 45, as it is (3 + 2) * (4 + 5).
Examples:
>>> coding_problem_50(('*', ('+', 3, 2), ('+', 4, 5))) # (3 + 2) * (4 + 5) == 45
45
>>> coding_problem_50(('/', ('+', ('+', 1, 2), 3), 12)) # (1 + 2 + 3) / 12 == 0.5
0.5
"""
pass
| def coding_problem_50(tree):
"""
Suppose an arithmetic expression is given as a binary tree. Each leaf is an integer and each internal node
is one of '+', '-', '*' or '/'. Given the root to such a tree, write a function to evaluate it.
For example, given the following tree:
*
/ + +
/ \\ / 3 2 4 5
you should return 45, as it is (3 + 2) * (4 + 5).
Examples:
>>> coding_problem_50(('*', ('+', 3, 2), ('+', 4, 5))) # (3 + 2) * (4 + 5) == 45
45
>>> coding_problem_50(('/', ('+', ('+', 1, 2), 3), 12)) # (1 + 2 + 3) / 12 == 0.5
0.5
"""
pass |
__version__ = "6.7.0"
__title__ = "slims-python-api"
__description__ = "A python api for SLims."
__uri__ = "http://www.genohm.com"
__author__ = "Genohm"
__email__ = "support@genohm.com"
__license__ = "TODO"
__copyright__ = "Copyright (c) 2016 Genohm"
| __version__ = '6.7.0'
__title__ = 'slims-python-api'
__description__ = 'A python api for SLims.'
__uri__ = 'http://www.genohm.com'
__author__ = 'Genohm'
__email__ = 'support@genohm.com'
__license__ = 'TODO'
__copyright__ = 'Copyright (c) 2016 Genohm' |
NEGATIVE_COLLECTION_FIDS = set(
(
"88513394757c43089cd44f817f16ca05", # Khadija Project Research Data
"45602a9bb6c04a179a2657e56ed3a310", # Mozambique Persons of Interest (2015)
"zz_occrp_pdi", # Persona de Interes (2014)
"ch_seco_sanctions", # Swiss SECO Sanctions
"interpol_red_notices", # INTERPOL Red Notices
"45602a9bb6c04a179a2657e56ed3a310",
# "ru_moscow_registration_2014", # 3.9GB
"ru_pskov_people_2007",
"ua_antac_peps",
"am_voters",
"hr_gong_peps",
"hr_gong_companies",
"mk_dksk",
"ru_oligarchs",
"everypolitician",
"lg_people_companies",
"rs_prijave",
"5b5ec30364bb41999f503a050eb17b78",
"aecf6ecc4ab34955a1b8f7f542b6df62",
"am_hetq_peps",
"kg_akipress_peps",
# "ph_voters", # 7.5GB
"gb_coh_disqualified",
)
)
FEATURE_KEYS = [
"name",
"name_length_ratio",
"country",
"registrationNumber",
"incorporationDate",
"address",
"jurisdiction",
"dissolutionDate",
"mainCountry",
"ogrnCode",
"innCode",
"kppCode",
"fnsCode",
"email",
"phone",
"website",
"idNumber",
"birthDate",
"nationality",
"accountNumber",
"iban",
"wikidataId",
"wikipediaUrl",
"deathDate",
"cikCode",
"irsCode",
"vatCode",
"okpoCode",
"passportNumber",
"taxNumber",
"bvdId",
]
FEATURE_IDXS = dict(zip(FEATURE_KEYS, range(len(FEATURE_KEYS))))
SCHEMAS = set(("Person", "Company", "LegalEntity", "Organization", "PublicBody"))
FIELDS_BAN_SET = set(
["alephUrl", "modifiedAt", "retrievedAt", "sourceUrl", "publisher", "publisherUrl"]
)
FEATURE_FTM_COMPARE_WEIGHTS = {
"name": 0.6,
"country": 0.1,
"email": 0.2,
"phone": 0.3,
"website": 0.1,
"incorporationDate": 0.2,
"dissolutionDate": 0.2,
"registrationNumber": 0.3,
"idNumber": 0.3,
"taxNumber": 0.3,
"vatCode": 0.3,
"jurisdiction": 0.1,
"mainCountry": 0.1,
"bvdId": 0.3,
"okpoCode": 0.3,
"innCode": 0.3,
"country": 0.1,
"wikipediaUrl": 0.1,
"wikidataId": 0.3,
"address": 0.3,
"accountNumber": 0.3,
"iban": 0.3,
"irsCode": 0.3,
"cikCode": 0.3,
"kppCode": 0.3,
"fnsCode": 0.3,
"ogrnCode": 0.3,
"birthDate": 0.2,
"deathDate": 0.2,
"nationality": 0.1,
"passportNumber": 0.3,
}
| negative_collection_fids = set(('88513394757c43089cd44f817f16ca05', '45602a9bb6c04a179a2657e56ed3a310', 'zz_occrp_pdi', 'ch_seco_sanctions', 'interpol_red_notices', '45602a9bb6c04a179a2657e56ed3a310', 'ru_pskov_people_2007', 'ua_antac_peps', 'am_voters', 'hr_gong_peps', 'hr_gong_companies', 'mk_dksk', 'ru_oligarchs', 'everypolitician', 'lg_people_companies', 'rs_prijave', '5b5ec30364bb41999f503a050eb17b78', 'aecf6ecc4ab34955a1b8f7f542b6df62', 'am_hetq_peps', 'kg_akipress_peps', 'gb_coh_disqualified'))
feature_keys = ['name', 'name_length_ratio', 'country', 'registrationNumber', 'incorporationDate', 'address', 'jurisdiction', 'dissolutionDate', 'mainCountry', 'ogrnCode', 'innCode', 'kppCode', 'fnsCode', 'email', 'phone', 'website', 'idNumber', 'birthDate', 'nationality', 'accountNumber', 'iban', 'wikidataId', 'wikipediaUrl', 'deathDate', 'cikCode', 'irsCode', 'vatCode', 'okpoCode', 'passportNumber', 'taxNumber', 'bvdId']
feature_idxs = dict(zip(FEATURE_KEYS, range(len(FEATURE_KEYS))))
schemas = set(('Person', 'Company', 'LegalEntity', 'Organization', 'PublicBody'))
fields_ban_set = set(['alephUrl', 'modifiedAt', 'retrievedAt', 'sourceUrl', 'publisher', 'publisherUrl'])
feature_ftm_compare_weights = {'name': 0.6, 'country': 0.1, 'email': 0.2, 'phone': 0.3, 'website': 0.1, 'incorporationDate': 0.2, 'dissolutionDate': 0.2, 'registrationNumber': 0.3, 'idNumber': 0.3, 'taxNumber': 0.3, 'vatCode': 0.3, 'jurisdiction': 0.1, 'mainCountry': 0.1, 'bvdId': 0.3, 'okpoCode': 0.3, 'innCode': 0.3, 'country': 0.1, 'wikipediaUrl': 0.1, 'wikidataId': 0.3, 'address': 0.3, 'accountNumber': 0.3, 'iban': 0.3, 'irsCode': 0.3, 'cikCode': 0.3, 'kppCode': 0.3, 'fnsCode': 0.3, 'ogrnCode': 0.3, 'birthDate': 0.2, 'deathDate': 0.2, 'nationality': 0.1, 'passportNumber': 0.3} |
class ClientException(Exception):
pass
class ServerException(Exception):
pass
class BadRequestError(ServerException):
pass
class UnauthorizedError(ServerException):
pass
class NotFoundError(ServerException):
pass
class UnprocessableError(ServerException):
pass
class InternalServerError(ServerException):
pass
class ServiceUnavailableError(ServerException):
pass
class ClientError(ServerException):
pass
class ServerError(ServerException):
pass
class ServerBaseErrors(object):
ERR_UIZA_BAD_REQUEST = 'The request was unacceptable, often due to missing a required parameter.'
ERR_UIZA_UNAUTHORIZED = 'No valid API key provided.'
ERR_UIZA_NOT_FOUND = 'The requested resource doesn\'t exist.'
ERR_UIZA_UNPROCESSABLE = 'The syntax of the request is correct (often cause of wrong parameter)'
ERR_UIZA_INTERNAL_SERVER_ERROR = 'We had a problem with our server. Try again later.'
ERR_UIZA_SERVICE_UNAVAILABLE = 'The server is overloaded or down for maintenance.'
ERR_UIZA_CLIENT_ERROR = 'The error seems to have been caused by the client'
ERR_UIZA_SERVER_ERROR = ' the server is aware that it has encountered an error'
| class Clientexception(Exception):
pass
class Serverexception(Exception):
pass
class Badrequesterror(ServerException):
pass
class Unauthorizederror(ServerException):
pass
class Notfounderror(ServerException):
pass
class Unprocessableerror(ServerException):
pass
class Internalservererror(ServerException):
pass
class Serviceunavailableerror(ServerException):
pass
class Clienterror(ServerException):
pass
class Servererror(ServerException):
pass
class Serverbaseerrors(object):
err_uiza_bad_request = 'The request was unacceptable, often due to missing a required parameter.'
err_uiza_unauthorized = 'No valid API key provided.'
err_uiza_not_found = "The requested resource doesn't exist."
err_uiza_unprocessable = 'The syntax of the request is correct (often cause of wrong parameter)'
err_uiza_internal_server_error = 'We had a problem with our server. Try again later.'
err_uiza_service_unavailable = 'The server is overloaded or down for maintenance.'
err_uiza_client_error = 'The error seems to have been caused by the client'
err_uiza_server_error = ' the server is aware that it has encountered an error' |
class DealResult(object):
'''
Details of a deal that has taken place.
'''
def __init__(self):
self.proposer = None
self.proposee = None
self.properties_transferred_to_proposer = []
self.properties_transferred_to_proposee = []
self.cash_transferred_from_proposer_to_proposee = 0
| class Dealresult(object):
"""
Details of a deal that has taken place.
"""
def __init__(self):
self.proposer = None
self.proposee = None
self.properties_transferred_to_proposer = []
self.properties_transferred_to_proposee = []
self.cash_transferred_from_proposer_to_proposee = 0 |
#! /usr/bin/env python3
"""This module defines constants needed for test package.
"""
__all__ = [
'NEXT_WAIT',
'ASYNC_TIME',
]
__version__ = '1.0.0.1'
__author__ = 'Midhun C Nair <midhunch@gmail.com>'
__maintainers__ = [
'Midhun C Nair <midhunch@gmail.com>',
]
NEXT_WAIT = .5
ASYNC_TIME = 2
| """This module defines constants needed for test package.
"""
__all__ = ['NEXT_WAIT', 'ASYNC_TIME']
__version__ = '1.0.0.1'
__author__ = 'Midhun C Nair <midhunch@gmail.com>'
__maintainers__ = ['Midhun C Nair <midhunch@gmail.com>']
next_wait = 0.5
async_time = 2 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 11 01:22:29 2018
@author: syenpark
"""
balance = 4773
annualInterestRate = 0.2
monthlyInterestRate = annualInterestRate / 12.0
def foo(b, a, ii):
for i in range(12):
minimumMonthlyPayment = ii*10
monthlyUnpaidBalance = b - minimumMonthlyPayment
updatedBalanceEachMonth = monthlyUnpaidBalance + monthlyInterestRate * monthlyUnpaidBalance
b = updatedBalanceEachMonth
if b > 0:
ii += 1
return foo(balance, annualInterestRate, ii)
else:
return ii
print(foo(balance, annualInterestRate, 1)*10) | """
Created on Mon Jun 11 01:22:29 2018
@author: syenpark
"""
balance = 4773
annual_interest_rate = 0.2
monthly_interest_rate = annualInterestRate / 12.0
def foo(b, a, ii):
for i in range(12):
minimum_monthly_payment = ii * 10
monthly_unpaid_balance = b - minimumMonthlyPayment
updated_balance_each_month = monthlyUnpaidBalance + monthlyInterestRate * monthlyUnpaidBalance
b = updatedBalanceEachMonth
if b > 0:
ii += 1
return foo(balance, annualInterestRate, ii)
else:
return ii
print(foo(balance, annualInterestRate, 1) * 10) |
'''
Full write up is here! https://devclass.io/climbing-stairs
You are climbing a staircase. It takes `n` steps to reach the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
**Example 1**
`Input: n = 2`
`Output: 2`
_Explanation_
There are two ways to climb to the top.
1. 1 step + 1 step
2. 2 steps
'''
class Solution:
def climbStairs(self, n):
if n <= 2:
return n
return self.climbStairs(n - 1) + self.climbStairs(n - 2)
class SolutionMemoize:
def climbStairs(self, n):
if n < 3:
return n
memo = [-1] * n
memo[0] = 0
memo[1] = 1
memo[2] = 2
def climbHelper(n):
if n <= 2:
return memo[n]
for i in range(3, n):
memo[i] = memo[i-1] + memo[i-2]
return memo[n-1] + memo[n-2]
return climbHelper(n)
| """
Full write up is here! https://devclass.io/climbing-stairs
You are climbing a staircase. It takes `n` steps to reach the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
**Example 1**
`Input: n = 2`
`Output: 2`
_Explanation_
There are two ways to climb to the top.
1. 1 step + 1 step
2. 2 steps
"""
class Solution:
def climb_stairs(self, n):
if n <= 2:
return n
return self.climbStairs(n - 1) + self.climbStairs(n - 2)
class Solutionmemoize:
def climb_stairs(self, n):
if n < 3:
return n
memo = [-1] * n
memo[0] = 0
memo[1] = 1
memo[2] = 2
def climb_helper(n):
if n <= 2:
return memo[n]
for i in range(3, n):
memo[i] = memo[i - 1] + memo[i - 2]
return memo[n - 1] + memo[n - 2]
return climb_helper(n) |
"""DEPRECATED: Please use the sources in `@rules_foreign_cc//foreign_cc/...`"""
# buildifier: disable=bzl-visibility
load(
"//foreign_cc/private:detect_root.bzl",
_detect_root = "detect_root",
_filter_containing_dirs_from_inputs = "filter_containing_dirs_from_inputs",
)
load("//tools/build_defs:deprecation.bzl", "print_deprecation")
print_deprecation()
detect_root = _detect_root
filter_containing_dirs_from_inputs = _filter_containing_dirs_from_inputs
| """DEPRECATED: Please use the sources in `@rules_foreign_cc//foreign_cc/...`"""
load('//foreign_cc/private:detect_root.bzl', _detect_root='detect_root', _filter_containing_dirs_from_inputs='filter_containing_dirs_from_inputs')
load('//tools/build_defs:deprecation.bzl', 'print_deprecation')
print_deprecation()
detect_root = _detect_root
filter_containing_dirs_from_inputs = _filter_containing_dirs_from_inputs |
""" All exceptions used by this library """
class StopSession(Exception):
""" Raised to request an exit the main console loop """
pass
class UnknownCommandError(Exception):
""" Raised when attempting to use an unknown shell command """
pass
class WrongNumberOfArgumentsError(Exception):
""" Raised when passing too many or two few shell command arguments """
pass
class ConnectionNotFoundError(Exception):
""" Raised when a connection cannot be found by its name """
pass
class ConnectionAlreadyExistsError(Exception):
""" Raised when trying to assign two connections to the same name """
pass
| """ All exceptions used by this library """
class Stopsession(Exception):
""" Raised to request an exit the main console loop """
pass
class Unknowncommanderror(Exception):
""" Raised when attempting to use an unknown shell command """
pass
class Wrongnumberofargumentserror(Exception):
""" Raised when passing too many or two few shell command arguments """
pass
class Connectionnotfounderror(Exception):
""" Raised when a connection cannot be found by its name """
pass
class Connectionalreadyexistserror(Exception):
""" Raised when trying to assign two connections to the same name """
pass |
STATUS = {
'no_content': ('No content, check the request body', 204),
'unprocessable_entity': ('Unprocessable entity, check the request attributes', 422)
}
def missing_attributes(document, attributes):
for attribute in attributes:
if attribute not in document:
return True
return False
| status = {'no_content': ('No content, check the request body', 204), 'unprocessable_entity': ('Unprocessable entity, check the request attributes', 422)}
def missing_attributes(document, attributes):
for attribute in attributes:
if attribute not in document:
return True
return False |
# This module defines many standard colors that should be useful.
# These colors should be exactly the same as the ones defined in
# vtkNamedColors.h.
# Whites
antique_white = (0.9804, 0.9216, 0.8431)
azure = (0.9412, 1.0000, 1.0000)
bisque = (1.0000, 0.8941, 0.7686)
blanched_almond = (1.0000, 0.9216, 0.8039)
cornsilk = (1.0000, 0.9725, 0.8627)
eggshell = (0.9900, 0.9000, 0.7900)
floral_white = (1.0000, 0.9804, 0.9412)
gainsboro = (0.8627, 0.8627, 0.8627)
ghost_white = (0.9725, 0.9725, 1.0000)
honeydew = (0.9412, 1.0000, 0.9412)
ivory = (1.0000, 1.0000, 0.9412)
lavender = (0.9020, 0.9020, 0.9804)
lavender_blush = (1.0000, 0.9412, 0.9608)
lemon_chiffon = (1.0000, 0.9804, 0.8039)
linen = (0.9804, 0.9412, 0.9020)
mint_cream = (0.9608, 1.0000, 0.9804)
misty_rose = (1.0000, 0.8941, 0.8824)
moccasin = (1.0000, 0.8941, 0.7098)
navajo_white = (1.0000, 0.8706, 0.6784)
old_lace = (0.9922, 0.9608, 0.9020)
papaya_whip = (1.0000, 0.9373, 0.8353)
peach_puff = (1.0000, 0.8549, 0.7255)
seashell = (1.0000, 0.9608, 0.9333)
snow = (1.0000, 0.9804, 0.9804)
thistle = (0.8471, 0.7490, 0.8471)
titanium_white = (0.9900, 1.0000, 0.9400)
wheat = (0.9608, 0.8706, 0.7020)
white = (1.0000, 1.0000, 1.0000)
white_smoke = (0.9608, 0.9608, 0.9608)
zinc_white = (0.9900, 0.9700, 1.0000)
# Greys
cold_grey = (0.5000, 0.5400, 0.5300)
dim_grey = (0.4118, 0.4118, 0.4118)
grey = (0.7529, 0.7529, 0.7529)
light_grey = (0.8275, 0.8275, 0.8275)
slate_grey = (0.4392, 0.5020, 0.5647)
slate_grey_dark = (0.1843, 0.3098, 0.3098)
slate_grey_light = (0.4667, 0.5333, 0.6000)
warm_grey = (0.5000, 0.5000, 0.4100)
# Blacks
black = (0.0000, 0.0000, 0.0000)
ivory_black = (0.1600, 0.1400, 0.1300)
lamp_black = (0.1800, 0.2800, 0.2300)
# Reds
alizarin_crimson = (0.8900, 0.1500, 0.2100)
brick = (0.6100, 0.4000, 0.1200)
cadmium_red_deep = (0.8900, 0.0900, 0.0500)
coral = (1.0000, 0.4980, 0.3137)
coral_light = (0.9412, 0.5020, 0.5020)
deep_pink = (1.0000, 0.0784, 0.5765)
english_red = (0.8300, 0.2400, 0.1000)
firebrick = (0.6980, 0.1333, 0.1333)
geranium_lake = (0.8900, 0.0700, 0.1900)
hot_pink = (1.0000, 0.4118, 0.7059)
indian_red = (0.6900, 0.0900, 0.1200)
light_salmon = (1.0000, 0.6275, 0.4784)
madder_lake_deep = (0.8900, 0.1800, 0.1900)
maroon = (0.6902, 0.1882, 0.3765)
pink = (1.0000, 0.7529, 0.7961)
pink_light = (1.0000, 0.7137, 0.7569)
raspberry = (0.5300, 0.1500, 0.3400)
red = (1.0000, 0.0000, 0.0000)
rose_madder = (0.8900, 0.2100, 0.2200)
salmon = (0.9804, 0.5020, 0.4471)
tomato = (1.0000, 0.3882, 0.2784)
venetian_red = (0.8300, 0.1000, 0.1200)
# Browns
beige = (0.6400, 0.5800, 0.5000)
brown = (0.5000, 0.1647, 0.1647)
brown_madder = (0.8600, 0.1600, 0.1600)
brown_ochre = (0.5300, 0.2600, 0.1200)
burlywood = (0.8706, 0.7216, 0.5294)
burnt_sienna = (0.5400, 0.2100, 0.0600)
burnt_umber = (0.5400, 0.2000, 0.1400)
chocolate = (0.8235, 0.4118, 0.1176)
deep_ochre = (0.4500, 0.2400, 0.1000)
flesh = (1.0000, 0.4900, 0.2500)
flesh_ochre = (1.0000, 0.3400, 0.1300)
gold_ochre = (0.7800, 0.4700, 0.1500)
greenish_umber = (1.0000, 0.2400, 0.0500)
khaki = (0.9412, 0.9020, 0.5490)
khaki_dark = (0.7412, 0.7176, 0.4196)
light_beige = (0.9608, 0.9608, 0.8627)
peru = (0.8039, 0.5216, 0.2471)
rosy_brown = (0.7373, 0.5608, 0.5608)
raw_sienna = (0.7800, 0.3800, 0.0800)
raw_umber = (0.4500, 0.2900, 0.0700)
sepia = (0.3700, 0.1500, 0.0700)
sienna = (0.6275, 0.3216, 0.1765)
saddle_brown = (0.5451, 0.2706, 0.0745)
sandy_brown = (0.9569, 0.6431, 0.3765)
tan = (0.8235, 0.7059, 0.5490)
van_dyke_brown = (0.3700, 0.1500, 0.0200)
# Oranges
cadmium_orange = (1.0000, 0.3800, 0.0100)
cadmium_red_light = (1.0000, 0.0100, 0.0500)
carrot = (0.9300, 0.5700, 0.1300)
dark_orange = (1.0000, 0.5490, 0.0000)
mars_orange = (0.5900, 0.2700, 0.0800)
mars_yellow = (0.8900, 0.4400, 0.1000)
orange = (1.0000, 0.5000, 0.0000)
orange_red = (1.0000, 0.2706, 0.0000)
yellow_ochre = (0.8900, 0.5100, 0.0900)
# Yellows
aureoline_yellow = (1.0000, 0.6600, 0.1400)
banana = (0.8900, 0.8100, 0.3400)
cadmium_lemon = (1.0000, 0.8900, 0.0100)
cadmium_yellow = (1.0000, 0.6000, 0.0700)
cadmium_yellow_light = (1.0000, 0.6900, 0.0600)
gold = (1.0000, 0.8431, 0.0000)
goldenrod = (0.8549, 0.6471, 0.1255)
goldenrod_dark = (0.7216, 0.5255, 0.0431)
goldenrod_light = (0.9804, 0.9804, 0.8235)
goldenrod_pale = (0.9333, 0.9098, 0.6667)
light_goldenrod = (0.9333, 0.8667, 0.5098)
melon = (0.8900, 0.6600, 0.4100)
naples_yellow_deep = (1.0000, 0.6600, 0.0700)
yellow = (1.0000, 1.0000, 0.0000)
yellow_light = (1.0000, 1.0000, 0.8784)
# Greens
chartreuse = (0.4980, 1.0000, 0.0000)
chrome_oxide_green = (0.4000, 0.5000, 0.0800)
cinnabar_green = (0.3800, 0.7000, 0.1600)
cobalt_green = (0.2400, 0.5700, 0.2500)
emerald_green = (0.0000, 0.7900, 0.3400)
forest_green = (0.1333, 0.5451, 0.1333)
green = (0.0000, 1.0000, 0.0000)
green_dark = (0.0000, 0.3922, 0.0000)
green_pale = (0.5961, 0.9843, 0.5961)
green_yellow = (0.6784, 1.0000, 0.1843)
lawn_green = (0.4863, 0.9882, 0.0000)
lime_green = (0.1961, 0.8039, 0.1961)
mint = (0.7400, 0.9900, 0.7900)
olive = (0.2300, 0.3700, 0.1700)
olive_drab = (0.4196, 0.5569, 0.1373)
olive_green_dark = (0.3333, 0.4196, 0.1843)
permanent_green = (0.0400, 0.7900, 0.1700)
sap_green = (0.1900, 0.5000, 0.0800)
sea_green = (0.1804, 0.5451, 0.3412)
sea_green_dark = (0.5608, 0.7373, 0.5608)
sea_green_medium = (0.2353, 0.7020, 0.4431)
sea_green_light = (0.1255, 0.6980, 0.6667)
spring_green = (0.0000, 1.0000, 0.4980)
spring_green_medium = (0.0000, 0.9804, 0.6039)
terre_verte = (0.2200, 0.3700, 0.0600)
viridian_light = (0.4300, 1.0000, 0.4400)
yellow_green = (0.6039, 0.8039, 0.1961)
# Cyans
aquamarine = (0.4980, 1.0000, 0.8314)
aquamarine_medium = (0.4000, 0.8039, 0.6667)
cyan = (0.0000, 1.0000, 1.0000)
cyan_white = (0.8784, 1.0000, 1.0000)
turquoise = (0.2510, 0.8784, 0.8157)
turquoise_dark = (0.0000, 0.8078, 0.8196)
turquoise_medium = (0.2824, 0.8196, 0.8000)
turquoise_pale = (0.6863, 0.9333, 0.9333)
# Blues
alice_blue = (0.9412, 0.9725, 1.0000)
blue = (0.0000, 0.0000, 1.0000)
blue_light = (0.6784, 0.8471, 0.9020)
blue_medium = (0.0000, 0.0000, 0.8039)
cadet = (0.3725, 0.6196, 0.6275)
cobalt = (0.2400, 0.3500, 0.6700)
cornflower = (0.3922, 0.5843, 0.9294)
cerulean = (0.0200, 0.7200, 0.8000)
dodger_blue = (0.1176, 0.5647, 1.0000)
indigo = (0.0300, 0.1800, 0.3300)
manganese_blue = (0.0100, 0.6600, 0.6200)
midnight_blue = (0.0980, 0.0980, 0.4392)
navy = (0.0000, 0.0000, 0.5020)
peacock = (0.2000, 0.6300, 0.7900)
powder_blue = (0.6902, 0.8784, 0.9020)
royal_blue = (0.2549, 0.4118, 0.8824)
slate_blue = (0.4157, 0.3529, 0.8039)
slate_blue_dark = (0.2824, 0.2392, 0.5451)
slate_blue_light = (0.5176, 0.4392, 1.0000)
slate_blue_medium = (0.4824, 0.4078, 0.9333)
sky_blue = (0.5294, 0.8078, 0.9216)
sky_blue_deep = (0.0000, 0.7490, 1.0000)
sky_blue_light = (0.5294, 0.8078, 0.9804)
steel_blue = (0.2745, 0.5098, 0.7059)
steel_blue_light = (0.6902, 0.7686, 0.8706)
turquoise_blue = (0.0000, 0.7800, 0.5500)
ultramarine = (0.0700, 0.0400, 0.5600)
# Magentas
blue_violet = (0.5412, 0.1686, 0.8863)
cobalt_violet_deep = (0.5700, 0.1300, 0.6200)
magenta = (1.0000, 0.0000, 1.0000)
orchid = (0.8549, 0.4392, 0.8392)
orchid_dark = (0.6000, 0.1961, 0.8000)
orchid_medium = (0.7294, 0.3333, 0.8275)
permanent_red_violet = (0.8600, 0.1500, 0.2700)
plum = (0.8667, 0.6275, 0.8667)
purple = (0.6275, 0.1255, 0.9412)
purple_medium = (0.5765, 0.4392, 0.8588)
ultramarine_violet = (0.3600, 0.1400, 0.4300)
violet = (0.5600, 0.3700, 0.6000)
violet_dark = (0.5804, 0.0000, 0.8275)
violet_red = (0.8157, 0.1255, 0.5647)
violet_red_medium = (0.7804, 0.0824, 0.5216)
violet_red_pale = (0.8588, 0.4392, 0.5765)
| antique_white = (0.9804, 0.9216, 0.8431)
azure = (0.9412, 1.0, 1.0)
bisque = (1.0, 0.8941, 0.7686)
blanched_almond = (1.0, 0.9216, 0.8039)
cornsilk = (1.0, 0.9725, 0.8627)
eggshell = (0.99, 0.9, 0.79)
floral_white = (1.0, 0.9804, 0.9412)
gainsboro = (0.8627, 0.8627, 0.8627)
ghost_white = (0.9725, 0.9725, 1.0)
honeydew = (0.9412, 1.0, 0.9412)
ivory = (1.0, 1.0, 0.9412)
lavender = (0.902, 0.902, 0.9804)
lavender_blush = (1.0, 0.9412, 0.9608)
lemon_chiffon = (1.0, 0.9804, 0.8039)
linen = (0.9804, 0.9412, 0.902)
mint_cream = (0.9608, 1.0, 0.9804)
misty_rose = (1.0, 0.8941, 0.8824)
moccasin = (1.0, 0.8941, 0.7098)
navajo_white = (1.0, 0.8706, 0.6784)
old_lace = (0.9922, 0.9608, 0.902)
papaya_whip = (1.0, 0.9373, 0.8353)
peach_puff = (1.0, 0.8549, 0.7255)
seashell = (1.0, 0.9608, 0.9333)
snow = (1.0, 0.9804, 0.9804)
thistle = (0.8471, 0.749, 0.8471)
titanium_white = (0.99, 1.0, 0.94)
wheat = (0.9608, 0.8706, 0.702)
white = (1.0, 1.0, 1.0)
white_smoke = (0.9608, 0.9608, 0.9608)
zinc_white = (0.99, 0.97, 1.0)
cold_grey = (0.5, 0.54, 0.53)
dim_grey = (0.4118, 0.4118, 0.4118)
grey = (0.7529, 0.7529, 0.7529)
light_grey = (0.8275, 0.8275, 0.8275)
slate_grey = (0.4392, 0.502, 0.5647)
slate_grey_dark = (0.1843, 0.3098, 0.3098)
slate_grey_light = (0.4667, 0.5333, 0.6)
warm_grey = (0.5, 0.5, 0.41)
black = (0.0, 0.0, 0.0)
ivory_black = (0.16, 0.14, 0.13)
lamp_black = (0.18, 0.28, 0.23)
alizarin_crimson = (0.89, 0.15, 0.21)
brick = (0.61, 0.4, 0.12)
cadmium_red_deep = (0.89, 0.09, 0.05)
coral = (1.0, 0.498, 0.3137)
coral_light = (0.9412, 0.502, 0.502)
deep_pink = (1.0, 0.0784, 0.5765)
english_red = (0.83, 0.24, 0.1)
firebrick = (0.698, 0.1333, 0.1333)
geranium_lake = (0.89, 0.07, 0.19)
hot_pink = (1.0, 0.4118, 0.7059)
indian_red = (0.69, 0.09, 0.12)
light_salmon = (1.0, 0.6275, 0.4784)
madder_lake_deep = (0.89, 0.18, 0.19)
maroon = (0.6902, 0.1882, 0.3765)
pink = (1.0, 0.7529, 0.7961)
pink_light = (1.0, 0.7137, 0.7569)
raspberry = (0.53, 0.15, 0.34)
red = (1.0, 0.0, 0.0)
rose_madder = (0.89, 0.21, 0.22)
salmon = (0.9804, 0.502, 0.4471)
tomato = (1.0, 0.3882, 0.2784)
venetian_red = (0.83, 0.1, 0.12)
beige = (0.64, 0.58, 0.5)
brown = (0.5, 0.1647, 0.1647)
brown_madder = (0.86, 0.16, 0.16)
brown_ochre = (0.53, 0.26, 0.12)
burlywood = (0.8706, 0.7216, 0.5294)
burnt_sienna = (0.54, 0.21, 0.06)
burnt_umber = (0.54, 0.2, 0.14)
chocolate = (0.8235, 0.4118, 0.1176)
deep_ochre = (0.45, 0.24, 0.1)
flesh = (1.0, 0.49, 0.25)
flesh_ochre = (1.0, 0.34, 0.13)
gold_ochre = (0.78, 0.47, 0.15)
greenish_umber = (1.0, 0.24, 0.05)
khaki = (0.9412, 0.902, 0.549)
khaki_dark = (0.7412, 0.7176, 0.4196)
light_beige = (0.9608, 0.9608, 0.8627)
peru = (0.8039, 0.5216, 0.2471)
rosy_brown = (0.7373, 0.5608, 0.5608)
raw_sienna = (0.78, 0.38, 0.08)
raw_umber = (0.45, 0.29, 0.07)
sepia = (0.37, 0.15, 0.07)
sienna = (0.6275, 0.3216, 0.1765)
saddle_brown = (0.5451, 0.2706, 0.0745)
sandy_brown = (0.9569, 0.6431, 0.3765)
tan = (0.8235, 0.7059, 0.549)
van_dyke_brown = (0.37, 0.15, 0.02)
cadmium_orange = (1.0, 0.38, 0.01)
cadmium_red_light = (1.0, 0.01, 0.05)
carrot = (0.93, 0.57, 0.13)
dark_orange = (1.0, 0.549, 0.0)
mars_orange = (0.59, 0.27, 0.08)
mars_yellow = (0.89, 0.44, 0.1)
orange = (1.0, 0.5, 0.0)
orange_red = (1.0, 0.2706, 0.0)
yellow_ochre = (0.89, 0.51, 0.09)
aureoline_yellow = (1.0, 0.66, 0.14)
banana = (0.89, 0.81, 0.34)
cadmium_lemon = (1.0, 0.89, 0.01)
cadmium_yellow = (1.0, 0.6, 0.07)
cadmium_yellow_light = (1.0, 0.69, 0.06)
gold = (1.0, 0.8431, 0.0)
goldenrod = (0.8549, 0.6471, 0.1255)
goldenrod_dark = (0.7216, 0.5255, 0.0431)
goldenrod_light = (0.9804, 0.9804, 0.8235)
goldenrod_pale = (0.9333, 0.9098, 0.6667)
light_goldenrod = (0.9333, 0.8667, 0.5098)
melon = (0.89, 0.66, 0.41)
naples_yellow_deep = (1.0, 0.66, 0.07)
yellow = (1.0, 1.0, 0.0)
yellow_light = (1.0, 1.0, 0.8784)
chartreuse = (0.498, 1.0, 0.0)
chrome_oxide_green = (0.4, 0.5, 0.08)
cinnabar_green = (0.38, 0.7, 0.16)
cobalt_green = (0.24, 0.57, 0.25)
emerald_green = (0.0, 0.79, 0.34)
forest_green = (0.1333, 0.5451, 0.1333)
green = (0.0, 1.0, 0.0)
green_dark = (0.0, 0.3922, 0.0)
green_pale = (0.5961, 0.9843, 0.5961)
green_yellow = (0.6784, 1.0, 0.1843)
lawn_green = (0.4863, 0.9882, 0.0)
lime_green = (0.1961, 0.8039, 0.1961)
mint = (0.74, 0.99, 0.79)
olive = (0.23, 0.37, 0.17)
olive_drab = (0.4196, 0.5569, 0.1373)
olive_green_dark = (0.3333, 0.4196, 0.1843)
permanent_green = (0.04, 0.79, 0.17)
sap_green = (0.19, 0.5, 0.08)
sea_green = (0.1804, 0.5451, 0.3412)
sea_green_dark = (0.5608, 0.7373, 0.5608)
sea_green_medium = (0.2353, 0.702, 0.4431)
sea_green_light = (0.1255, 0.698, 0.6667)
spring_green = (0.0, 1.0, 0.498)
spring_green_medium = (0.0, 0.9804, 0.6039)
terre_verte = (0.22, 0.37, 0.06)
viridian_light = (0.43, 1.0, 0.44)
yellow_green = (0.6039, 0.8039, 0.1961)
aquamarine = (0.498, 1.0, 0.8314)
aquamarine_medium = (0.4, 0.8039, 0.6667)
cyan = (0.0, 1.0, 1.0)
cyan_white = (0.8784, 1.0, 1.0)
turquoise = (0.251, 0.8784, 0.8157)
turquoise_dark = (0.0, 0.8078, 0.8196)
turquoise_medium = (0.2824, 0.8196, 0.8)
turquoise_pale = (0.6863, 0.9333, 0.9333)
alice_blue = (0.9412, 0.9725, 1.0)
blue = (0.0, 0.0, 1.0)
blue_light = (0.6784, 0.8471, 0.902)
blue_medium = (0.0, 0.0, 0.8039)
cadet = (0.3725, 0.6196, 0.6275)
cobalt = (0.24, 0.35, 0.67)
cornflower = (0.3922, 0.5843, 0.9294)
cerulean = (0.02, 0.72, 0.8)
dodger_blue = (0.1176, 0.5647, 1.0)
indigo = (0.03, 0.18, 0.33)
manganese_blue = (0.01, 0.66, 0.62)
midnight_blue = (0.098, 0.098, 0.4392)
navy = (0.0, 0.0, 0.502)
peacock = (0.2, 0.63, 0.79)
powder_blue = (0.6902, 0.8784, 0.902)
royal_blue = (0.2549, 0.4118, 0.8824)
slate_blue = (0.4157, 0.3529, 0.8039)
slate_blue_dark = (0.2824, 0.2392, 0.5451)
slate_blue_light = (0.5176, 0.4392, 1.0)
slate_blue_medium = (0.4824, 0.4078, 0.9333)
sky_blue = (0.5294, 0.8078, 0.9216)
sky_blue_deep = (0.0, 0.749, 1.0)
sky_blue_light = (0.5294, 0.8078, 0.9804)
steel_blue = (0.2745, 0.5098, 0.7059)
steel_blue_light = (0.6902, 0.7686, 0.8706)
turquoise_blue = (0.0, 0.78, 0.55)
ultramarine = (0.07, 0.04, 0.56)
blue_violet = (0.5412, 0.1686, 0.8863)
cobalt_violet_deep = (0.57, 0.13, 0.62)
magenta = (1.0, 0.0, 1.0)
orchid = (0.8549, 0.4392, 0.8392)
orchid_dark = (0.6, 0.1961, 0.8)
orchid_medium = (0.7294, 0.3333, 0.8275)
permanent_red_violet = (0.86, 0.15, 0.27)
plum = (0.8667, 0.6275, 0.8667)
purple = (0.6275, 0.1255, 0.9412)
purple_medium = (0.5765, 0.4392, 0.8588)
ultramarine_violet = (0.36, 0.14, 0.43)
violet = (0.56, 0.37, 0.6)
violet_dark = (0.5804, 0.0, 0.8275)
violet_red = (0.8157, 0.1255, 0.5647)
violet_red_medium = (0.7804, 0.0824, 0.5216)
violet_red_pale = (0.8588, 0.4392, 0.5765) |
class Course:
def __init__(self, records: dict = None):
self.id: int = records.get('Id')
self.name: str = records.get('CourseName')
self.about: str = records.get('About')
self.about_exam: str = records.get('About Exam')
self.site: str = records.get('Site')
| class Course:
def __init__(self, records: dict=None):
self.id: int = records.get('Id')
self.name: str = records.get('CourseName')
self.about: str = records.get('About')
self.about_exam: str = records.get('About Exam')
self.site: str = records.get('Site') |
seconds = int(input("Enter number of seconds:"))
minutes = seconds // 60
seconds = seconds % 60
hours = minutes // 60
minutes = minutes % 60
days = hours // 24
hours = hours % 24
print(f"{days} day(s), {hours} hour(s), {minutes} minute(s), and {seconds} second(s).") | seconds = int(input('Enter number of seconds:'))
minutes = seconds // 60
seconds = seconds % 60
hours = minutes // 60
minutes = minutes % 60
days = hours // 24
hours = hours % 24
print(f'{days} day(s), {hours} hour(s), {minutes} minute(s), and {seconds} second(s).') |
"""
InvenTree API version information
"""
# InvenTree API version
INVENTREE_API_VERSION = 43
"""
Increment this API version number whenever there is a significant change to the API that any clients need to know about
v43 -> 2022-04-26 : https://github.com/inventree/InvenTree/pull/2875
- Adds API detail endpoint for PartSalePrice model
- Adds API detail endpoint for PartInternalPrice model
v42 -> 2022-04-26 : https://github.com/inventree/InvenTree/pull/2833
- Adds variant stock information to the Part and BomItem serializers
v41 -> 2022-04-26
- Fixes 'variant_of' filter for Part list endpoint
v40 -> 2022-04-19
- Adds ability to filter StockItem list by "tracked" parameter
- This checks the serial number or batch code fields
v39 -> 2022-04-18
- Adds ability to filter StockItem list by "has_batch" parameter
v38 -> 2022-04-14 : https://github.com/inventree/InvenTree/pull/2828
- Adds the ability to include stock test results for "installed items"
v37 -> 2022-04-07 : https://github.com/inventree/InvenTree/pull/2806
- Adds extra stock availability information to the BomItem serializer
v36 -> 2022-04-03
- Adds ability to filter part list endpoint by unallocated_stock argument
v35 -> 2022-04-01 : https://github.com/inventree/InvenTree/pull/2797
- Adds stock allocation information to the Part API
- Adds calculated field for "unallocated_quantity"
v34 -> 2022-03-25
- Change permissions for "plugin list" API endpoint (now allows any authenticated user)
v33 -> 2022-03-24
- Adds "plugins_enabled" information to root API endpoint
v32 -> 2022-03-19
- Adds "parameters" detail to Part API endpoint (use ¶meters=true)
- Adds ability to filter PartParameterTemplate API by Part instance
- Adds ability to filter PartParameterTemplate API by PartCategory instance
v31 -> 2022-03-14
- Adds "updated" field to SupplierPriceBreakList and SupplierPriceBreakDetail API endpoints
v30 -> 2022-03-09
- Adds "exclude_location" field to BuildAutoAllocation API endpoint
- Allows BuildItem API endpoint to be filtered by BomItem relation
v29 -> 2022-03-08
- Adds "scheduling" endpoint for predicted stock scheduling information
v28 -> 2022-03-04
- Adds an API endpoint for auto allocation of stock items against a build order
- Ref: https://github.com/inventree/InvenTree/pull/2713
v27 -> 2022-02-28
- Adds target_date field to individual line items for purchase orders and sales orders
v26 -> 2022-02-17
- Adds API endpoint for uploading a BOM file and extracting data
v25 -> 2022-02-17
- Adds ability to filter "part" list endpoint by "in_bom_for" argument
v24 -> 2022-02-10
- Adds API endpoint for deleting (cancelling) build order outputs
v23 -> 2022-02-02
- Adds API endpoints for managing plugin classes
- Adds API endpoints for managing plugin settings
v22 -> 2021-12-20
- Adds API endpoint to "merge" multiple stock items
v21 -> 2021-12-04
- Adds support for multiple "Shipments" against a SalesOrder
- Refactors process for stock allocation against a SalesOrder
v20 -> 2021-12-03
- Adds ability to filter POLineItem endpoint by "base_part"
- Adds optional "order_detail" to POLineItem list endpoint
v19 -> 2021-12-02
- Adds the ability to filter the StockItem API by "part_tree"
- Returns only stock items which match a particular part.tree_id field
v18 -> 2021-11-15
- Adds the ability to filter BomItem API by "uses" field
- This returns a list of all BomItems which "use" the specified part
- Includes inherited BomItem objects
v17 -> 2021-11-09
- Adds API endpoints for GLOBAL and USER settings objects
- Ref: https://github.com/inventree/InvenTree/pull/2275
v16 -> 2021-10-17
- Adds API endpoint for completing build order outputs
v15 -> 2021-10-06
- Adds detail endpoint for SalesOrderAllocation model
- Allows use of the API forms interface for adjusting SalesOrderAllocation objects
v14 -> 2021-10-05
- Stock adjustment actions API is improved, using native DRF serializer support
- However adjustment actions now only support 'pk' as a lookup field
v13 -> 2021-10-05
- Adds API endpoint to allocate stock items against a BuildOrder
- Updates StockItem API with improved filtering against BomItem data
v12 -> 2021-09-07
- Adds API endpoint to receive stock items against a PurchaseOrder
v11 -> 2021-08-26
- Adds "units" field to PartBriefSerializer
- This allows units to be introspected from the "part_detail" field in the StockItem serializer
v10 -> 2021-08-23
- Adds "purchase_price_currency" to StockItem serializer
- Adds "purchase_price_string" to StockItem serializer
- Purchase price is now writable for StockItem serializer
v9 -> 2021-08-09
- Adds "price_string" to part pricing serializers
v8 -> 2021-07-19
- Refactors the API interface for SupplierPart and ManufacturerPart models
- ManufacturerPart objects can no longer be created via the SupplierPart API endpoint
v7 -> 2021-07-03
- Introduced the concept of "API forms" in https://github.com/inventree/InvenTree/pull/1716
- API OPTIONS endpoints provide comprehensive field metedata
- Multiple new API endpoints added for database models
v6 -> 2021-06-23
- Part and Company images can now be directly uploaded via the REST API
v5 -> 2021-06-21
- Adds API interface for manufacturer part parameters
v4 -> 2021-06-01
- BOM items can now accept "variant stock" to be assigned against them
- Many slight API tweaks were needed to get this to work properly!
v3 -> 2021-05-22:
- The updated StockItem "history tracking" now uses a different interface
"""
| """
InvenTree API version information
"""
inventree_api_version = 43
'\nIncrement this API version number whenever there is a significant change to the API that any clients need to know about\n\nv43 -> 2022-04-26 : https://github.com/inventree/InvenTree/pull/2875\n - Adds API detail endpoint for PartSalePrice model\n - Adds API detail endpoint for PartInternalPrice model\n\nv42 -> 2022-04-26 : https://github.com/inventree/InvenTree/pull/2833\n - Adds variant stock information to the Part and BomItem serializers\n\nv41 -> 2022-04-26\n - Fixes \'variant_of\' filter for Part list endpoint\n\nv40 -> 2022-04-19\n - Adds ability to filter StockItem list by "tracked" parameter\n - This checks the serial number or batch code fields\n\nv39 -> 2022-04-18\n - Adds ability to filter StockItem list by "has_batch" parameter\n\nv38 -> 2022-04-14 : https://github.com/inventree/InvenTree/pull/2828\n - Adds the ability to include stock test results for "installed items"\n\nv37 -> 2022-04-07 : https://github.com/inventree/InvenTree/pull/2806\n - Adds extra stock availability information to the BomItem serializer\n\nv36 -> 2022-04-03\n - Adds ability to filter part list endpoint by unallocated_stock argument\n\nv35 -> 2022-04-01 : https://github.com/inventree/InvenTree/pull/2797\n - Adds stock allocation information to the Part API\n - Adds calculated field for "unallocated_quantity"\n\nv34 -> 2022-03-25\n - Change permissions for "plugin list" API endpoint (now allows any authenticated user)\n\nv33 -> 2022-03-24\n - Adds "plugins_enabled" information to root API endpoint\n\nv32 -> 2022-03-19\n - Adds "parameters" detail to Part API endpoint (use ¶meters=true)\n - Adds ability to filter PartParameterTemplate API by Part instance\n - Adds ability to filter PartParameterTemplate API by PartCategory instance\n\nv31 -> 2022-03-14\n - Adds "updated" field to SupplierPriceBreakList and SupplierPriceBreakDetail API endpoints\n\nv30 -> 2022-03-09\n - Adds "exclude_location" field to BuildAutoAllocation API endpoint\n - Allows BuildItem API endpoint to be filtered by BomItem relation\n\nv29 -> 2022-03-08\n - Adds "scheduling" endpoint for predicted stock scheduling information\n\nv28 -> 2022-03-04\n - Adds an API endpoint for auto allocation of stock items against a build order\n - Ref: https://github.com/inventree/InvenTree/pull/2713\n\nv27 -> 2022-02-28\n - Adds target_date field to individual line items for purchase orders and sales orders\n\nv26 -> 2022-02-17\n - Adds API endpoint for uploading a BOM file and extracting data\n\nv25 -> 2022-02-17\n - Adds ability to filter "part" list endpoint by "in_bom_for" argument\n\nv24 -> 2022-02-10\n - Adds API endpoint for deleting (cancelling) build order outputs\n\nv23 -> 2022-02-02\n - Adds API endpoints for managing plugin classes\n - Adds API endpoints for managing plugin settings\n\nv22 -> 2021-12-20\n - Adds API endpoint to "merge" multiple stock items\n\nv21 -> 2021-12-04\n - Adds support for multiple "Shipments" against a SalesOrder\n - Refactors process for stock allocation against a SalesOrder\n\nv20 -> 2021-12-03\n - Adds ability to filter POLineItem endpoint by "base_part"\n - Adds optional "order_detail" to POLineItem list endpoint\n\nv19 -> 2021-12-02\n - Adds the ability to filter the StockItem API by "part_tree"\n - Returns only stock items which match a particular part.tree_id field\n\nv18 -> 2021-11-15\n - Adds the ability to filter BomItem API by "uses" field\n - This returns a list of all BomItems which "use" the specified part\n - Includes inherited BomItem objects\n\nv17 -> 2021-11-09\n - Adds API endpoints for GLOBAL and USER settings objects\n - Ref: https://github.com/inventree/InvenTree/pull/2275\n\nv16 -> 2021-10-17\n - Adds API endpoint for completing build order outputs\n\nv15 -> 2021-10-06\n - Adds detail endpoint for SalesOrderAllocation model\n - Allows use of the API forms interface for adjusting SalesOrderAllocation objects\n\nv14 -> 2021-10-05\n - Stock adjustment actions API is improved, using native DRF serializer support\n - However adjustment actions now only support \'pk\' as a lookup field\n\nv13 -> 2021-10-05\n - Adds API endpoint to allocate stock items against a BuildOrder\n - Updates StockItem API with improved filtering against BomItem data\n\nv12 -> 2021-09-07\n - Adds API endpoint to receive stock items against a PurchaseOrder\n\nv11 -> 2021-08-26\n - Adds "units" field to PartBriefSerializer\n - This allows units to be introspected from the "part_detail" field in the StockItem serializer\n\nv10 -> 2021-08-23\n - Adds "purchase_price_currency" to StockItem serializer\n - Adds "purchase_price_string" to StockItem serializer\n - Purchase price is now writable for StockItem serializer\n\nv9 -> 2021-08-09\n - Adds "price_string" to part pricing serializers\n\nv8 -> 2021-07-19\n - Refactors the API interface for SupplierPart and ManufacturerPart models\n - ManufacturerPart objects can no longer be created via the SupplierPart API endpoint\n\nv7 -> 2021-07-03\n - Introduced the concept of "API forms" in https://github.com/inventree/InvenTree/pull/1716\n - API OPTIONS endpoints provide comprehensive field metedata\n - Multiple new API endpoints added for database models\n\nv6 -> 2021-06-23\n - Part and Company images can now be directly uploaded via the REST API\n\nv5 -> 2021-06-21\n - Adds API interface for manufacturer part parameters\n\nv4 -> 2021-06-01\n - BOM items can now accept "variant stock" to be assigned against them\n - Many slight API tweaks were needed to get this to work properly!\n\nv3 -> 2021-05-22:\n - The updated StockItem "history tracking" now uses a different interface\n\n' |
# Interval List Intersections
class Solution:
def intervalIntersection(self, firstList, secondList):
fl, sl = len(firstList), len(secondList)
fi, si = 0, 0
inter = []
while fi < fl and si < sl:
f, s = firstList[fi], secondList[si]
if s[0] <= f[1] <= s[1]:
inter.append([max(s[0], f[0]), f[1]])
fi += 1
elif f[0] <= s[1] <= f[1]:
inter.append([max(s[0], f[0]), s[1]])
si += 1
else:
if f[1] > s[1]:
si += 1
else:
fi += 1
return inter
if __name__ == "__main__":
sol = Solution()
firstList = [[0,2],[5,10],[13,23],[24,25]]
secondList = [[1,5],[8,12],[15,24],[25,26]]
firstList = [[1,3],[5,9]]
secondList = []
print(sol.intervalIntersection(firstList, secondList))
| class Solution:
def interval_intersection(self, firstList, secondList):
(fl, sl) = (len(firstList), len(secondList))
(fi, si) = (0, 0)
inter = []
while fi < fl and si < sl:
(f, s) = (firstList[fi], secondList[si])
if s[0] <= f[1] <= s[1]:
inter.append([max(s[0], f[0]), f[1]])
fi += 1
elif f[0] <= s[1] <= f[1]:
inter.append([max(s[0], f[0]), s[1]])
si += 1
elif f[1] > s[1]:
si += 1
else:
fi += 1
return inter
if __name__ == '__main__':
sol = solution()
first_list = [[0, 2], [5, 10], [13, 23], [24, 25]]
second_list = [[1, 5], [8, 12], [15, 24], [25, 26]]
first_list = [[1, 3], [5, 9]]
second_list = []
print(sol.intervalIntersection(firstList, secondList)) |
class InvalidParameter:
def __init__(self, reason: str):
self.reason = reason
| class Invalidparameter:
def __init__(self, reason: str):
self.reason = reason |
RESERVED_SUBSTITUTIONS = {
0x1D455: 0x210E, 0x1D49D: 0x212C, 0x1D4A0: 0x2130, 0x1D4A1: 0x2131,
0x1D4A3: 0x210B, 0x1D4A4: 0x2110, 0x1D4A7: 0x2112, 0x1D4A8: 0x2133,
0x1D4AD: 0x211B, 0x1D4BA: 0x212F, 0x1D4BC: 0x210A, 0x1D4C4: 0x2134,
0x1D506: 0x212D, 0x1D50B: 0x210C, 0x1D50C: 0x2111, 0x1D515: 0x211C,
0x1D51D: 0x2128, 0x1D53A: 0x2102, 0x1D53F: 0x210D, 0x1D545: 0x2115,
0x1D547: 0x2119, 0x1D548: 0x211A, 0x1D549: 0x211D, 0x1D551: 0x2124,
}
_chr = lambda n: chr(RESERVED_SUBSTITUTIONS.get(n, n))
MATHEMATICAL_BOLD_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D400, 0x1D41A)))
MATHEMATICAL_BOLD_SMALL_LETTERS = tuple(map(_chr, range(0x1D41A, 0x1D434)))
MATHEMATICAL_ITALIC_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D434, 0x1D44E)))
MATHEMATICAL_ITALIC_SMALL_LETTERS = tuple(map(_chr, range(0x1D44E, 0x1D468)))
MATHEMATICAL_BOLD_ITALIC_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D468, 0x1D482)))
MATHEMATICAL_BOLD_ITALIC_SMALL_LETTERS = tuple(map(_chr, range(0x1D482, 0x1D49C)))
MATHEMATICAL_SCRIPT_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D49C, 0x1D4B6)))
MATHEMATICAL_SCRIPT_SMALL_LETTERS = tuple(map(_chr, range(0x1D4B6, 0x1D4D0)))
MATHEMATICAL_BOLD_SCRIPT_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D4D0, 0x1D4EA)))
MATHEMATICAL_BOLD_SCRIPT_SMALL_LETTERS = tuple(map(_chr, range(0x1D4EA, 0x1D504)))
MATHEMATICAL_FRAKTUR_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D504, 0x1D51E)))
MATHEMATICAL_FRAKTUR_SMALL_LETTERS = tuple(map(_chr, range(0x1D51E, 0x1D538)))
MATHEMATICAL_DOUBLE_STRUCK_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D538, 0x1D552)))
MATHEMATICAL_DOUBLE_STRUCK_SMALL_LETTERS = tuple(map(_chr, range(0x1D552, 0x1D56C)))
MATHEMATICAL_BOLD_FRAKTUR_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D56C, 0x1D586)))
MATHEMATICAL_BOLD_FRAKTUR_SMALL_LETTERS = tuple(map(_chr, range(0x1D586, 0x1D5A0)))
MATHEMATICAL_SANS_SERIF_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D5A0, 0x1D5BA)))
MATHEMATICAL_SANS_SERIF_SMALL_LETTERS = tuple(map(_chr, range(0x1D5BA, 0x1D5D4)))
MATHEMATICAL_SANS_SERIF_BOLD_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D5D4, 0x1D5EE)))
MATHEMATICAL_SANS_SERIF_BOLD_SMALL_LETTERS = tuple(map(_chr, range(0x1D5EE, 0x1D608)))
MATHEMATICAL_SANS_SERIF_ITALIC_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D608, 0x1D622)))
MATHEMATICAL_SANS_SERIF_ITALIC_SMALL_LETTERS = tuple(map(_chr, range(0x1D622, 0x1D63C)))
MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D63C, 0x1D656)))
MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_SMALL_LETTERS = tuple(map(_chr, range(0x1D656, 0x1D670)))
MATHEMATICAL_MONOSPACE_CAPITAL_LETTERS = tuple(map(_chr, range(0x1D670, 0x1D68A)))
MATHEMATICAL_MONOSPACE_SMALL_LETTERS = tuple(map(_chr, range(0x1D68A, 0x1D6A4)))
MATHEMATICAL_BOLD_GREEK_LETTERS = tuple(map(_chr, range(0x1D6A8, 0x1D6E2)))
MATHEMATICAL_ITALIC_GREEK_LETTERS = tuple(map(_chr, range(0x1D6E2, 0x1D71C)))
MATHEMATICAL_BOLD_ITALIC_GREEK_LETTERS = tuple(map(_chr, range(0x1D71C, 0x1D756)))
MATHEMATICAL_SANS_SERIF_BOLD_GREEK_LETTERS = tuple(map(_chr, range(0x1D756, 0x1D790)))
MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_GREEK_LETTERS = tuple(map(_chr, range(0x1D790, 0x1D7CA)))
MATHEMATICAL_BOLD_DIGITS = tuple(map(_chr, range(0x1D7CE, 0x1D7D8)))
MATHEMATICAL_DOUBLE_STRUCK_DIGITS = tuple(map(_chr, range(0x1D7D8, 0x1D7E2)))
MATHEMATICAL_SANS_SERIF_DIGITS = tuple(map(_chr, range(0x1D7E2, 0x1D7EC)))
MATHEMATICAL_SANS_SERIF_BOLD_DIGITS = tuple(map(_chr, range(0x1D7EC, 0x1D7F6)))
MATHEMATICAL_MONOSPACE_DIGITS = tuple(map(_chr, range(0x1D7F6, 0x1D800)))
# TODO:
# 1D6A4 MATHEMATICAL ITALIC SMALL DOTLESS I (\imath)
# 1D6A5 MATHEMATICAL ITALIC SMALL DOTLESS J (\jmath)
# 1D7CA MATHEMATICAL BOLD CAPITAL DIGAMMA (\Digamma)
# 1D7CB MATHEMATICAL BOLD SMALL DIGAMMA (\digamma)
LATEX_GREEK_COMMANDS = (
"\\\\Alpha", "\\\\Beta", "\\\\Gamma", "\\\\Delta", "\\\\Epsilon",
"\\\\Zeta", "\\\\Eta", "\\\\Theta", "\\\\Iota", "\\\\Kappa", "\\\\Lambda",
"\\\\Mu", "\\\\Nu", "\\\\Xi", "\\\\Omicron", "\\\\Pi", "\\\\Rho",
"\\\\varTheta", "\\\\Sigma", "\\\\Tau", "\\\\Upsilon", "\\\\Phi",
"\\\\Chi", "\\\\Psi", "\\\\Omega", "\\\\nabla", "\\\\alpha", "\\\\beta",
"\\\\gamma", "\\\\delta", "\\\\varepsilon", "\\\\zeta", "\\\\eta",
"\\\\theta", "\\\\iota", "\\\\kappa", "\\\\lambda", "\\\\mu", "\\\\nu",
"\\\\xi", "\\\\omicron", "\\\\pi", "\\\\rho", "\\\\varsigma", "\\\\sigma",
"\\\\tau", "\\\\upsilon", "\\\\varphi", "\\\\chi", "\\\\psi", "\\\\omega",
"\\\\partial", "\\\\epsilon", "\\\\vartheta", "\\\\varkappa", "\\\\phi",
"\\\\varrho", "\\\\varpi")
LATEX_STYLE_COMMANDS = {
("mathbf", "mathbfup", "symbf", "symbfup"): (MATHEMATICAL_BOLD_CAPITAL_LETTERS, MATHEMATICAL_BOLD_SMALL_LETTERS, MATHEMATICAL_BOLD_GREEK_LETTERS, MATHEMATICAL_BOLD_DIGITS),
("mathit", "mathnormal", "symit", "symnormal"): (MATHEMATICAL_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_ITALIC_SMALL_LETTERS, MATHEMATICAL_ITALIC_GREEK_LETTERS, None),
("mathbfit", "symbfit", "boldsymbol", "bm"): (MATHEMATICAL_BOLD_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_BOLD_ITALIC_SMALL_LETTERS, MATHEMATICAL_BOLD_ITALIC_GREEK_LETTERS, None),
("mathcal", "mathscr", "symcal", "symscr"): (MATHEMATICAL_SCRIPT_CAPITAL_LETTERS, MATHEMATICAL_SCRIPT_SMALL_LETTERS, None, None),
("mathbfcal", "mathbfscr", "symbfcal", "symbfscr"): (MATHEMATICAL_BOLD_SCRIPT_CAPITAL_LETTERS, MATHEMATICAL_BOLD_SCRIPT_SMALL_LETTERS, None, None),
("mathfrak", "symfrak"): (MATHEMATICAL_FRAKTUR_CAPITAL_LETTERS, MATHEMATICAL_FRAKTUR_SMALL_LETTERS, None, None),
("mathbb", "symbb", "Bbb"): (MATHEMATICAL_DOUBLE_STRUCK_CAPITAL_LETTERS, MATHEMATICAL_DOUBLE_STRUCK_SMALL_LETTERS, None, MATHEMATICAL_DOUBLE_STRUCK_DIGITS),
("mathbffrak", "symbffrak"): (MATHEMATICAL_BOLD_FRAKTUR_CAPITAL_LETTERS, MATHEMATICAL_BOLD_FRAKTUR_SMALL_LETTERS, None, None),
("mathsf", "mathsfup", "symsf", "symsfup"): (MATHEMATICAL_SANS_SERIF_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_SMALL_LETTERS, None, MATHEMATICAL_SANS_SERIF_DIGITS),
("mathbfsf", "symbfsf"): (MATHEMATICAL_SANS_SERIF_BOLD_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_SMALL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_GREEK_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_DIGITS),
("mathsfit", "symsfit"): (MATHEMATICAL_SANS_SERIF_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_ITALIC_SMALL_LETTERS, None, None),
("mathbfsfit", "symbfsfit"): (MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_SMALL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_GREEK_LETTERS, None),
("mathtt", "symtt"): (MATHEMATICAL_MONOSPACE_CAPITAL_LETTERS, MATHEMATICAL_MONOSPACE_SMALL_LETTERS, None, MATHEMATICAL_MONOSPACE_DIGITS),
}
| reserved_substitutions = {119893: 8462, 119965: 8492, 119968: 8496, 119969: 8497, 119971: 8459, 119972: 8464, 119975: 8466, 119976: 8499, 119981: 8475, 119994: 8495, 119996: 8458, 120004: 8500, 120070: 8493, 120075: 8460, 120076: 8465, 120085: 8476, 120093: 8488, 120122: 8450, 120127: 8461, 120133: 8469, 120135: 8473, 120136: 8474, 120137: 8477, 120145: 8484}
_chr = lambda n: chr(RESERVED_SUBSTITUTIONS.get(n, n))
mathematical_bold_capital_letters = tuple(map(_chr, range(119808, 119834)))
mathematical_bold_small_letters = tuple(map(_chr, range(119834, 119860)))
mathematical_italic_capital_letters = tuple(map(_chr, range(119860, 119886)))
mathematical_italic_small_letters = tuple(map(_chr, range(119886, 119912)))
mathematical_bold_italic_capital_letters = tuple(map(_chr, range(119912, 119938)))
mathematical_bold_italic_small_letters = tuple(map(_chr, range(119938, 119964)))
mathematical_script_capital_letters = tuple(map(_chr, range(119964, 119990)))
mathematical_script_small_letters = tuple(map(_chr, range(119990, 120016)))
mathematical_bold_script_capital_letters = tuple(map(_chr, range(120016, 120042)))
mathematical_bold_script_small_letters = tuple(map(_chr, range(120042, 120068)))
mathematical_fraktur_capital_letters = tuple(map(_chr, range(120068, 120094)))
mathematical_fraktur_small_letters = tuple(map(_chr, range(120094, 120120)))
mathematical_double_struck_capital_letters = tuple(map(_chr, range(120120, 120146)))
mathematical_double_struck_small_letters = tuple(map(_chr, range(120146, 120172)))
mathematical_bold_fraktur_capital_letters = tuple(map(_chr, range(120172, 120198)))
mathematical_bold_fraktur_small_letters = tuple(map(_chr, range(120198, 120224)))
mathematical_sans_serif_capital_letters = tuple(map(_chr, range(120224, 120250)))
mathematical_sans_serif_small_letters = tuple(map(_chr, range(120250, 120276)))
mathematical_sans_serif_bold_capital_letters = tuple(map(_chr, range(120276, 120302)))
mathematical_sans_serif_bold_small_letters = tuple(map(_chr, range(120302, 120328)))
mathematical_sans_serif_italic_capital_letters = tuple(map(_chr, range(120328, 120354)))
mathematical_sans_serif_italic_small_letters = tuple(map(_chr, range(120354, 120380)))
mathematical_sans_serif_bold_italic_capital_letters = tuple(map(_chr, range(120380, 120406)))
mathematical_sans_serif_bold_italic_small_letters = tuple(map(_chr, range(120406, 120432)))
mathematical_monospace_capital_letters = tuple(map(_chr, range(120432, 120458)))
mathematical_monospace_small_letters = tuple(map(_chr, range(120458, 120484)))
mathematical_bold_greek_letters = tuple(map(_chr, range(120488, 120546)))
mathematical_italic_greek_letters = tuple(map(_chr, range(120546, 120604)))
mathematical_bold_italic_greek_letters = tuple(map(_chr, range(120604, 120662)))
mathematical_sans_serif_bold_greek_letters = tuple(map(_chr, range(120662, 120720)))
mathematical_sans_serif_bold_italic_greek_letters = tuple(map(_chr, range(120720, 120778)))
mathematical_bold_digits = tuple(map(_chr, range(120782, 120792)))
mathematical_double_struck_digits = tuple(map(_chr, range(120792, 120802)))
mathematical_sans_serif_digits = tuple(map(_chr, range(120802, 120812)))
mathematical_sans_serif_bold_digits = tuple(map(_chr, range(120812, 120822)))
mathematical_monospace_digits = tuple(map(_chr, range(120822, 120832)))
latex_greek_commands = ('\\\\Alpha', '\\\\Beta', '\\\\Gamma', '\\\\Delta', '\\\\Epsilon', '\\\\Zeta', '\\\\Eta', '\\\\Theta', '\\\\Iota', '\\\\Kappa', '\\\\Lambda', '\\\\Mu', '\\\\Nu', '\\\\Xi', '\\\\Omicron', '\\\\Pi', '\\\\Rho', '\\\\varTheta', '\\\\Sigma', '\\\\Tau', '\\\\Upsilon', '\\\\Phi', '\\\\Chi', '\\\\Psi', '\\\\Omega', '\\\\nabla', '\\\\alpha', '\\\\beta', '\\\\gamma', '\\\\delta', '\\\\varepsilon', '\\\\zeta', '\\\\eta', '\\\\theta', '\\\\iota', '\\\\kappa', '\\\\lambda', '\\\\mu', '\\\\nu', '\\\\xi', '\\\\omicron', '\\\\pi', '\\\\rho', '\\\\varsigma', '\\\\sigma', '\\\\tau', '\\\\upsilon', '\\\\varphi', '\\\\chi', '\\\\psi', '\\\\omega', '\\\\partial', '\\\\epsilon', '\\\\vartheta', '\\\\varkappa', '\\\\phi', '\\\\varrho', '\\\\varpi')
latex_style_commands = {('mathbf', 'mathbfup', 'symbf', 'symbfup'): (MATHEMATICAL_BOLD_CAPITAL_LETTERS, MATHEMATICAL_BOLD_SMALL_LETTERS, MATHEMATICAL_BOLD_GREEK_LETTERS, MATHEMATICAL_BOLD_DIGITS), ('mathit', 'mathnormal', 'symit', 'symnormal'): (MATHEMATICAL_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_ITALIC_SMALL_LETTERS, MATHEMATICAL_ITALIC_GREEK_LETTERS, None), ('mathbfit', 'symbfit', 'boldsymbol', 'bm'): (MATHEMATICAL_BOLD_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_BOLD_ITALIC_SMALL_LETTERS, MATHEMATICAL_BOLD_ITALIC_GREEK_LETTERS, None), ('mathcal', 'mathscr', 'symcal', 'symscr'): (MATHEMATICAL_SCRIPT_CAPITAL_LETTERS, MATHEMATICAL_SCRIPT_SMALL_LETTERS, None, None), ('mathbfcal', 'mathbfscr', 'symbfcal', 'symbfscr'): (MATHEMATICAL_BOLD_SCRIPT_CAPITAL_LETTERS, MATHEMATICAL_BOLD_SCRIPT_SMALL_LETTERS, None, None), ('mathfrak', 'symfrak'): (MATHEMATICAL_FRAKTUR_CAPITAL_LETTERS, MATHEMATICAL_FRAKTUR_SMALL_LETTERS, None, None), ('mathbb', 'symbb', 'Bbb'): (MATHEMATICAL_DOUBLE_STRUCK_CAPITAL_LETTERS, MATHEMATICAL_DOUBLE_STRUCK_SMALL_LETTERS, None, MATHEMATICAL_DOUBLE_STRUCK_DIGITS), ('mathbffrak', 'symbffrak'): (MATHEMATICAL_BOLD_FRAKTUR_CAPITAL_LETTERS, MATHEMATICAL_BOLD_FRAKTUR_SMALL_LETTERS, None, None), ('mathsf', 'mathsfup', 'symsf', 'symsfup'): (MATHEMATICAL_SANS_SERIF_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_SMALL_LETTERS, None, MATHEMATICAL_SANS_SERIF_DIGITS), ('mathbfsf', 'symbfsf'): (MATHEMATICAL_SANS_SERIF_BOLD_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_SMALL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_GREEK_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_DIGITS), ('mathsfit', 'symsfit'): (MATHEMATICAL_SANS_SERIF_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_ITALIC_SMALL_LETTERS, None, None), ('mathbfsfit', 'symbfsfit'): (MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_CAPITAL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_SMALL_LETTERS, MATHEMATICAL_SANS_SERIF_BOLD_ITALIC_GREEK_LETTERS, None), ('mathtt', 'symtt'): (MATHEMATICAL_MONOSPACE_CAPITAL_LETTERS, MATHEMATICAL_MONOSPACE_SMALL_LETTERS, None, MATHEMATICAL_MONOSPACE_DIGITS)} |
class Solution:
# @param A : tuple of integers
# @return an integer
def maxProduct(self, A):
m = -1
for i in range(len(A)):
p = A[i]
if p > m:
m = p
for j in range(i+1, len(A)):
a = A[i+1:j]
for k in a:
p *= k
if p > m:
m = p
return m
# print Solution().maxProduct([0]) | class Solution:
def max_product(self, A):
m = -1
for i in range(len(A)):
p = A[i]
if p > m:
m = p
for j in range(i + 1, len(A)):
a = A[i + 1:j]
for k in a:
p *= k
if p > m:
m = p
return m |
#a sample object
class animal:
#properties - details
size = 0
age = 0
color = ""
gender = ""
breed = ""
#actions
def __init__(self, size, age, color, gender, breed):
self.size = int(size)
self.age = int(age)
self.color = str(color)
self.gender = str(gender)
self.breed = str(breed)
def grow(self, growAmount):
self.size += growAmount
def getOlder(self):
self.age += 1
def dyeAnimal(self, color):
self.color = str(color) | class Animal:
size = 0
age = 0
color = ''
gender = ''
breed = ''
def __init__(self, size, age, color, gender, breed):
self.size = int(size)
self.age = int(age)
self.color = str(color)
self.gender = str(gender)
self.breed = str(breed)
def grow(self, growAmount):
self.size += growAmount
def get_older(self):
self.age += 1
def dye_animal(self, color):
self.color = str(color) |
grocery = ["Sugar", "Pizza", "Ice-Cream", 100]
print(grocery)
print(grocery[1])
numbers = [2, 5, 6, 9, 4]
print(numbers)
print(numbers[3])
print(numbers[0:4])
print(numbers[1:3])
print(numbers[::1])
print("\n")
numbers.sort()
print(numbers)
numbers.reverse()
print(numbers)
numbers.append(99)
print("\t", numbers)
numbers.insert(1, 1996)
print(numbers)
numbers.pop()
print(numbers) | grocery = ['Sugar', 'Pizza', 'Ice-Cream', 100]
print(grocery)
print(grocery[1])
numbers = [2, 5, 6, 9, 4]
print(numbers)
print(numbers[3])
print(numbers[0:4])
print(numbers[1:3])
print(numbers[::1])
print('\n')
numbers.sort()
print(numbers)
numbers.reverse()
print(numbers)
numbers.append(99)
print('\t', numbers)
numbers.insert(1, 1996)
print(numbers)
numbers.pop()
print(numbers) |
#!/usr/bin/env python3
# File listtree.py (2.x + 3.x)
class ListTree:
"""
Mix-in that returns an __str__ trace of the entire class and all
its object's attrs at and above self; run by print(), str() returns
constructed string; uses __X attr names to avoid impacting clients;
recurses to superclasses explicitly, uses str.format() for clarity.
"""
def __attrnames(self, obj, indent):
spaces = ' ' * (indent + 1)
result = ''
for attr in sorted(obj.__dict__):
if attr.startswith('__') and attr.endswith('__'):
result += spaces + '{0}\n'.format(attr)
else:
result += spaces + '{0}={1}\n'.format(attr, getattr(obj, attr))
return result
def __listclass(self, aClass, indent):
dots = '.' * indent
if aClass in self.__visited:
return '\n{0}<Class {1}:, address {2}: (see above)>\n'.format(
dots,
aClass.__name__,
id(aClass))
else:
self.__visited[aClass] = True
here = self.__attrnames(aClass, indent)
above = ''
for super in aClass.__bases__:
above += self.__listclass(super, indent + 4)
return '\n{0}<Class {1}:, address {2}:\n{3}{4}{5}'.format(
dots,
aClass.__name__,
id(aClass),
here, above,
dots)
def __str__(self):
self.__visited = {}
here = self.__attrnames(self, 0)
above = self.__listclass(self.__class__, 4)
return '<Instance of {0}, address {1}:\n{2}{3}>'.format(
self.__class__.__name__,
id(self),
here, above)
def tester(listerclass, sept=False):
class Super:
def __init__(self):
self.data1 = 'spam'
def ham(self):
pass
class Sub(Super, listerclass):
def __init__(self):
Super.__init__(self)
self.data2 = 'eggs'
self.data3 = 42
def spam(self):
pass
instance = Sub()
print(instance)
if sept:
print('-' * 80)
if __name__ == '__main__':
tester(ListTree)
| class Listtree:
"""
Mix-in that returns an __str__ trace of the entire class and all
its object's attrs at and above self; run by print(), str() returns
constructed string; uses __X attr names to avoid impacting clients;
recurses to superclasses explicitly, uses str.format() for clarity.
"""
def __attrnames(self, obj, indent):
spaces = ' ' * (indent + 1)
result = ''
for attr in sorted(obj.__dict__):
if attr.startswith('__') and attr.endswith('__'):
result += spaces + '{0}\n'.format(attr)
else:
result += spaces + '{0}={1}\n'.format(attr, getattr(obj, attr))
return result
def __listclass(self, aClass, indent):
dots = '.' * indent
if aClass in self.__visited:
return '\n{0}<Class {1}:, address {2}: (see above)>\n'.format(dots, aClass.__name__, id(aClass))
else:
self.__visited[aClass] = True
here = self.__attrnames(aClass, indent)
above = ''
for super in aClass.__bases__:
above += self.__listclass(super, indent + 4)
return '\n{0}<Class {1}:, address {2}:\n{3}{4}{5}'.format(dots, aClass.__name__, id(aClass), here, above, dots)
def __str__(self):
self.__visited = {}
here = self.__attrnames(self, 0)
above = self.__listclass(self.__class__, 4)
return '<Instance of {0}, address {1}:\n{2}{3}>'.format(self.__class__.__name__, id(self), here, above)
def tester(listerclass, sept=False):
class Super:
def __init__(self):
self.data1 = 'spam'
def ham(self):
pass
class Sub(Super, listerclass):
def __init__(self):
Super.__init__(self)
self.data2 = 'eggs'
self.data3 = 42
def spam(self):
pass
instance = sub()
print(instance)
if sept:
print('-' * 80)
if __name__ == '__main__':
tester(ListTree) |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'target_defaults': {
'conditions': [
['use_x11 == 1', {
'include_dirs': [
'<(DEPTH)/third_party/angle/include',
],
}],
],
},
'targets': [
{
'target_name': 'surface',
'type': '<(component)',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/ui/gl/gl.gyp:gl',
'<(DEPTH)/ui/ui.gyp:ui',
],
'sources': [
'accelerated_surface_mac.cc',
'accelerated_surface_mac.h',
'accelerated_surface_win.cc',
'accelerated_surface_win.h',
'io_surface_support_mac.cc',
'io_surface_support_mac.h',
'surface_export.h',
'transport_dib.h',
'transport_dib_android.cc',
'transport_dib_linux.cc',
'transport_dib_mac.cc',
'transport_dib_win.cc',
],
'defines': [
'SURFACE_IMPLEMENTATION',
],
'conditions': [
['use_aura==1', {
'sources/': [
['exclude', 'accelerated_surface_win.cc'],
['exclude', 'accelerated_surface_win.h'],
],
}],
],
},
],
}
| {'variables': {'chromium_code': 1}, 'target_defaults': {'conditions': [['use_x11 == 1', {'include_dirs': ['<(DEPTH)/third_party/angle/include']}]]}, 'targets': [{'target_name': 'surface', 'type': '<(component)', 'dependencies': ['<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/ui/gl/gl.gyp:gl', '<(DEPTH)/ui/ui.gyp:ui'], 'sources': ['accelerated_surface_mac.cc', 'accelerated_surface_mac.h', 'accelerated_surface_win.cc', 'accelerated_surface_win.h', 'io_surface_support_mac.cc', 'io_surface_support_mac.h', 'surface_export.h', 'transport_dib.h', 'transport_dib_android.cc', 'transport_dib_linux.cc', 'transport_dib_mac.cc', 'transport_dib_win.cc'], 'defines': ['SURFACE_IMPLEMENTATION'], 'conditions': [['use_aura==1', {'sources/': [['exclude', 'accelerated_surface_win.cc'], ['exclude', 'accelerated_surface_win.h']]}]]}]} |
{ 'application':{ 'type':'Application',
'name':'Test Sounds',
'backgrounds':
[
{ 'type':'Background',
'name':'Test Sounds',
'title':'Test Sounds',
'position':( 5, 5 ),
'size':( 300, 200 ),
'menubar':
{
'type':'MenuBar',
'menus':
[
{ 'type':'Menu',
'name':'File',
'label':'&File',
'items': [
{ 'type':'MenuItem', 'name':'menuFileExit', 'label':'Exit', 'command':'exit' } ] }
]
},
'components':
[
{ 'type':'TextField', 'name':'fldFilename', 'position':( 5, 4 ), 'size':( 200, -1 ), 'text':'anykey.wav' },
{ 'type':'Button', 'name':'btnFile', 'position':( 210, 5 ), 'size':( -1, -1), 'label':'Select File' },
{ 'type':'Button', 'name':'btnPlay', 'position':( 5, 40 ), 'size':( -1, -1 ), 'label':'Play' },
{ 'type':'CheckBox', 'name':'chkAsync', 'position':( 5, 70 ), 'size':( -1, -1 ), 'label':'Async I/O', 'checked':0 },
{ 'type':'CheckBox', 'name':'chkLoop', 'position':( 5, 90 ), 'size':( -1, -1 ), 'label':'Loop sound', 'checked':0 },
]
}
]
}
}
| {'application': {'type': 'Application', 'name': 'Test Sounds', 'backgrounds': [{'type': 'Background', 'name': 'Test Sounds', 'title': 'Test Sounds', 'position': (5, 5), 'size': (300, 200), 'menubar': {'type': 'MenuBar', 'menus': [{'type': 'Menu', 'name': 'File', 'label': '&File', 'items': [{'type': 'MenuItem', 'name': 'menuFileExit', 'label': 'Exit', 'command': 'exit'}]}]}, 'components': [{'type': 'TextField', 'name': 'fldFilename', 'position': (5, 4), 'size': (200, -1), 'text': 'anykey.wav'}, {'type': 'Button', 'name': 'btnFile', 'position': (210, 5), 'size': (-1, -1), 'label': 'Select File'}, {'type': 'Button', 'name': 'btnPlay', 'position': (5, 40), 'size': (-1, -1), 'label': 'Play'}, {'type': 'CheckBox', 'name': 'chkAsync', 'position': (5, 70), 'size': (-1, -1), 'label': 'Async I/O', 'checked': 0}, {'type': 'CheckBox', 'name': 'chkLoop', 'position': (5, 90), 'size': (-1, -1), 'label': 'Loop sound', 'checked': 0}]}]}} |
class WorksharingDisplaySettings(Element,IDisposable):
"""
WorksharingDisplaySettings controls how elements will appear when they are
displayed in any of the worksharing display modes.
"""
def CanUserHaveOverrides(self,username):
"""
CanUserHaveOverrides(self: WorksharingDisplaySettings,username: str) -> bool
Checks whether a single username can have customized graphic overrides.
username: The username to check.
Returns: False if the username is on the list of removed users,True otherwise.
"""
pass
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def GetAllUsersWithGraphicOverrides(self):
"""
GetAllUsersWithGraphicOverrides(self: WorksharingDisplaySettings) -> ICollection[str]
Returns all usernames that have graphic overrides. This list consists of
all users included in the user table + all users who have explicitly been
assigned overrides.
Returns: All usernames that have been assigned graphic overrides.
"""
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def GetGraphicOverrides(self,*__args):
"""
GetGraphicOverrides(self: WorksharingDisplaySettings,statusInCentral: ModelUpdatesStatus) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides assigned to a particular model update status.
statusInCentral: The model update status of interest.
Returns: Returns the graphic overrides assigned to the model update status.
GetGraphicOverrides(self: WorksharingDisplaySettings,ownershipStatus: CheckoutStatus) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides associated with a particular ownership status.
ownershipStatus: The ownership status of interest.
Returns: Returns the graphic overrides assigned to a particular ownership status.
GetGraphicOverrides(self: WorksharingDisplaySettings,worksetId: WorksetId) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides assigned to elements in a particular workset.
worksetId: The workset id of interest. This must be a user workset.
Returns: Returns the graphic overrides assigned to the workset.
GetGraphicOverrides(self: WorksharingDisplaySettings,username: str) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides assigned for elements owned by a particular user.
username: The username of a particular user.
Returns: The graphic overrides assigned to this user.
"""
pass
@staticmethod
def GetOrCreateWorksharingDisplaySettings(doc):
"""
GetOrCreateWorksharingDisplaySettings(doc: Document) -> WorksharingDisplaySettings
Returns the worksharing display settings for the document,creating
new
settings for the current user if necessary.
doc: The document of interest.
Returns: The worksharing display settings for the document.
"""
pass
def GetRemovedUsers(self):
"""
GetRemovedUsers(self: WorksharingDisplaySettings) -> ICollection[str]
Returns the set of users who have been explicitly removed from the settings.
Returns: Users who have been explicitly removed from the list.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def RemoveUsers(self,document,usersToRemove,usersActuallyRemoved):
""" RemoveUsers(self: WorksharingDisplaySettings,document: Document,usersToRemove: ICollection[str]) -> ICollection[str] """
pass
def RestoreUsers(self,usersToRestore):
""" RestoreUsers(self: WorksharingDisplaySettings,usersToRestore: ICollection[str]) -> int """
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def SetGraphicOverrides(self,*__args):
"""
SetGraphicOverrides(self: WorksharingDisplaySettings,status: ModelUpdatesStatus,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements with a particular status in the
central model.
status: The status in the central model.
overrides: The desired graphic overrides for this status.
SetGraphicOverrides(self: WorksharingDisplaySettings,username: str,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements owned by a particular user.
The username cannot be on the list of removed usernames.
username: The username of the desired user.
overrides: The desired graphic overrides for this user.
SetGraphicOverrides(self: WorksharingDisplaySettings,worksetId: WorksetId,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements in a particular user workset.
worksetId: The workset of interest,which must be a user workset.
overrides: The desired graphic overrides for this workset.
SetGraphicOverrides(self: WorksharingDisplaySettings,status: CheckoutStatus,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements with a particular ownership
status.
status: The ownership status of interest.
overrides: The desired graphic overrides for this ownership status.
"""
pass
def UserHasGraphicOverrides(self,username):
"""
UserHasGraphicOverrides(self: WorksharingDisplaySettings,username: str) -> bool
Checks whether there are graphic overrides that would apply to elements
owned by the given user in the "Individual Owners" display mode.
username: The username to check
Returns: True if there are graphic overrides assigned to the username,false otherwise.
"""
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
| class Worksharingdisplaysettings(Element, IDisposable):
"""
WorksharingDisplaySettings controls how elements will appear when they are
displayed in any of the worksharing display modes.
"""
def can_user_have_overrides(self, username):
"""
CanUserHaveOverrides(self: WorksharingDisplaySettings,username: str) -> bool
Checks whether a single username can have customized graphic overrides.
username: The username to check.
Returns: False if the username is on the list of removed users,True otherwise.
"""
pass
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def get_all_users_with_graphic_overrides(self):
"""
GetAllUsersWithGraphicOverrides(self: WorksharingDisplaySettings) -> ICollection[str]
Returns all usernames that have graphic overrides. This list consists of
all users included in the user table + all users who have explicitly been
assigned overrides.
Returns: All usernames that have been assigned graphic overrides.
"""
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def get_graphic_overrides(self, *__args):
"""
GetGraphicOverrides(self: WorksharingDisplaySettings,statusInCentral: ModelUpdatesStatus) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides assigned to a particular model update status.
statusInCentral: The model update status of interest.
Returns: Returns the graphic overrides assigned to the model update status.
GetGraphicOverrides(self: WorksharingDisplaySettings,ownershipStatus: CheckoutStatus) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides associated with a particular ownership status.
ownershipStatus: The ownership status of interest.
Returns: Returns the graphic overrides assigned to a particular ownership status.
GetGraphicOverrides(self: WorksharingDisplaySettings,worksetId: WorksetId) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides assigned to elements in a particular workset.
worksetId: The workset id of interest. This must be a user workset.
Returns: Returns the graphic overrides assigned to the workset.
GetGraphicOverrides(self: WorksharingDisplaySettings,username: str) -> WorksharingDisplayGraphicSettings
Returns the graphic overrides assigned for elements owned by a particular user.
username: The username of a particular user.
Returns: The graphic overrides assigned to this user.
"""
pass
@staticmethod
def get_or_create_worksharing_display_settings(doc):
"""
GetOrCreateWorksharingDisplaySettings(doc: Document) -> WorksharingDisplaySettings
Returns the worksharing display settings for the document,creating
new
settings for the current user if necessary.
doc: The document of interest.
Returns: The worksharing display settings for the document.
"""
pass
def get_removed_users(self):
"""
GetRemovedUsers(self: WorksharingDisplaySettings) -> ICollection[str]
Returns the set of users who have been explicitly removed from the settings.
Returns: Users who have been explicitly removed from the list.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def remove_users(self, document, usersToRemove, usersActuallyRemoved):
""" RemoveUsers(self: WorksharingDisplaySettings,document: Document,usersToRemove: ICollection[str]) -> ICollection[str] """
pass
def restore_users(self, usersToRestore):
""" RestoreUsers(self: WorksharingDisplaySettings,usersToRestore: ICollection[str]) -> int """
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def set_graphic_overrides(self, *__args):
"""
SetGraphicOverrides(self: WorksharingDisplaySettings,status: ModelUpdatesStatus,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements with a particular status in the
central model.
status: The status in the central model.
overrides: The desired graphic overrides for this status.
SetGraphicOverrides(self: WorksharingDisplaySettings,username: str,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements owned by a particular user.
The username cannot be on the list of removed usernames.
username: The username of the desired user.
overrides: The desired graphic overrides for this user.
SetGraphicOverrides(self: WorksharingDisplaySettings,worksetId: WorksetId,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements in a particular user workset.
worksetId: The workset of interest,which must be a user workset.
overrides: The desired graphic overrides for this workset.
SetGraphicOverrides(self: WorksharingDisplaySettings,status: CheckoutStatus,overrides: WorksharingDisplayGraphicSettings)
Sets the graphic overrides assigned to elements with a particular ownership
status.
status: The ownership status of interest.
overrides: The desired graphic overrides for this ownership status.
"""
pass
def user_has_graphic_overrides(self, username):
"""
UserHasGraphicOverrides(self: WorksharingDisplaySettings,username: str) -> bool
Checks whether there are graphic overrides that would apply to elements
owned by the given user in the "Individual Owners" display mode.
username: The username to check
Returns: True if there are graphic overrides assigned to the username,false otherwise.
"""
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass |
"""
Unique Paths
Find the unique paths in a matrix starting from the upper left corner and ending in the bottom right corner.
=========================================
Dynamic programming (looking from the left and up neighbour), but this is a slower solution, see the next one.
Time Complexity: O(N*M)
Space Complexity: O(N*M)
The DP table is creating an Pascal Triangle, so this problem can be easily solved by using the combinatorial formula!
Much faster and doesn't use extra space.
Time Complexity: O(min(M, N))
Space Complexity: O(1)
"""
################################
# Solution Dynamic Programming #
################################
def unique_paths_dp(n, m):
# all values at i=0 should be 1 (the rest are not important, they'll be computed later)
dp = [[1 for j in range(m)] for i in range(n)]
# calculate only inner values
for i in range(1, n):
for j in range(1, m):
dp[i][j] = dp[i][j - 1] + dp[i - 1][j]
return dp[n - 1][m - 1]
#################################
# Solution Combinations Formula #
#################################
def unique_paths(n, m):
m, n = min(m, n), max(m, n)
lvl = m + n - 2
pos = m - 1
comb = 1
# combinations formula C(N, R) = N! / R! * (N - R)!
for i in range(1, pos + 1):
comb *= lvl
comb /= i
lvl -= 1
return int(comb + 0.001) # 0.001 just in case, because of overflow
###########
# Testing #
###########
# Test 1
# Correct result => 924
n, m = 7, 7
print(unique_paths(n, m))
print(unique_paths_dp(n, m))
# Test 2
# Correct result => 28
n, m = 7, 3
print(unique_paths(n, m))
print(unique_paths_dp(n, m))
# Test 3
# Correct result => 28
n, m = 3, 7
print(unique_paths(n, m))
print(unique_paths_dp(n, m))
| """
Unique Paths
Find the unique paths in a matrix starting from the upper left corner and ending in the bottom right corner.
=========================================
Dynamic programming (looking from the left and up neighbour), but this is a slower solution, see the next one.
Time Complexity: O(N*M)
Space Complexity: O(N*M)
The DP table is creating an Pascal Triangle, so this problem can be easily solved by using the combinatorial formula!
Much faster and doesn't use extra space.
Time Complexity: O(min(M, N))
Space Complexity: O(1)
"""
def unique_paths_dp(n, m):
dp = [[1 for j in range(m)] for i in range(n)]
for i in range(1, n):
for j in range(1, m):
dp[i][j] = dp[i][j - 1] + dp[i - 1][j]
return dp[n - 1][m - 1]
def unique_paths(n, m):
(m, n) = (min(m, n), max(m, n))
lvl = m + n - 2
pos = m - 1
comb = 1
for i in range(1, pos + 1):
comb *= lvl
comb /= i
lvl -= 1
return int(comb + 0.001)
(n, m) = (7, 7)
print(unique_paths(n, m))
print(unique_paths_dp(n, m))
(n, m) = (7, 3)
print(unique_paths(n, m))
print(unique_paths_dp(n, m))
(n, m) = (3, 7)
print(unique_paths(n, m))
print(unique_paths_dp(n, m)) |
"""dict-related utility functions."""
def get_priority_elem_in_set(obj_set, priority_list):
"""Returns the highest priority element in a set.
The set will be searched for objects in the order they appear in the
priority list, and the first one to be found will be returned. None is
returned if no such object is found.
Parameters
---------
obj_set : set, list
A set or list of objects.
priority_list : list
A list of objects in descending order of priority.
Returns
-------
object
The highest priority object in the given set.
Example:
--------
>>> obj_set = set([3, 2, 7, 8])
>>> priority_list = [4, 8, 1, 3]
>>> print(get_priority_elem_in_set(obj_set, priority_list))
8
"""
for obj in priority_list:
if obj in obj_set:
return obj
return None
| """dict-related utility functions."""
def get_priority_elem_in_set(obj_set, priority_list):
"""Returns the highest priority element in a set.
The set will be searched for objects in the order they appear in the
priority list, and the first one to be found will be returned. None is
returned if no such object is found.
Parameters
---------
obj_set : set, list
A set or list of objects.
priority_list : list
A list of objects in descending order of priority.
Returns
-------
object
The highest priority object in the given set.
Example:
--------
>>> obj_set = set([3, 2, 7, 8])
>>> priority_list = [4, 8, 1, 3]
>>> print(get_priority_elem_in_set(obj_set, priority_list))
8
"""
for obj in priority_list:
if obj in obj_set:
return obj
return None |
'''
Date: 2021-06-24 10:56:59
LastEditors: Liuliang
LastEditTime: 2021-06-24 11:26:06
Description:
'''
class Node():
def __init__(self,item):
self.item = item
self.next = None
a = Node(1)
b = Node(2)
c = Node(3)
a.next = b
b.next = c
print(a.item)
print(a.next.item)
print(b.next.item)
print(c.next.item)
| """
Date: 2021-06-24 10:56:59
LastEditors: Liuliang
LastEditTime: 2021-06-24 11:26:06
Description:
"""
class Node:
def __init__(self, item):
self.item = item
self.next = None
a = node(1)
b = node(2)
c = node(3)
a.next = b
b.next = c
print(a.item)
print(a.next.item)
print(b.next.item)
print(c.next.item) |
n=input()
words=input()
words=words.lower()
lst=[]
for i in words:
if i not in lst:
lst.append(i)
print("YES") if len(lst)==26 else print("NO") | n = input()
words = input()
words = words.lower()
lst = []
for i in words:
if i not in lst:
lst.append(i)
print('YES') if len(lst) == 26 else print('NO') |
pkgname = "libexecinfo"
version = "1.1"
revision = 0
build_style = "gnu_makefile"
make_build_args = ["PREFIX=/usr"]
short_desc = "BSD licensed clone of the GNU libc backtrace facility"
maintainer = "q66 <q66@chimera-linux.org>"
license = "BSD-2-Clause"
homepage = "http://www.freshports.org/devel/libexecinfo"
distfiles = [f"http://distcache.freebsd.org/local-distfiles/itetcu/libexecinfo-{version}.tar.bz2"]
checksum = ["c9a21913e7fdac8ef6b33250b167aa1fc0a7b8a175145e26913a4c19d8a59b1f"]
options = ["!check"]
def do_install(self):
self.install_dir("usr/lib/pkgconfig")
self.install_dir("usr/include")
self.install_file("libexecinfo.pc", "usr/lib/pkgconfig")
self.install_file("execinfo.h", "usr/include")
self.install_file("stacktraverse.h", "usr/include")
self.install_file("libexecinfo.a", "usr/lib")
self.install_lib("libexecinfo.so.1")
self.install_link("libexecinfo.so.1", "usr/lib/libexecinfo.so")
@subpackage("libexecinfo-devel")
def _devel(self):
self.short_desc = short_desc + " - development files"
self.depends = [f"{pkgname}={version}-r{revision}"]
return [
"usr/include", "usr/lib/*.so", "usr/lib/*.a", "usr/lib/pkgconfig"
]
| pkgname = 'libexecinfo'
version = '1.1'
revision = 0
build_style = 'gnu_makefile'
make_build_args = ['PREFIX=/usr']
short_desc = 'BSD licensed clone of the GNU libc backtrace facility'
maintainer = 'q66 <q66@chimera-linux.org>'
license = 'BSD-2-Clause'
homepage = 'http://www.freshports.org/devel/libexecinfo'
distfiles = [f'http://distcache.freebsd.org/local-distfiles/itetcu/libexecinfo-{version}.tar.bz2']
checksum = ['c9a21913e7fdac8ef6b33250b167aa1fc0a7b8a175145e26913a4c19d8a59b1f']
options = ['!check']
def do_install(self):
self.install_dir('usr/lib/pkgconfig')
self.install_dir('usr/include')
self.install_file('libexecinfo.pc', 'usr/lib/pkgconfig')
self.install_file('execinfo.h', 'usr/include')
self.install_file('stacktraverse.h', 'usr/include')
self.install_file('libexecinfo.a', 'usr/lib')
self.install_lib('libexecinfo.so.1')
self.install_link('libexecinfo.so.1', 'usr/lib/libexecinfo.so')
@subpackage('libexecinfo-devel')
def _devel(self):
self.short_desc = short_desc + ' - development files'
self.depends = [f'{pkgname}={version}-r{revision}']
return ['usr/include', 'usr/lib/*.so', 'usr/lib/*.a', 'usr/lib/pkgconfig'] |
# -*- coding: utf-8 -*-
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage'
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'python-troveclient'
copyright = u'2012, OpenStack Foundation'
exclude_trees = []
pygments_style = 'sphinx'
html_theme = 'default'
html_static_path = ['_static']
htmlhelp_basename = 'python-troveclientdoc'
latex_documents = [
('index', 'python-troveclient.tex', u'python-troveclient Documentation',
u'OpenStack', 'manual'),
]
| extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'python-troveclient'
copyright = u'2012, OpenStack Foundation'
exclude_trees = []
pygments_style = 'sphinx'
html_theme = 'default'
html_static_path = ['_static']
htmlhelp_basename = 'python-troveclientdoc'
latex_documents = [('index', 'python-troveclient.tex', u'python-troveclient Documentation', u'OpenStack', 'manual')] |
#Excersie 1.1
str1 = "JohnDipPeta"
newstr1 = list(str1)
output = None
for i in range (0,len(newstr1)):
if(newstr1[i]=="D" and newstr1[i+1]=='i' and newstr1[i+2]=='p'):
output = newstr1[i]+ newstr1[i+1]+newstr1[i+2]
print(output)
#Excersie 2
#Given 2 strings, s1 and s2, create a new string by appending s2 in the middle of s1
s1 = "Ault"
s2 = "Kelly"
result=s1[0:2]+s2+s1[2:4]
print(result)
#Excersie 3
#Given an input string with the combination of the lower
# and upper case arrange characters in such a way that all
# lowercase letters should come first.
def makeString(str):
lowerWord = ""
upperWord = ""
result = ""
for word in range (len(str)):
if str[word].islower() == True:
lowerWord +=str[word]
elif str[word].isupper() == True:
upperWord +=str[word]
result = lowerWord + upperWord
return result
value = "PyNaTive"
res = makeString(value)
print(res)
#Excersie 4
# Count all lower case, upper case,
# digits, and special symbols from a
# given string
def showWord(str):
digits = ""
words = ""
symbhols = ""
for word in str:
if word.isdigit()==True:
digits+=word
elif word.islower() or word.isupper():
words += word
else:
symbhols +=word
#result = [digits,words,symbhols]
result = {'numbers':digits,'strings':words,'sym':symbhols}
return result
mainStr = "P@#yn26at^&i5ve"
count =showWord(mainStr)
print(f'the count of numeric words {len(count["numbers"])}')
print(f'the count of words {len(count["strings"])}')
print(f'the count of symbhols {len(count["sym"])}')
#Excersie 5
#create a third-string made of the
# first char of s1 then the last char of s2,
# Next, the second char of s1 and second last char of s2,
# and so on. Any leftover chars go at the end of the result.
def mixFunction(str1,str2):
result = str1[0]+str2[-1]+str1[1]+str2[-2]+str1[2:]+str2[-2:]
return result
s1="Abc"
s2="Xyz"
res = mixFunction(s1,s2)
print(res)
#Excersie 6
#String characters balance Test
def checkBalance(str1,str2):
charList = [str1,str2]
for char in str1:
print(char)
s1="Pycharm"
s2 = "Pyhcharm"
res = checkBalance(s1,s2)
| str1 = 'JohnDipPeta'
newstr1 = list(str1)
output = None
for i in range(0, len(newstr1)):
if newstr1[i] == 'D' and newstr1[i + 1] == 'i' and (newstr1[i + 2] == 'p'):
output = newstr1[i] + newstr1[i + 1] + newstr1[i + 2]
print(output)
s1 = 'Ault'
s2 = 'Kelly'
result = s1[0:2] + s2 + s1[2:4]
print(result)
def make_string(str):
lower_word = ''
upper_word = ''
result = ''
for word in range(len(str)):
if str[word].islower() == True:
lower_word += str[word]
elif str[word].isupper() == True:
upper_word += str[word]
result = lowerWord + upperWord
return result
value = 'PyNaTive'
res = make_string(value)
print(res)
def show_word(str):
digits = ''
words = ''
symbhols = ''
for word in str:
if word.isdigit() == True:
digits += word
elif word.islower() or word.isupper():
words += word
else:
symbhols += word
result = {'numbers': digits, 'strings': words, 'sym': symbhols}
return result
main_str = 'P@#yn26at^&i5ve'
count = show_word(mainStr)
print(f"the count of numeric words {len(count['numbers'])}")
print(f"the count of words {len(count['strings'])}")
print(f"the count of symbhols {len(count['sym'])}")
def mix_function(str1, str2):
result = str1[0] + str2[-1] + str1[1] + str2[-2] + str1[2:] + str2[-2:]
return result
s1 = 'Abc'
s2 = 'Xyz'
res = mix_function(s1, s2)
print(res)
def check_balance(str1, str2):
char_list = [str1, str2]
for char in str1:
print(char)
s1 = 'Pycharm'
s2 = 'Pyhcharm'
res = check_balance(s1, s2) |
# Copyright (c) 2017 Dustin Doloff
# Licensed under Apache License v2.0
load(
"//actions:actions.bzl",
"stamp_file",
)
load(
"//assert:assert.bzl",
"assert_files_equal",
)
load(
"//rules:rules.bzl",
"generate_file",
"zip_files",
"zip_runfiles",
)
def run_all_tests():
test_generate_file()
test_zip_files()
test_zip_runfiles()
def test_generate_file():
test_generate_bin_file()
test_generate_gen_file()
def test_generate_bin_file():
generate_file(
name = "test_generate_bin_file",
contents = "contents",
bin_file = True,
file = "test_generate_bin_file.txt",
)
assert_files_equal("data/contents.txt", ":test_generate_bin_file")
def test_generate_gen_file():
generate_file(
name = "test_generate_gen_file",
contents = "contents",
bin_file = False,
file = "test_generate_gen_file.txt",
)
assert_files_equal("data/contents.txt", ":test_generate_gen_file")
def test_zip_files():
test_empty()
test_full()
test_full_strip()
test_generated_paths()
test_generated_paths_strip()
def test_empty():
zip_files(
name = "test_zip_files_empty",
srcs = [],
)
assert_files_equal("data/empty.zip", ":test_zip_files_empty")
def test_full():
zip_files(
name = "test_zip_files_full",
srcs = [
"data/file.txt",
"data/template.txt",
":test_generate_bin_file",
":test_generate_gen_file",
],
)
assert_files_equal("data/full.zip", ":test_zip_files_full")
def test_full_strip():
zip_files(
name = "test_zip_files_full_strip",
srcs = [
"data/file.txt",
"data/template.txt",
":test_generate_bin_file",
":test_generate_gen_file",
],
strip_prefixes = [
"test/",
"test/data/",
],
)
assert_files_equal("data/flat.zip", ":test_zip_files_full_strip")
def _stamp_file_rule_impl(ctx):
stamp_file(ctx, ctx.outputs.stamp_file)
_stamp_file_rule = rule(
outputs = {
"stamp_file": "%{name}.stamp",
},
implementation = _stamp_file_rule_impl,
)
def test_generated_paths():
_stamp_file_rule(
name = "generated_paths_stamp",
)
zip_files(
name = "test_generated_paths",
srcs = [
":generated_paths_stamp",
],
)
assert_files_equal("data/nested.zip", ":test_generated_paths")
def test_generated_paths_strip():
_stamp_file_rule(
name = "generated_paths_stamp_strip",
)
zip_files(
name = "test_generated_paths_strip",
srcs = [
":generated_paths_stamp_strip",
],
strip_prefixes = [
"test",
],
)
assert_files_equal("data/nested_stripped.zip", ":test_generated_paths_strip")
def test_zip_runfiles():
test_zip_runfiles_deps()
test_simple_zip_runfiles()
test_single_dep_zip_runfiles()
test_complex_zip_runfiles()
def test_zip_runfiles_deps():
native.py_library(
name = "simple_library",
srcs = ["data/test.py"],
)
native.py_library(
name = "single_dep_library",
srcs = ["data/test.py"],
data = ["data/file.txt"],
)
native.py_binary(
name = "complex_binary",
srcs = ["data/other.py"],
main = "data/other.py",
deps = [
":simple_library",
":single_dep_library",
],
data = [
"data/empty.txt",
"@markup_safe//:markup_safe",
],
)
def test_simple_zip_runfiles():
zip_runfiles(
name = "test_simple_library_runfiles",
py_library = ":simple_library",
)
assert_files_equal("data/expected_simple_library_runfiles.zip", ":test_simple_library_runfiles")
def test_single_dep_zip_runfiles():
zip_runfiles(
name = "test_single_dep_runfiles",
py_library = ":single_dep_library",
)
assert_files_equal("data/expected_single_dep_runfiles.zip", ":test_single_dep_runfiles")
def test_complex_zip_runfiles():
zip_runfiles(
name = "test_complex_runfiles",
py_library = ":complex_binary",
)
assert_files_equal("data/expected_complex_binary_runfiles.zip", ":test_complex_runfiles")
| load('//actions:actions.bzl', 'stamp_file')
load('//assert:assert.bzl', 'assert_files_equal')
load('//rules:rules.bzl', 'generate_file', 'zip_files', 'zip_runfiles')
def run_all_tests():
test_generate_file()
test_zip_files()
test_zip_runfiles()
def test_generate_file():
test_generate_bin_file()
test_generate_gen_file()
def test_generate_bin_file():
generate_file(name='test_generate_bin_file', contents='contents', bin_file=True, file='test_generate_bin_file.txt')
assert_files_equal('data/contents.txt', ':test_generate_bin_file')
def test_generate_gen_file():
generate_file(name='test_generate_gen_file', contents='contents', bin_file=False, file='test_generate_gen_file.txt')
assert_files_equal('data/contents.txt', ':test_generate_gen_file')
def test_zip_files():
test_empty()
test_full()
test_full_strip()
test_generated_paths()
test_generated_paths_strip()
def test_empty():
zip_files(name='test_zip_files_empty', srcs=[])
assert_files_equal('data/empty.zip', ':test_zip_files_empty')
def test_full():
zip_files(name='test_zip_files_full', srcs=['data/file.txt', 'data/template.txt', ':test_generate_bin_file', ':test_generate_gen_file'])
assert_files_equal('data/full.zip', ':test_zip_files_full')
def test_full_strip():
zip_files(name='test_zip_files_full_strip', srcs=['data/file.txt', 'data/template.txt', ':test_generate_bin_file', ':test_generate_gen_file'], strip_prefixes=['test/', 'test/data/'])
assert_files_equal('data/flat.zip', ':test_zip_files_full_strip')
def _stamp_file_rule_impl(ctx):
stamp_file(ctx, ctx.outputs.stamp_file)
_stamp_file_rule = rule(outputs={'stamp_file': '%{name}.stamp'}, implementation=_stamp_file_rule_impl)
def test_generated_paths():
_stamp_file_rule(name='generated_paths_stamp')
zip_files(name='test_generated_paths', srcs=[':generated_paths_stamp'])
assert_files_equal('data/nested.zip', ':test_generated_paths')
def test_generated_paths_strip():
_stamp_file_rule(name='generated_paths_stamp_strip')
zip_files(name='test_generated_paths_strip', srcs=[':generated_paths_stamp_strip'], strip_prefixes=['test'])
assert_files_equal('data/nested_stripped.zip', ':test_generated_paths_strip')
def test_zip_runfiles():
test_zip_runfiles_deps()
test_simple_zip_runfiles()
test_single_dep_zip_runfiles()
test_complex_zip_runfiles()
def test_zip_runfiles_deps():
native.py_library(name='simple_library', srcs=['data/test.py'])
native.py_library(name='single_dep_library', srcs=['data/test.py'], data=['data/file.txt'])
native.py_binary(name='complex_binary', srcs=['data/other.py'], main='data/other.py', deps=[':simple_library', ':single_dep_library'], data=['data/empty.txt', '@markup_safe//:markup_safe'])
def test_simple_zip_runfiles():
zip_runfiles(name='test_simple_library_runfiles', py_library=':simple_library')
assert_files_equal('data/expected_simple_library_runfiles.zip', ':test_simple_library_runfiles')
def test_single_dep_zip_runfiles():
zip_runfiles(name='test_single_dep_runfiles', py_library=':single_dep_library')
assert_files_equal('data/expected_single_dep_runfiles.zip', ':test_single_dep_runfiles')
def test_complex_zip_runfiles():
zip_runfiles(name='test_complex_runfiles', py_library=':complex_binary')
assert_files_equal('data/expected_complex_binary_runfiles.zip', ':test_complex_runfiles') |
# Time: O(n)
# Space: O(1)
class Solution(object):
def judgeCircle(self, moves):
"""
:type moves: str
:rtype: bool
"""
v, h = 0, 0
for move in moves:
if move == 'U':
v += 1
elif move == 'D':
v -= 1
elif move == 'R':
h += 1
elif move == 'L':
h -= 1
return v == 0 and h == 0
| class Solution(object):
def judge_circle(self, moves):
"""
:type moves: str
:rtype: bool
"""
(v, h) = (0, 0)
for move in moves:
if move == 'U':
v += 1
elif move == 'D':
v -= 1
elif move == 'R':
h += 1
elif move == 'L':
h -= 1
return v == 0 and h == 0 |
#%%
"""
- Search in Rotated Sorted Array II
- https://leetcode.com/problems/search-in-rotated-sorted-array-ii/
- Medium
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]).
You are given a target value to search. If found in the array return true, otherwise return false.
Example 1:
Input: nums = [2,5,6,0,0,1,2], target = 0
Output: true
Example 2:
Input: nums = [2,5,6,0,0,1,2], target = 3
Output: false
Follow up:
This is a follow up problem to Search in Rotated Sorted Array, where nums may contain duplicates.
Would this affect the run-time complexity? How and why?
"""
#%%
class S1:
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: bool
"""
l, r = 0, len(nums)-1
while l <= r:
mid = l + ((r-l)//2)
if nums[mid] == target:
return True
if nums[mid] > nums[l]:
if nums[l] <= target <= nums[mid]: # non-rotated
r = mid-1
else:
l = mid+1
elif nums[mid] < nums[l]:
if nums[mid] <= target <= nums[r]:
l = mid+1
else:
r = mid-1
else:
l += 1
return False
| """
- Search in Rotated Sorted Array II
- https://leetcode.com/problems/search-in-rotated-sorted-array-ii/
- Medium
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]).
You are given a target value to search. If found in the array return true, otherwise return false.
Example 1:
Input: nums = [2,5,6,0,0,1,2], target = 0
Output: true
Example 2:
Input: nums = [2,5,6,0,0,1,2], target = 3
Output: false
Follow up:
This is a follow up problem to Search in Rotated Sorted Array, where nums may contain duplicates.
Would this affect the run-time complexity? How and why?
"""
class S1:
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: bool
"""
(l, r) = (0, len(nums) - 1)
while l <= r:
mid = l + (r - l) // 2
if nums[mid] == target:
return True
if nums[mid] > nums[l]:
if nums[l] <= target <= nums[mid]:
r = mid - 1
else:
l = mid + 1
elif nums[mid] < nums[l]:
if nums[mid] <= target <= nums[r]:
l = mid + 1
else:
r = mid - 1
else:
l += 1
return False |
expected_output={
"replicate_oce": {
"0x7F9E40C590C8": {
"uid": 6889
},
"0x7F9E40C59340": {
"uid": 6888
}
}
}
| expected_output = {'replicate_oce': {'0x7F9E40C590C8': {'uid': 6889}, '0x7F9E40C59340': {'uid': 6888}}} |
# Return lines from a file
def getFileLines(file):
f = open(file, "r")
lines = f.readlines()
f.close
return lines | def get_file_lines(file):
f = open(file, 'r')
lines = f.readlines()
f.close
return lines |
expected_output = {
"channel_assignment": {
"chan_assn_mode": "AUTO",
"chan_upd_int": "12 Hours",
"anchor_time_hour": 7,
"channel_update_contribution" : {
"channel_noise": "Enable",
"channel_interference": "Enable",
"channel_load": "Disable",
"device_aware": "Disable",
},
"clean_air": "Disabled",
"wlc_leader_name": "sj-00a-ewlc1",
"wlc_leader_ip": "10.7.5.133",
"last_run_seconds": 15995,
"dca_level": "MEDIUM",
"dca_db": 15,
"chan_width_mhz": 80,
"max_chan_width_mhz": 80,
"dca_min_energy_dbm": -95.0,
"channel_energy_levels" : {
"min_dbm": -94.0,
"average_dbm": -82.0,
"max_dbm": -81.0,
},
"channel_dwell_times" : {
"minimum": "4 hours 9 minutes 54 seconds",
"average": "4 hours 24 minutes 54 seconds",
"max": "4 hours 26 minutes 35 seconds",
},
"allowed_channel_list": "36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,144,149,153,157,161",
"unused_channel_list": "165",
}
}
| expected_output = {'channel_assignment': {'chan_assn_mode': 'AUTO', 'chan_upd_int': '12 Hours', 'anchor_time_hour': 7, 'channel_update_contribution': {'channel_noise': 'Enable', 'channel_interference': 'Enable', 'channel_load': 'Disable', 'device_aware': 'Disable'}, 'clean_air': 'Disabled', 'wlc_leader_name': 'sj-00a-ewlc1', 'wlc_leader_ip': '10.7.5.133', 'last_run_seconds': 15995, 'dca_level': 'MEDIUM', 'dca_db': 15, 'chan_width_mhz': 80, 'max_chan_width_mhz': 80, 'dca_min_energy_dbm': -95.0, 'channel_energy_levels': {'min_dbm': -94.0, 'average_dbm': -82.0, 'max_dbm': -81.0}, 'channel_dwell_times': {'minimum': '4 hours 9 minutes 54 seconds', 'average': '4 hours 24 minutes 54 seconds', 'max': '4 hours 26 minutes 35 seconds'}, 'allowed_channel_list': '36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,144,149,153,157,161', 'unused_channel_list': '165'}} |
# Example: list media files and save any with the name `dog` in file name
media_list = api.get_media_files()
for media in media_list:
if 'dog' in media['mediaName'].lower():
stream, content_type = api.download_media_file(media['mediaName'])
with io.open(media['mediaName'], 'wb') as file:
file.write(stream.read())
| media_list = api.get_media_files()
for media in media_list:
if 'dog' in media['mediaName'].lower():
(stream, content_type) = api.download_media_file(media['mediaName'])
with io.open(media['mediaName'], 'wb') as file:
file.write(stream.read()) |
input = """
a1:- not b1.
b1:- not a1.
a2:- not b2.
b2:- not a2.
a3:- not b3.
b3:- not a3.
"""
output = """
{a1, a2, a3}
{a1, a2, b3}
{a1, a3, b2}
{a1, b2, b3}
{a2, a3, b1}
{a2, b1, b3}
{a3, b1, b2}
{b1, b2, b3}
"""
| input = '\na1:- not b1.\nb1:- not a1.\n\na2:- not b2.\nb2:- not a2.\n\na3:- not b3.\nb3:- not a3.\n\n'
output = '\n{a1, a2, a3}\n{a1, a2, b3}\n{a1, a3, b2}\n{a1, b2, b3}\n{a2, a3, b1}\n{a2, b1, b3}\n{a3, b1, b2}\n{b1, b2, b3}\n' |
def de(fobj, bounds, mut=0.8, crossp=0.7, popsize=20, its=1000):
dimensions = len(bounds)
pop = np.random.rand(popsize, dimensions)
min_b, max_b = np.asarray(bounds).T
diff = np.fabs(min_b - max_b)
pop_denorm = min_b + pop * diff
fitness = np.asarray([fobj(ind) for ind in pop_denorm])
best_idx = np.argmin(fitness)
best = pop_denorm[best_idx]
for i in range(its):
for j in range(popsize):
idxs = [idx for idx in range(popsize) if idx != j]
a, b, c = pop[np.random.choice(idxs, 3, replace=False)]
mutant = np.clip(a + mut * (b - c), 0, 1)
cross_points = np.random.rand(dimensions) < crossp
if not np.any(cross_points):
cross_points[np.random.randint(0, dimensions)] = True
trial = np.where(cross_points, mutant, pop[j])
trial_denorm = min_b + trial * diff
f = fobj(trial_denorm)
if f < fitness[j]:
fitness[j] = f
pop[j] = trial
if f < fitness[best_idx]:
best_idx = j
best = trial_denorm
yield best, fitness[best_idx]
| def de(fobj, bounds, mut=0.8, crossp=0.7, popsize=20, its=1000):
dimensions = len(bounds)
pop = np.random.rand(popsize, dimensions)
(min_b, max_b) = np.asarray(bounds).T
diff = np.fabs(min_b - max_b)
pop_denorm = min_b + pop * diff
fitness = np.asarray([fobj(ind) for ind in pop_denorm])
best_idx = np.argmin(fitness)
best = pop_denorm[best_idx]
for i in range(its):
for j in range(popsize):
idxs = [idx for idx in range(popsize) if idx != j]
(a, b, c) = pop[np.random.choice(idxs, 3, replace=False)]
mutant = np.clip(a + mut * (b - c), 0, 1)
cross_points = np.random.rand(dimensions) < crossp
if not np.any(cross_points):
cross_points[np.random.randint(0, dimensions)] = True
trial = np.where(cross_points, mutant, pop[j])
trial_denorm = min_b + trial * diff
f = fobj(trial_denorm)
if f < fitness[j]:
fitness[j] = f
pop[j] = trial
if f < fitness[best_idx]:
best_idx = j
best = trial_denorm
yield (best, fitness[best_idx]) |
"""
File: caesar.py
Name: Jennifer Chueh
------------------------------
This program demonstrates the idea of caesar cipher.
Users will be asked to input a number to produce shifted
ALPHABET as the cipher table. After that, any strings typed
in will be encrypted.
"""
# This constant shows the original order of alphabetic sequence.
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def main():
"""
This program is to decipher the alphabets.
"""
secret_num = int(input("Secret number: "))
string = input("What's the cipher string? ")
string_upper = string.upper()
print('The deciphered string is: ' + decipher(secret_num, string_upper))
def decipher(num, string):
ans = ''
for i in range(len(string)):
ch = string[i]
ch_place = ALPHABET.find(ch)
if ch_place != -1:
ch_decipher = ch_place + num
if ch_decipher > 25:
ch_decipher = ch_decipher - 26 # Decipher the index number of the ALPHABET
ans = ans + ALPHABET[ch_decipher:ch_decipher + 1]
else: # The string which cannot find in ALPHABET
ans = ans + ch
return ans
##### DO NOT EDIT THE CODE BELOW THIS LINE #####
if __name__ == '__main__':
main()
| """
File: caesar.py
Name: Jennifer Chueh
------------------------------
This program demonstrates the idea of caesar cipher.
Users will be asked to input a number to produce shifted
ALPHABET as the cipher table. After that, any strings typed
in will be encrypted.
"""
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def main():
"""
This program is to decipher the alphabets.
"""
secret_num = int(input('Secret number: '))
string = input("What's the cipher string? ")
string_upper = string.upper()
print('The deciphered string is: ' + decipher(secret_num, string_upper))
def decipher(num, string):
ans = ''
for i in range(len(string)):
ch = string[i]
ch_place = ALPHABET.find(ch)
if ch_place != -1:
ch_decipher = ch_place + num
if ch_decipher > 25:
ch_decipher = ch_decipher - 26
ans = ans + ALPHABET[ch_decipher:ch_decipher + 1]
else:
ans = ans + ch
return ans
if __name__ == '__main__':
main() |
#This program is for practicing lists
#Take a list, say for example this one:
#a = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
#and write a program that prints out all the elements of the list that are less than 5.
a = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = len(a)
new1 = []
print ("Number of elements in a is %d" %b)
for i in range (0,b):
if a[i]<5:
new1.append(a[i])
print(new1)
#below codes requires user to enter the list
new =[]
for i in range(0,10):
x = int(input("enter the %d th element of the list:" %i))
new.append(x)
print(new)
new2 = []
for i in range(0,len(new)):
if new[i]<5:
new2.append(new[i])
print(new2)
| a = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = len(a)
new1 = []
print('Number of elements in a is %d' % b)
for i in range(0, b):
if a[i] < 5:
new1.append(a[i])
print(new1)
new = []
for i in range(0, 10):
x = int(input('enter the %d th element of the list:' % i))
new.append(x)
print(new)
new2 = []
for i in range(0, len(new)):
if new[i] < 5:
new2.append(new[i])
print(new2) |
"""
Author: Rayla Kurosaki
File: test_linear_algebra.py
Description:
"""
if __name__ == '__main__':
pass
| """
Author: Rayla Kurosaki
File: test_linear_algebra.py
Description:
"""
if __name__ == '__main__':
pass |
a = [1,2,3]
b = [4,5,6]
print(a+b)
print(a)
print(a*2)
print(a*3)
print(b*2)
print(b*3)
print(1 in a)
print(2 in a)
print(3 in a)
print(4 in a) | a = [1, 2, 3]
b = [4, 5, 6]
print(a + b)
print(a)
print(a * 2)
print(a * 3)
print(b * 2)
print(b * 3)
print(1 in a)
print(2 in a)
print(3 in a)
print(4 in a) |
# encoding: utf-8
__all__ = ['LoggingTransport']
log = __import__('logging').getLogger(__name__)
class LoggingTransport(object):
__slots__ = ('ephemeral', 'log')
def __init__(self, config):
self.log = log if 'name' not in config else __import__('logging').getLogger(config.name)
def startup(self):
log.debug("Logging transport starting.")
def deliver(self, message):
msg = str(message)
self.log.info("DELIVER %s %s %d %r %r", message.id, message.date.isoformat(),
len(msg), message.author, message.recipients)
self.log.critical(msg)
def shutdown(self):
log.debug("Logging transport stopping.")
| __all__ = ['LoggingTransport']
log = __import__('logging').getLogger(__name__)
class Loggingtransport(object):
__slots__ = ('ephemeral', 'log')
def __init__(self, config):
self.log = log if 'name' not in config else __import__('logging').getLogger(config.name)
def startup(self):
log.debug('Logging transport starting.')
def deliver(self, message):
msg = str(message)
self.log.info('DELIVER %s %s %d %r %r', message.id, message.date.isoformat(), len(msg), message.author, message.recipients)
self.log.critical(msg)
def shutdown(self):
log.debug('Logging transport stopping.') |
## 2. Syntax Errors ##
def first_elts(input_lst):
elts = []
for each in input_lst:
elts.append(each)
return elts
animals = [["dog","cat","rabbit"],["turtle","snake"], ["sloth","penguin","bird"]]
first_animal = first_elts(animals)
print(first_animal)
## 4. TypeError and ValueError ##
forty_two = "42"
forty_two + 42
int("guardians")
## 5. IndexError and AttributeError ##
# Default code containing errors
lives = [1,2,3]
first_life = lives[0]
f = open("story.txt")
story = f.read()
split_story = story.split("\n")
## 6. Traceback ##
def summary_statistics(input_lst):
num_japan_films = feature_counter(input_lst,6,"Japan",True)
num_color_films = feature_counter(input_lst,2,"Color",True)
num_films_in_english = feature_counter(input_lst,5,"English",True)
summary_dict = {"japan_films" : num_japan_films, "color_films" : num_color_films, "films_in_english" : num_films_in_english}
return summary_dict
def feature_counter(input_lst,index, input_str, header_row = False):
num_elt = 0
if header_row == True:
input_lst = input_lst[1:len(input_lst)]
for each in input_lst:
if each[index] == input_str:
num_elt = num_elt + 1
return num_elt
summary = summary_statistics(movie_data)
print(summary) | def first_elts(input_lst):
elts = []
for each in input_lst:
elts.append(each)
return elts
animals = [['dog', 'cat', 'rabbit'], ['turtle', 'snake'], ['sloth', 'penguin', 'bird']]
first_animal = first_elts(animals)
print(first_animal)
forty_two = '42'
forty_two + 42
int('guardians')
lives = [1, 2, 3]
first_life = lives[0]
f = open('story.txt')
story = f.read()
split_story = story.split('\n')
def summary_statistics(input_lst):
num_japan_films = feature_counter(input_lst, 6, 'Japan', True)
num_color_films = feature_counter(input_lst, 2, 'Color', True)
num_films_in_english = feature_counter(input_lst, 5, 'English', True)
summary_dict = {'japan_films': num_japan_films, 'color_films': num_color_films, 'films_in_english': num_films_in_english}
return summary_dict
def feature_counter(input_lst, index, input_str, header_row=False):
num_elt = 0
if header_row == True:
input_lst = input_lst[1:len(input_lst)]
for each in input_lst:
if each[index] == input_str:
num_elt = num_elt + 1
return num_elt
summary = summary_statistics(movie_data)
print(summary) |
'''
Assignment: Create functions that serialize/deserialize objects to/from a stream of data. Additionally, create a function
that retrieves a given value from the stream of data.
All objects have a flat structure that is described by a schema. Objects needn't have all fields, in such a case, the default
value is assumed. The example of a schema is given below:
schema = [
{
"id": "name",
"default": "<UNNAMED>"
},
{
"id": "width",
"default": 10
},
{
"id": "height",
"default": 10
}
]
-----------------------------------------------------------------------------------------------------------------------
Usage example:
-----------------------------------------------------------------------------------------------------------------------
sample_structured_data = [
{
"name": "Rectangle 1",
"width": 12,
"height": 20
},
{
"name": "Rectangle 2",
"height": 20
},
{
"name": "Rectangle 3"
},
{
}
]
sample_serialized_data = ['Rectangle 1', 12, 20, 'Rectangle 2', 10, 20, 'Rectangle 3', 10, 10, '<UNNAMED>', 10, 10]
print(serialize_data(sample_structured_data))
# Prints: ['Rectangle 1', 12, 20, 'Rectangle 2', 10, 20, 'Rectangle 3', 10, 10, '<UNNAMED>', 10, 10]
print(deserialize_data(sample_serialized_data))
# Prints: [{'name': 'Rectangle 1', 'width': 12, 'height': 20}, {'name': 'Rectangle 2', 'width': 10, 'height': 20}, {'name': 'Rectangle 3', 'width': 10, 'height': 10}, {'name': '<UNNAMED>', 'width': 10, 'height': 10}]
print(get_from_serialized_data(sample_serialized_data, "width", 2))
# Prints: 10
'''
schema = [
{
"id": "name",
"default": "<UNNAMED>"
},
{
"id": "width",
"default": 10
},
{
"id": "height",
"default": 10
}
]
schema_len = len(schema)
schema_by_ids = {
field_schema["id"]: {"idx": field_idx, "default": field_schema["default"]} for field_idx, field_schema in enumerate(schema)
}
def serialize_data(data):
stream = []
for record in data:
for field_schema in schema:
field_id = field_schema["id"]
val = record[field_id] if field_id in record else field_schema["default"]
stream.append(val)
return stream
def deserialize_data(stream):
data = []
records = [stream[i:i + schema_len] for i in range(0, len(stream), schema_len)]
for record in records:
output_record = {}
for val, field_schema in zip(record, schema):
field_id = field_schema["id"]
output_record[field_id] = val
data.append(output_record)
return data
def get_from_serialized_data(stream, field_id, record_idx):
field_schema = schema_by_ids[field_id]
stream_offset = record_idx * schema_len + field_schema["idx"]
return stream[stream_offset]
sample_structured_data = [
{
"name": "Rectangle 1",
"width": 12,
"height": 20
},
{
"name": "Rectangle 2",
"height": 20
},
{
"name": "Rectangle 3"
},
{
}
]
sample_serialized_data = ['Rectangle 1', 12, 20, 'Rectangle 2', 10, 20, 'Rectangle 3', 10, 10, '<UNNAMED>', 10, 10]
print(serialize_data(sample_structured_data))
print(deserialize_data(sample_serialized_data))
print(get_from_serialized_data(sample_serialized_data, "width", 2)) | """
Assignment: Create functions that serialize/deserialize objects to/from a stream of data. Additionally, create a function
that retrieves a given value from the stream of data.
All objects have a flat structure that is described by a schema. Objects needn't have all fields, in such a case, the default
value is assumed. The example of a schema is given below:
schema = [
{
"id": "name",
"default": "<UNNAMED>"
},
{
"id": "width",
"default": 10
},
{
"id": "height",
"default": 10
}
]
-----------------------------------------------------------------------------------------------------------------------
Usage example:
-----------------------------------------------------------------------------------------------------------------------
sample_structured_data = [
{
"name": "Rectangle 1",
"width": 12,
"height": 20
},
{
"name": "Rectangle 2",
"height": 20
},
{
"name": "Rectangle 3"
},
{
}
]
sample_serialized_data = ['Rectangle 1', 12, 20, 'Rectangle 2', 10, 20, 'Rectangle 3', 10, 10, '<UNNAMED>', 10, 10]
print(serialize_data(sample_structured_data))
# Prints: ['Rectangle 1', 12, 20, 'Rectangle 2', 10, 20, 'Rectangle 3', 10, 10, '<UNNAMED>', 10, 10]
print(deserialize_data(sample_serialized_data))
# Prints: [{'name': 'Rectangle 1', 'width': 12, 'height': 20}, {'name': 'Rectangle 2', 'width': 10, 'height': 20}, {'name': 'Rectangle 3', 'width': 10, 'height': 10}, {'name': '<UNNAMED>', 'width': 10, 'height': 10}]
print(get_from_serialized_data(sample_serialized_data, "width", 2))
# Prints: 10
"""
schema = [{'id': 'name', 'default': '<UNNAMED>'}, {'id': 'width', 'default': 10}, {'id': 'height', 'default': 10}]
schema_len = len(schema)
schema_by_ids = {field_schema['id']: {'idx': field_idx, 'default': field_schema['default']} for (field_idx, field_schema) in enumerate(schema)}
def serialize_data(data):
stream = []
for record in data:
for field_schema in schema:
field_id = field_schema['id']
val = record[field_id] if field_id in record else field_schema['default']
stream.append(val)
return stream
def deserialize_data(stream):
data = []
records = [stream[i:i + schema_len] for i in range(0, len(stream), schema_len)]
for record in records:
output_record = {}
for (val, field_schema) in zip(record, schema):
field_id = field_schema['id']
output_record[field_id] = val
data.append(output_record)
return data
def get_from_serialized_data(stream, field_id, record_idx):
field_schema = schema_by_ids[field_id]
stream_offset = record_idx * schema_len + field_schema['idx']
return stream[stream_offset]
sample_structured_data = [{'name': 'Rectangle 1', 'width': 12, 'height': 20}, {'name': 'Rectangle 2', 'height': 20}, {'name': 'Rectangle 3'}, {}]
sample_serialized_data = ['Rectangle 1', 12, 20, 'Rectangle 2', 10, 20, 'Rectangle 3', 10, 10, '<UNNAMED>', 10, 10]
print(serialize_data(sample_structured_data))
print(deserialize_data(sample_serialized_data))
print(get_from_serialized_data(sample_serialized_data, 'width', 2)) |
async def run(plugin, ctx):
plugin.db.configs.update(ctx.guild.id, "persist", True)
await ctx.send(plugin.t(ctx.guild, "enabled_module_no_channel", _emote="YES", module="Persist")) | async def run(plugin, ctx):
plugin.db.configs.update(ctx.guild.id, 'persist', True)
await ctx.send(plugin.t(ctx.guild, 'enabled_module_no_channel', _emote='YES', module='Persist')) |
def attation(proto_layers, layer_infos, edges_info, attation_num):
for proto_index, proto_layer in enumerate(proto_layers):
for key, layer_info in layer_infos.items():
if layer_info['name'] == proto_layer.name:
cur_layer_info = layer_info
break
cur_data = layer_info['data']
for edge in edges_info:
if edge['to-layer'] == cur_layer_info['id']:
top_name = layer_infos[int(edge['to-layer'])]['name']
if not top_name in proto_layer.top:
proto_layer.top.append(top_name)
bottom_name = layer_infos[int(edge['from-layer']) - proto_index - attation_num]['name']
if not bottom_name in proto_layer.bottom:
proto_layer.bottom.append(bottom_name)
if proto_index == 0:
proto_layer_shape = proto_layer.reshape_param.shape
proto_layer_shape.dim.append(0)
proto_layer_shape.dim.append(0)
else:
proto_layer.type = 'Scale'
proto_layer.scale_param.axis = 0
proto_layer.scale_param.bias_term = False
| def attation(proto_layers, layer_infos, edges_info, attation_num):
for (proto_index, proto_layer) in enumerate(proto_layers):
for (key, layer_info) in layer_infos.items():
if layer_info['name'] == proto_layer.name:
cur_layer_info = layer_info
break
cur_data = layer_info['data']
for edge in edges_info:
if edge['to-layer'] == cur_layer_info['id']:
top_name = layer_infos[int(edge['to-layer'])]['name']
if not top_name in proto_layer.top:
proto_layer.top.append(top_name)
bottom_name = layer_infos[int(edge['from-layer']) - proto_index - attation_num]['name']
if not bottom_name in proto_layer.bottom:
proto_layer.bottom.append(bottom_name)
if proto_index == 0:
proto_layer_shape = proto_layer.reshape_param.shape
proto_layer_shape.dim.append(0)
proto_layer_shape.dim.append(0)
else:
proto_layer.type = 'Scale'
proto_layer.scale_param.axis = 0
proto_layer.scale_param.bias_term = False |
class Solution:
def canMeasureWater(self, x, y, z):
"""
:type x: int
:type y: int
:type z: int
:rtype: bool
"""
if x > y: x, y = y, x
gcd = self.gcd(x, y)
if gcd == 0: return z == 0
return z % gcd == 0 and z <= x + y
def gcd(self, a, b):
if a == 0: return b
return self.gcd(b % a, a) | class Solution:
def can_measure_water(self, x, y, z):
"""
:type x: int
:type y: int
:type z: int
:rtype: bool
"""
if x > y:
(x, y) = (y, x)
gcd = self.gcd(x, y)
if gcd == 0:
return z == 0
return z % gcd == 0 and z <= x + y
def gcd(self, a, b):
if a == 0:
return b
return self.gcd(b % a, a) |
""" Node is defined as
class node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
"""
def check_bst_with_bound(root, min, max):
# empty node or empty tree
if root is None:
return True
# if the value of node is out of bound
if root.data < min or root.data > max:
# each node in BST must be within (min, max)
return False
# check left sub-tree
is_left_bst = check_bst_with_bound(root.left, min, root.data-1 )
# check right sub-tree
is_right_bst = check_bst_with_bound(root.right, root.data+1, max )
return (is_left_bst and is_right_bst)
def check_binary_search_tree_(root):
is_bst = check_bst_with_bound( root, min = -1, max = 10001)
return is_bst
| """ Node is defined as
class node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
"""
def check_bst_with_bound(root, min, max):
if root is None:
return True
if root.data < min or root.data > max:
return False
is_left_bst = check_bst_with_bound(root.left, min, root.data - 1)
is_right_bst = check_bst_with_bound(root.right, root.data + 1, max)
return is_left_bst and is_right_bst
def check_binary_search_tree_(root):
is_bst = check_bst_with_bound(root, min=-1, max=10001)
return is_bst |
class AccessDenied(ValueError):
"""
Raised when invalid credentials are provided, or tokens have expired.
"""
pass
class InvalidPrivateKeyFormat(ValueError):
"""
Raised when provided private key has invalid format.
"""
pass
| class Accessdenied(ValueError):
"""
Raised when invalid credentials are provided, or tokens have expired.
"""
pass
class Invalidprivatekeyformat(ValueError):
"""
Raised when provided private key has invalid format.
"""
pass |
def main():
n, m = map(int, input().split())
if n < m:
print(f"Dr. Chaz will have {m-n} piece{'' if m-n == 1 else 's'} of chicken left over!")
else:
print(f"Dr. Chaz needs {n-m} more piece{'' if n-m == 1 else 's'} of chicken!")
return
if __name__ == "__main__":
main()
| def main():
(n, m) = map(int, input().split())
if n < m:
print(f"Dr. Chaz will have {m - n} piece{('' if m - n == 1 else 's')} of chicken left over!")
else:
print(f"Dr. Chaz needs {n - m} more piece{('' if n - m == 1 else 's')} of chicken!")
return
if __name__ == '__main__':
main() |
"""This package contains a template class for Problems and implementations of
said class.
"""
| """This package contains a template class for Problems and implementations of
said class.
""" |
data = int(input("Num : "))
max = 12
min = 1
while min<=max:
print("%d * %d = %d" % (data,min,data*min))
min+=1
| data = int(input('Num : '))
max = 12
min = 1
while min <= max:
print('%d * %d = %d' % (data, min, data * min))
min += 1 |
def setup():
size(600, 400)
def draw():
global theta
background(0);
frameRate(30);
stroke(255);
a = (mouseX / float(width)) * 90;
theta = radians(a);
translate(width/2,height);
line(0,0,0,-120);
translate(0,-120);
branch(120);
def branch(l):
l *= .66
if l > 1:
pushMatrix()
rotate(theta)
line(0, 0, 0, -l)
translate(0, -l)
branch(l)
popMatrix()
pushMatrix()
rotate(-theta)
line(0, 0, 0, -l)
translate(0, -l)
branch(l)
popMatrix()
| def setup():
size(600, 400)
def draw():
global theta
background(0)
frame_rate(30)
stroke(255)
a = mouseX / float(width) * 90
theta = radians(a)
translate(width / 2, height)
line(0, 0, 0, -120)
translate(0, -120)
branch(120)
def branch(l):
l *= 0.66
if l > 1:
push_matrix()
rotate(theta)
line(0, 0, 0, -l)
translate(0, -l)
branch(l)
pop_matrix()
push_matrix()
rotate(-theta)
line(0, 0, 0, -l)
translate(0, -l)
branch(l)
pop_matrix() |
def f(x):
y = x**4 - 3*x
return y
#pythran export integrate_f6(float64, float64, int)
def integrate_f6(a, b, n):
dx = (b - a) / n
dx2 = dx / 2
s = f(a) * dx2
i = 0
for i in range(1, n):
s += f(a + i * dx) * dx
s += f(b) * dx2
return s
| def f(x):
y = x ** 4 - 3 * x
return y
def integrate_f6(a, b, n):
dx = (b - a) / n
dx2 = dx / 2
s = f(a) * dx2
i = 0
for i in range(1, n):
s += f(a + i * dx) * dx
s += f(b) * dx2
return s |
# O(n) time | O(1) space
def reverseLinkedList(head):
p1, p2 = None, head
while p2 is not None:
p3 = p2.next
p2.next = p1
p1 = p2
p2 = p3
return p1 | def reverse_linked_list(head):
(p1, p2) = (None, head)
while p2 is not None:
p3 = p2.next
p2.next = p1
p1 = p2
p2 = p3
return p1 |
"""
* Highe level classes should not depend on low level classes, it happens most of the time because
we write low level classes first and then make the high level classes dependent on them
* Abstractions (High Level Classes) should not depend on implementations (Low level class)
Solve it using Bridge pattern or Singleton Design patterns are there to solve it
It helps in writing tests function also
Concrete business class should not depend on concreete low level class but the abstraction of those
You can do this inversion using dependency injection, parameter injection or constructor injection
this is gem: https://www.youtube.com/watch?v=S9awxA1wNNY&list=PLrhzvIcii6GMQceffIgKCRK98yTm0oolm&index=2
It can even reduce classes , if the concrete business class are very similar
"""
| """
* Highe level classes should not depend on low level classes, it happens most of the time because
we write low level classes first and then make the high level classes dependent on them
* Abstractions (High Level Classes) should not depend on implementations (Low level class)
Solve it using Bridge pattern or Singleton Design patterns are there to solve it
It helps in writing tests function also
Concrete business class should not depend on concreete low level class but the abstraction of those
You can do this inversion using dependency injection, parameter injection or constructor injection
this is gem: https://www.youtube.com/watch?v=S9awxA1wNNY&list=PLrhzvIcii6GMQceffIgKCRK98yTm0oolm&index=2
It can even reduce classes , if the concrete business class are very similar
""" |
# Make a config.py file filling in these constants. Note: This is only a template file!
clientID = 'CLIENT_ID'
secretID = 'SECRET_ID'
uName = 'USERNAME'
password = 'PASSWORD'
db_host = 'IP_ADDR_DB'
db_name = 'MockSalutes'
db_user = 'DB_USER'
db_pass = 'DB_PASSWORD'
| client_id = 'CLIENT_ID'
secret_id = 'SECRET_ID'
u_name = 'USERNAME'
password = 'PASSWORD'
db_host = 'IP_ADDR_DB'
db_name = 'MockSalutes'
db_user = 'DB_USER'
db_pass = 'DB_PASSWORD' |
# cook your dish here
for _ in range(int(input())):
N,MINX,MAXX = map(int,input().split())
num = MAXX-MINX+1
even = num//2
odd = num-even
for i in range(N):
w, b = map(int,input().split())
if w%2==0 and b%2==0:
even = even+odd
odd=0
elif w%2==1 and b%2==1:
even,odd = odd,even
elif w%2==0 and b%2==1:
odd= even+odd
even=0
print(even,odd)
| for _ in range(int(input())):
(n, minx, maxx) = map(int, input().split())
num = MAXX - MINX + 1
even = num // 2
odd = num - even
for i in range(N):
(w, b) = map(int, input().split())
if w % 2 == 0 and b % 2 == 0:
even = even + odd
odd = 0
elif w % 2 == 1 and b % 2 == 1:
(even, odd) = (odd, even)
elif w % 2 == 0 and b % 2 == 1:
odd = even + odd
even = 0
print(even, odd) |
#!/usr/bin/env python3
'''
Create a function, that takes 3 numbers: a, b, c and returns True if the last digit
of (the last digit of a * the last digit of b) = the last digit of c.
'''
def last_dig(a, b, c):
a = list(str(a))
b = list(str(b))
c = list(str(c))
val = list(str(int(a[-1]) * int(b[-1])))
return int(val[-1]) == int(c[-1])
#Alternative Solutions
def last_dig(a, b, c):
return str(a*b)[-1] == str(c)[-1]
def last_dig(a, b, c):
return ((a % 10) * (b % 10) % 10) == (c % 10)
| """
Create a function, that takes 3 numbers: a, b, c and returns True if the last digit
of (the last digit of a * the last digit of b) = the last digit of c.
"""
def last_dig(a, b, c):
a = list(str(a))
b = list(str(b))
c = list(str(c))
val = list(str(int(a[-1]) * int(b[-1])))
return int(val[-1]) == int(c[-1])
def last_dig(a, b, c):
return str(a * b)[-1] == str(c)[-1]
def last_dig(a, b, c):
return a % 10 * (b % 10) % 10 == c % 10 |
# Definition for an interval.
class Interval:
def __init__(self, s=0, e=0):
self.start = s
self.end = e
class Solution:
# @param intervals, a list of Intervals
# @return a list of Interval
def merge(self, intervals):
newInterval = []
if len(intervals) == 0:
return [newInterval]
| class Interval:
def __init__(self, s=0, e=0):
self.start = s
self.end = e
class Solution:
def merge(self, intervals):
new_interval = []
if len(intervals) == 0:
return [newInterval] |
# Basic Fantasy RPG Dungeoneer Suite
# Copyright 2007-2018 Chris Gonnerman
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, self list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright
# notice, self list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# Neither the name of the author nor the names of any contributors
# may be used to endorse or promote products derived from self software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
roomtypes = [
0,
( 5, "Antechamber"),
( 3, "Armory"),
( 7, "Audience"),
( 2, "Aviary"),
( 7, "Banquet Room"),
( 4, "Barracks"),
( 6, "Bath"),
(10, "Bedroom"),
( 2, "Bestiary"),
( 1, "Cell"),
( 1, "Chantry"),
( 2, "Chapel"),
( 1, "Cistern"),
( 3, "Classroom"),
( 8, "Closet"),
( 2, "Conjuring"),
( 5, "Corridor"),
( 1, "Courtroom"),
( 1, "Crypt"),
( 7, "Dining Room"),
( 2, "Divination Room"),
( 6, "Dormitory"),
( 4, "Dressing Room"),
( 3, "Gallery"),
( 3, "Game Room"),
( 4, "Great Hall"),
( 5, "Guardroom"),
( 6, "Hall"),
( 2, "Harem/Seraglio"),
( 2, "Kennel"),
( 6, "Kitchen"),
( 3, "Laboratory"),
( 3, "Library"),
( 7, "Lounge"),
( 3, "Meditation Room"),
( 2, "Museum"),
( 1, "Observatory"),
( 7, "Office"),
( 6, "Pantry"),
( 2, "Prison"),
( 1, "Privy"),
( 4, "Reception Room"),
( 3, "Refectory"),
( 2, "Robing Room"),
( 2, "Shrine"),
( 7, "Sitting Room"),
( 3, "Smithy"),
( 1, "Solar"),
( 4, "Stable"),
( 6, "Storage"),
( 2, "Strongroom/Vault"),
( 5, "Study"),
( 1, "Temple"),
( 1, "Throne Room"),
( 1, "Torture Chamber"),
( 2, "Training Room"),
( 2, "Trophy Room"),
( 8, "Vestibule"),
( 6, "Waiting Room"),
( 3, "Water Closet"),
( 3, "Well"),
( 4, "Workroom"),
( 6, "Workshop"),
]
# end of file.
| roomtypes = [0, (5, 'Antechamber'), (3, 'Armory'), (7, 'Audience'), (2, 'Aviary'), (7, 'Banquet Room'), (4, 'Barracks'), (6, 'Bath'), (10, 'Bedroom'), (2, 'Bestiary'), (1, 'Cell'), (1, 'Chantry'), (2, 'Chapel'), (1, 'Cistern'), (3, 'Classroom'), (8, 'Closet'), (2, 'Conjuring'), (5, 'Corridor'), (1, 'Courtroom'), (1, 'Crypt'), (7, 'Dining Room'), (2, 'Divination Room'), (6, 'Dormitory'), (4, 'Dressing Room'), (3, 'Gallery'), (3, 'Game Room'), (4, 'Great Hall'), (5, 'Guardroom'), (6, 'Hall'), (2, 'Harem/Seraglio'), (2, 'Kennel'), (6, 'Kitchen'), (3, 'Laboratory'), (3, 'Library'), (7, 'Lounge'), (3, 'Meditation Room'), (2, 'Museum'), (1, 'Observatory'), (7, 'Office'), (6, 'Pantry'), (2, 'Prison'), (1, 'Privy'), (4, 'Reception Room'), (3, 'Refectory'), (2, 'Robing Room'), (2, 'Shrine'), (7, 'Sitting Room'), (3, 'Smithy'), (1, 'Solar'), (4, 'Stable'), (6, 'Storage'), (2, 'Strongroom/Vault'), (5, 'Study'), (1, 'Temple'), (1, 'Throne Room'), (1, 'Torture Chamber'), (2, 'Training Room'), (2, 'Trophy Room'), (8, 'Vestibule'), (6, 'Waiting Room'), (3, 'Water Closet'), (3, 'Well'), (4, 'Workroom'), (6, 'Workshop')] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.