How to use the st2client.models.core function in st2client

To help you get started, we’ve selected a few st2client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github StackStorm / st2 / st2client / st2client / models / timer.py View on Github external
# 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.

from __future__ import absolute_import

import logging

from st2client.models import core


LOG = logging.getLogger(__name__)


class Timer(core.Resource):
    _alias = 'Timer'
    _display_name = 'Timer'
    _plural = 'Timers'
    _plural_display_name = 'Timers'
github StackStorm / st2 / st2client / st2client / models / pack.py View on Github external
# 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.

from __future__ import absolute_import

from st2client.models import core


class Pack(core.Resource):
    _display_name = 'Pack'
    _plural = 'Packs'
    _plural_display_name = 'Packs'
    _url_path = 'packs'
    _repr_attributes = ['name', 'description', 'version', 'author']
github StackStorm / st2 / st2client / st2client / models / aliasexecution.py View on Github external
#     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.

from __future__ import absolute_import

from st2client.models import core

__all__ = ['ActionAliasExecution']


class ActionAliasExecution(core.Resource):
    _alias = 'Action-Alias-Execution'
    _display_name = 'ActionAlias Execution'
    _plural = 'ActionAliasExecutions'
    _plural_display_name = 'Runners'
    _url_path = 'aliasexecution'
    _repr_attributes = [
        'name',
        'format',
        'command',
        'user',
        'source_channel',
        'notification_channel',
        'notification_route',
    ]
github StackStorm / st2 / st2client / st2client / models / inquiry.py View on Github external
# 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.

from __future__ import absolute_import

import logging

from st2client.models import core


LOG = logging.getLogger(__name__)


class Inquiry(core.Resource):
    _display_name = 'Inquiry'
    _plural = 'Inquiries'
    _plural_display_name = 'Inquiries'
    _url_path = 'inquiries'
    _repr_attributes = ['id', 'schema', 'roles', 'users', 'route', 'ttl']
github StackStorm / st2 / st2client / st2client / models / action.py View on Github external
# 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.

from __future__ import absolute_import

import logging

from st2client.models import core


LOG = logging.getLogger(__name__)


class RunnerType(core.Resource):
    _alias = 'Runner'
    _display_name = 'Runner'
    _plural = 'RunnerTypes'
    _plural_display_name = 'Runners'
    _repr_attributes = ['name', 'enabled', 'description']


class Action(core.Resource):
    _plural = 'Actions'
    _repr_attributes = ['name', 'pack', 'enabled', 'runner_type']
    _url_path = 'actions'


class Execution(core.Resource):
    _alias = 'Execution'
    _display_name = 'Action Execution'
github StackStorm / st2 / st2client / st2client / models / reactor.py View on Github external
# 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.

from __future__ import absolute_import

import logging

from st2client.models import core


LOG = logging.getLogger(__name__)


class Sensor(core.Resource):
    _plural = 'Sensortypes'
    _repr_attributes = ['name', 'pack']


class TriggerType(core.Resource):
    _alias = 'Trigger'
    _display_name = 'Trigger'
    _plural = 'Triggertypes'
    _plural_display_name = 'Triggers'
    _repr_attributes = ['name', 'pack']


class TriggerInstance(core.Resource):
    _alias = 'Trigger-Instance'
    _display_name = 'TriggerInstance'
    _plural = 'Triggerinstances'
github StackStorm / st2 / st2client / st2client / models / auth.py View on Github external
import logging

from st2client.models import core


LOG = logging.getLogger(__name__)


class Token(core.Resource):
    _display_name = 'Access Token'
    _plural = 'Tokens'
    _plural_display_name = 'Access Tokens'
    _repr_attributes = ['user', 'expiry', 'metadata']


class ApiKey(core.Resource):
    _display_name = 'API Key'
    _plural = 'ApiKeys'
    _plural_display_name = 'API Keys'
    _repr_attributes = ['id', 'user', 'metadata']
github StackStorm / st2 / st2client / st2client / models / action_alias.py View on Github external
from st2client.models import core

__all__ = ['ActionAlias', 'ActionAliasMatch']


class ActionAlias(core.Resource):
    _alias = 'Action-Alias'
    _display_name = 'Action Alias'
    _plural = 'ActionAliases'
    _plural_display_name = 'Action Aliases'
    _url_path = 'actionalias'
    _repr_attributes = ['name', 'pack', 'action_ref']


class ActionAliasMatch(core.Resource):
    _alias = 'Action-Alias-Match'
    _display_name = 'ActionAlias Match'
    _plural = 'ActionAliasMatches'
    _plural_display_name = 'Action Alias Matches'
    _url_path = 'actionalias'
    _repr_attributes = ['command']
github StackStorm / st2 / st2client / st2client / models / config.py View on Github external
# 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.

from __future__ import absolute_import

from st2client.models import core


class Config(core.Resource):
    _display_name = 'Config'
    _plural = 'Configs'
    _plural_display_name = 'Configs'


class ConfigSchema(core.Resource):
    _display_name = 'Config Schema'
    _plural = 'ConfigSchema'
    _plural_display_name = 'Config Schemas'
    _url_path = 'config_schemas'
    _repr_attributes = ['id', 'pack', 'attributes']
github StackStorm / st2 / st2client / st2client / models / policy.py View on Github external
from st2client.models import core


LOG = logging.getLogger(__name__)


class PolicyType(core.Resource):
    _alias = 'Policy-Type'
    _display_name = 'Policy type'
    _plural = 'PolicyTypes'
    _plural_display_name = 'Policy types'
    _repr_attributes = ['ref', 'enabled', 'description']


class Policy(core.Resource):
    _plural = 'Policies'
    _repr_attributes = ['name', 'pack', 'enabled', 'policy_type', 'resource_ref']