小编Cam*_*n26的帖子

无法通过S3对Elastic Beanstalk中的Docker进行身份验证

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_image.html#docker-singlecontainer-dockerrun-privaterepo

按照此处的说明连接到Elastic Beanstalk的私有docker hub容器,但它固执地拒绝工作.看起来在调用docker loginDocker 1.12时,生成的文件没有电子邮件属性,但听起来像aws期待它所以我创建了一个名为dockercfg.json的文件,如下所示:

{
    "https://index.docker.io/v1/": {
        "auth": "Y2...Fz",
        "email": "c...n@gmail.com"
    }
}
Run Code Online (Sandbox Code Playgroud)

我的Dockerrun.aws.json文件的相关部分如下所示:

  "Authentication": {
    "Bucket": "elasticbeanstalk-us-west-2-9...4",
    "Key": "dockercfg.json"
  },
Run Code Online (Sandbox Code Playgroud)

我将文件上传到S3存储桶的根目录.为什么我仍然会收到错误,说Error: image c...6/w...t:23 not found. Check snapshot logs for details.我确信这些名称是正确的,如果它是公共存储库,这将会有效.完整错误如下.我正在使用Circle CI从GitHub部署,如果它有所作为,我很乐意提供所需的任何其他信息.

INFO: Deploying new version to instance(s).                         
WARN: Failed to pull Docker image c...6/w...t:23, retrying...
ERROR: Failed to pull Docker image c...6/w...t:23: Pulling repository docker.io/c...6/w...t
Error: image c...6/w...t:23 not found. Check snapshot logs for details.
ERROR: [Instance: i-06b66f5121d8d23c3] Command failed on instance. Return …
Run Code Online (Sandbox Code Playgroud)

amazon-s3 amazon-web-services docker amazon-elastic-beanstalk

13
推荐指数
1
解决办法
1150
查看次数

如果Object不是None,则获取Python属性

如果对象存在于一行代码中,是否有Pythonic方法来获取属性?目前在下面的代码中,如果有人传入一个None类型的对象,代码就会中断,所以我需要一些干净的方法来检查它是不是None,而是在一行代码上.C#的?.语法非常有效,所以寻找类似的东西.

class MyClass:
    def __init__():
        self.my_property = "Hello, World!"

def print_class_property(myClassInstance):
    print(myClassInstance???.my_property) # Here is where I need something inline
Run Code Online (Sandbox Code Playgroud)

python python-3.x

6
推荐指数
1
解决办法
4849
查看次数

你能在Python列表理解中嵌入一下吗?

反正有没有相应的这个?

my_list = [try: my_dict["some_key"] except KeyError: 0 for my_dict in my_list]
Run Code Online (Sandbox Code Playgroud)

由于字典抛出KeyErrors,如果列表中的元素没有"some_key"属性,我想捕获错误.我知道我可以通过导入集合并回避异常来创建一个defaultdict,但我想知道这是否可以使用开箱即用的字典.

python dictionary python-3.x

3
推荐指数
1
解决办法
850
查看次数

在Mulesoft中为APIKit设置MUnit流参考的入站属性

我正在尝试在MUnit中测试APIKit.最初我在MUnit中使用http请求来调用我的流,然后APIKit将请求路由到我的逻辑所在的正确子流.现在我想模拟子流的一个元素,所以我试图用APIKit流的引用替换http请求.这有效,但APIKit路由器抛出错误:

Cannot resolve request base path
Run Code Online (Sandbox Code Playgroud)

因为没有设置入站属性.这是我的问题,我如何模仿我发送到流参考的入站属性,以便请求看起来像来自HTTP请求?或者,有没有其他方法可以构造代码,以便我可以模拟我的逻辑元素?

谢谢

mule mule-studio munit anypoint-studio

2
推荐指数
1
解决办法
4008
查看次数

断言在MUnit,Mulesoft中引发的异常

有没有办法断言流引用在Mulesoft中引发异常?搜索Google和文档没有任何结果.

基本上我正在测试一个子流,如果某个项存在,它会抛出一个NotFound异常,但MUnit在收到错误时失败,即使它是预期的.

我知道我可以模拟我的验证器,并让它返回我检查的特定数据,但我希望有一些本机可以做到这一点,而不是hacky.

mule anypoint-studio

2
推荐指数
1
解决办法
2942
查看次数

金斯威软件元数据字段返回空

Kingwaysoft中是否存在一些元数据字段返回的错误null?我有一个大型项目,正在下载所有帐户字段和元数据,除了owneridtype其他几个以外,它们都可以工作。像这样的字段customertypecodename都很好,并且我已经验证了它owneridtype与所有其他字段的映射相同。我的来源是fetchxml查询。

我看到这些帐户字段以及实体regardingobjecttypecode上的问题activitypointer

owneridtype

donotsendmarketingmaterialname

isprivatename

masteraccountidname

owneridtype

这是我的查询,减去自定义字段。如果需要,我可以添加它们。

<fetch mapping='logical'>
    <entity name='account'>
        <attribute name='accountcategorycode'/>
        <attribute name='accountcategorycodename'/>
        <attribute name='accountclassificationcode'/>
        <attribute name='accountclassificationcodename'/>
        <attribute name='accountid'/>
        <attribute name='accountnumber'/>
        <attribute name='accountratingcode'/>
        <attribute name='accountratingcodename'/>
        <attribute name='address1_addressid'/>
        <attribute name='address1_addresstypecode'/>
        <attribute name='address1_addresstypecodename'/>
        <attribute name='address1_city'/>
        <attribute name='address1_composite'/>
        <attribute name='address1_country'/>
        <attribute name='address1_county'/>
        <attribute name='address1_fax'/>
        <attribute name='address1_freighttermscode'/>
        <attribute name='address1_freighttermscodename'/>
        <attribute name='address1_latitude'/>
        <attribute name='address1_line1'/>
        <attribute name='address1_line2'/>
        <attribute name='address1_line3'/>
        <attribute name='address1_longitude'/>
        <attribute name='address1_name'/>
        <attribute name='address1_postalcode'/>
        <attribute name='address1_postofficebox'/>
        <attribute name='address1_primarycontactname'/>
        <attribute name='address1_shippingmethodcode'/> …
Run Code Online (Sandbox Code Playgroud)

ssis dynamics-crm kingswaysoft

0
推荐指数
1
解决办法
330
查看次数